Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions crates/oxc_linter/src/rules/eslint/no_compare_neg_zero.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ pub struct NoCompareNegZero;
declare_oxc_lint!(
/// ### What it does
///
/// Disallow comparing against -0
/// Disallow comparing against `-0`
///
/// ### Why is this bad?
///
/// The rule should warn against code that tries to compare against -0,
/// since that will not work as intended. That is, code like x === -0 will
/// pass for both +0 and -0. The author probably intended Object.is(x, -0).
/// The rule should warn against code that tries to compare against `-0`,
/// since that will not work as intended. That is, code like `x === -0` will
/// pass for both `+0` and `-0`. The author probably intended `Object.is(x, -0)`.
///
/// ### Examples
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ declare_oxc_lint!(
/// ### Why is this bad?
///
/// In contexts such as an if statement's test where the result of the expression will already be coerced to a Boolean,
/// casting to a Boolean via double negation (!!) or a Boolean call is unnecessary.
/// casting to a Boolean via double negation (`!!`) or a `Boolean` call is unnecessary.
///
/// ### Examples
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ declare_oxc_lint!(
///
/// ### Why is this bad?
///
/// The optional chaining (?.) expression can short-circuit with a return value of undefined.
/// The optional chaining (`?.`) expression can short-circuit with a return value of undefined.
/// Therefore, treating an evaluated optional chaining expression as a function, object, number, etc.,
/// can cause TypeError or unexpected results. For example:
///
Expand Down
8 changes: 4 additions & 4 deletions crates/oxc_linter/src/rules/eslint/use_isnan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ impl Default for UseIsnan {
declare_oxc_lint!(
/// ### What it does
///
/// Disallows checking against NaN without using isNaN() call.
/// Disallows checking against NaN without using `isNaN()` call.
///
/// ### Why is this bad?
///
Expand All @@ -65,10 +65,10 @@ declare_oxc_lint!(
///
/// Because NaN is unique in JavaScript by not being equal to anything, including itself,
/// the results of comparisons to NaN are confusing:
/// - NaN === NaN or NaN == NaN evaluate to false
/// - NaN !== NaN or NaN != NaN evaluate to true
/// - `NaN === NaN` or `NaN == NaN` evaluate to false
/// - `NaN !== NaN` or `NaN != NaN` evaluate to true
///
/// Therefore, use Number.isNaN() or global isNaN() functions to test whether a value is NaN.
/// Therefore, use `Number.isNaN()` or global `isNaN()` functions to test whether a value is NaN.
///
/// ### Examples
///
Expand Down
Loading