oxlint v0.0.22
What's Changed
New Rules
Reports errors when a comparison is redundant, or impossible.
A redundant check would be foo > 5 && foo > 10
An impossible check would be foo > 5 && foo < 5
https://rust-lang.github.io/rust-clippy/master/index.html#/redundant_comparisons
https://rust-lang.github.io/rust-clippy/master/index.html#/impossible
https://rust-lang.github.io/rust-clippy/master/index.html#/double_comparisons
- deepscan: bad char at comparison by @camc314 in #1750
- deepscan: bad replace all arg by @camc314 in #1749
- eslint-plugin-jsx-a11y: aria-props by @poteboy in #1797
- eslint-plugin-jsx-a11y: no-aria-hidden-on-focusable by @poteboy in #1795
- eslint-plugin-jsx-a11y: no-distracting-elements rule by @tapanprakasht in #1767
Performance
10 - 20% faster than the previous version.
Sampling from an internal codebase (119900 files) - Before 12.8s vs 11.2s after.
- precompute
rule.name()
by @Boshen in #1759 - reduce the
RuleEnum
enum size from 168 to 16 bytes by @Boshen in #1783
Improvements
- vscode: don't lint files in .gitignore and .eslintignore by @IWANABETHATGUY in #1765
- improve span for
no useless catch
by @camc314 in #1731 - no-cond-assign: span points to the operator by @Dunqing in #1739
- no-useless-escape support auto fix by @Dunqing in #1743
- improve span for
no-unneccessary-await
by @camc314 in #1732 - improve span of
bad-remove-event-listener
, merge rules by @camc314 in #1734 - shrink span for
prefer-string-starts-with-ends-with
by @camc314 in #1730 - improve the help message for const-comparisons by @Boshen in #1764
- use simd (memchr) for no-useless-escape search by @Boshen in #1766
Fixes
- skip run lint when
--rules
is passed by @camc314 in #1747 - conflict between
--import-plugin
and-D correctness
by @camc314 in #1729 - support read the third item in config file by @mysteryven in #1771
- correct example and docs url for number_arg_out_of_range by @legend80s in #1737
- false positives for empty brace spaces by @camc314 in #1742
- fix incorrect report in
prefer-string-replace-all
by @camc314 in #1796 - fix a typo in no_redeclare message by @modderme123 in #1789
- eslint/no-obj-calls: correctly resolves the binding name by @Dunqing in #1738
parser
- refactor(ast): introduce
ThisParameter
by @magic-akari in #1728 - refactor(parser): report
this
parameter error by @magic-akari in #1788
New Contributors
- @legend80s made their first contribution in #1737
- @tapanprakasht made their first contribution in #1767
- @modderme123 made their first contribution in #1789
- @poteboy made their first contribution in #1795
- @overlookmotel made their first contribution in #1801
Full Changelog: oxlint_v0.0.21...oxlint_v0.0.22