File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
crates/oxc_linter/src/rules/eslint Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -27,8 +27,7 @@ pub struct Eqeqeq {
2727declare_oxc_lint ! (
2828 /// ### What it does
2929 ///
30- /// Requires the use of the `===` and `!==` operators.
31- /// This rule disallows `==` and `!=`.
30+ /// Requires the use of the `===` and `!==` operators, disallowing the use of `==` and `!=`.
3231 ///
3332 /// ### Why is this bad?
3433 ///
@@ -138,9 +137,6 @@ declare_oxc_lint!(
138137 ///
139138 /// #### `{"null": "never"}` (with `"always"` first option)
140139 ///
141- /// Note: ESLint's official accepted values are `"always"` and `"ignore"`. `"never"` is not an ESLint value;
142- /// the examples below treat `"never"` as a custom extension to illustrate the concept of enforcing `== null` and `!= null`.
143- ///
144140 /// Examples of **incorrect** code for this rule with the `{ "null": "never" }` option:
145141 /// ```js
146142 /// /* eslint eqeqeq: ["error", "always", { "null": "never" }] */
@@ -312,7 +308,9 @@ fn to_strict_eq_operator_str(operator: BinaryOperator) -> (&'static str, &'stati
312308 match operator {
313309 BinaryOperator :: Equality => ( "===" , " === " ) ,
314310 BinaryOperator :: Inequality => ( "!==" , " !== " ) ,
315- _ => unreachable ! ( "Unexpected operator passed to to_strict_eq_operator_str" ) ,
311+ _ => unreachable ! (
312+ "Only Equality and Inequality operators are supported in to_strict_eq_operator_str"
313+ ) ,
316314 }
317315}
318316
You can’t perform that action at this time.
0 commit comments