Releases: oxc-project/oxc
oxlint v0.0.20
What's Changed
- eslint-plugin-unicorn: prefer-modern-dom-apis (style) by @Ken-HH24 in #1646
- eslint-plugin-react: react-in-jsx-scope by @camc314 in #1025
- eslint plugin unicorn: prefer array flat by @camc314 in #1650
- vscode: add a option to control oxc lint timing by @IWANABETHATGUY in #1659
- improve span for no accumulating spread by @camc314 in #1644
Full Changelog: oxlint_v0.0.19...oxlint_v0.0.20
oxlint v0.0.19
Try it out!
- Run
npx --yes oxlint@latest
from your terminal - Install the Vscode extension https://marketplace.visualstudio.com/items?itemName=oxc.oxc-vscode
New Rules
Performance
This is a new category turned off by default. See it in action with
npx --yes oxlint@latest -D perf
Did you know that the reudce
+ ...spread
combo is an O(n^2)
operation?
Read https://prateeksurana.me/blog/why-using-object-spread-with-reduce-bad-idea/ for detailed explaination.
noAccumulatingSpread
is also part of Biome since v1.
Correctness
- eslint-plugin-unicorn: no-useless-length check by @radu2147 in #1541
- eslint-plugin-unicorn: no-useless-spread by @camc314 in #1638
- eslint-plugin-unicorn: prefer-set-size by @camc314 in #1508
- eslint-plugin-jsx-a11y: anchor-is-valid for by @msdlisper in #1477
- eslint-plugin-jsx-a11y: heading-has-content for by @Ken-HH24 in #1501
- eslint-plugin-jsx-a11y: iframe-has-title rule by @Shinyaigeek in #1589
- eslint-plugin-jsx-a11y: img-redundant-alt by @Shinyaigeek in #1571
- eslint-plugin-jsx-a11y: no-autofocus by @msdlisper in #1641
- eslint-plugin-jsx-a11y: scope by @Shinyaigeek in #1609
- eslint-plugin-react: no-is-mounted for by @Ken-HH24 in #1550
Pedantic
- eslint-plugin-unicorn: prefer-native-coercion-functions (pedantic) by @camc314 in #1507
- eslint-plugin-unicorn: no-unreadable-iife by @haocheng6 in #1572
- eslint-plugin-unicorn: escape-case by @RiESAEX in #1495
- eslint-plugin-unicorn: explicit-length-check by @RiESAEX in #1617
Suspicious
Restriction
- eslint-plugin-unicorn: no-array-foreach by @camc314 in #1613
- eslint-plugin-unicorn: no-array-reduce by @camc314 in #1610
- eslint-plugin-unicorn: prefer number properties by @camc314 in #1614
Style
- eslint-plugin-unicorn: no-await-expression-member by @Ken-HH24 in #1569
- eslint-plugin-unicorn: no-unreadable-array-destructuring (style) by @Ken-HH24 in #1594
- eslint-plugin-unicorn: numeric-separators-style (style) by @sirreal in #1490
- eslint-plugin-unicorn: prefer-node-protocol by @IWANABETHATGUY in #1618
- eslint-plugin-unicorn: prefer-reflect-apply(style) by @Ken-HH24 in #1628
- eslint-plugin-unicorn: require-array-join-separator(style) by @Ken-HH24 in #1608
Fixes
- feat(ast): implement new proposal-import-attributes by @magic-akari in #1476
- fix(linter): fix panic in no hex escape by @camc314 in #1540
New Contributors
- @JonaAnders made their first contribution in #1496
- @Shinyaigeek made their first contribution in #1571
- @milesj made their first contribution in #1510
Full Changelog: oxlint_v0.0.18...oxlint_v0.0.19
oxlint v0.0.18
Try it out!
- Run
npx --yes oxlint@latest
from your terminal - Install the Vscode extension https://marketplace.visualstudio.com/items?itemName=oxc.oxc-vscode
oxlint has 78 correctness rules turned on by default, with 164 rules in total.
What's Changed
Features
- Add
--deny-warnings
flag by @shannonrothe in #1452
If you wish to fail CI with exit code 1, pin oxlint
to a version and use the --deny-warnings
flag:
npx oxlint@0.0.18 --deny-warnings
Notice $?
prints 1
.
New Rules
Correctness
- eslint-plugin-unicorn: no document cookie by @camc314 in #1255
- eslint-plugin-unicorn: prefer string starts ends with by @camc314 in #1246
- eslint-plugin-jsx-a11y: anchor-has-content by @msdlisper in #1431
- eslint-plugin-jsx-a11y: html-has-lang for by @Ken-HH24 in #1436
Pedantic
- eslint-plugin-unicorn: no lonely if by @camc314 in #1252
- eslint-plugin-unicorn: no negated condition by @camc314 in #1253
- eslint-plugin-unicorn: no this assignment by @camc314 in #1250
- eslint-plugin-unicorn: no typeof undefined by @camc314 in #1251
- eslint-plugin-unicorn: no useless promise resolve reject by @camc314 in #1254
- eslint-plugin-unicorn: prefer array some by @camc314 in #1467
- eslint-plugin-unicorn: prefer dom node append by @camc314 in #1256
- eslint-plugin-unicorn: prefer dom node dataset by @camc314 in #1257
- eslint-plugin-unicorn: prefer dom node remove by @camc314 in #1472
- eslint-plugin-unicorn: prefer event target by @camc314 in #1465
- eslint-plugin-unicorn: prefer math trunc by @camc314 in #1466
- eslint-plugin-unicorn: prefer string replace all by @camc314 in #1248
- eslint-plugin-unicorn: no useless switch case by @camc314 in #1463
- eslint-plugin-unicorn: no-hex-escape by @RiESAEX in #1410
Restriction
- eslint: no-regex-spaces by @ivov in #1129
- eslint-plugin-unicorn: no-abusive-eslint-disable by @haocheng6 in #1125
- eslint-plugin-unicorn: no-nested-ternary by @haocheng6 in #1417
Style
- eslint plugin unicorn: empty-brace-spaces by @radu2147 in #1249
- eslint plugin unicorn: no zero fractions by @camc314 in #1464
- eslint plugin unicorn: prefer includes by @camc314 in #1471
- eslint-plugin-unicorn: prefer string slice by @camc314 in #1247
- eslint-plugin-unicorn: number-literal-case by @haocheng6 in #1271
- eslint-plugin-jest: max_expects by @eryue0220 in #1239
- eslint-plugin-jest: no-deprecated-function by @eryue0220 in #1316
Fixes
- eslint(for-direction): add check for condition in reverse order by @ild0tt0re in #1418
- Fix catch error name with parenthesis by @camc314 in #1242
- Fix no instanceof array with parenthesis by @camc314 in #1243
- Fix no object as default param with parenthesis by @camc314 in #1244
- Fix prefer date now with parenthesis by @camc314 in #1245
- Fix prefer logical operator error with parenthesis by @camc314 in #1241
- Fix prefer type error with parenthesis by @camc314 in #1240
- fix(parser): Disallow ReservedWord in NamedExports by @magic-akari in #1230
Misc
New Contributors
- @msdlisper made their first contribution in #1223
- @radu2147 made their first contribution in #1249
- @sirreal made their first contribution in #1416
- @Ken-HH24 made their first contribution in #1436
Full Changelog: oxlint_v0.0.17...oxlint_v0.0.18
oxlint v0.0.17
Try it out!
- Run
npx --yes oxlint@latest
from your terminal - Install the Vscode extension https://marketplace.visualstudio.com/items?itemName=oxc.oxc-vscode
What's Changed
Features
The final dot is no longer required by the CLI #1201:
npx oxlint@latest
This is the same as npx oxlint@latest .
, where the current working directory will be scanned.
This is an alignment with ESLint v9, see https://eslint.org/blog/2023/11/whats-coming-in-eslint-9.0.0/#running-eslint-with-no-file-arguments
What's Changed
New rules by category
Style
- eslint-plugin-unicorn: prefer-optional-catch-binding by @camc314 in #1188
- eslint-plugin-unicorn: prefer-spread by @camc314 in #1186
Fixes
- fix(linter): fix handling of repeated eslint-disable comments by @haocheng6 in #1200
Full Changelog: oxlint_v0.0.16...oxlint_v0.0.17
oxlint v0.0.16
Try it out!
- Run
npx --yes oxlint@latest .
from your terminal - Install the Vscode extension https://marketplace.visualstudio.com/items?itemName=oxc.oxc-vscode
What's Changed
Features
Use the following cli flags to enable the import / jest / jsx-a11y plugins
Enable Plugins
--import-plugin Enable the experimental import plugin and detect ESM problems
--jest-plugin Enable the Jest plugin and detect test problems
--jsx-a11y-plugin Enable the JSX-a11y plugin and detect accessibility problems
New rules by category (19 in total)
Correctness (turned on by default)
- eslint-plugin-unicorn: no-invalid-remove-event-listener by @camc314 in #1147
- eslint-plugin-unicorn: no-useless-fallback-in-spread @camc314 in #1176
- eslint-plugin-jsx-a11y: alt-text by @manzt in #1126
Suspicious
- eslint-plugin-unicorn: no-new-array by @camc314 in #1160
- eslint-plugin-unicorn: prefer-add-event-listener by @camc314 in #1175
Pedantic
- eslint-plugin-unicorn: prefer-type-error by @camc314 in #1149
- eslint-plugin-unicorn: new-for-builtins by @camc314 in #1159
- eslint-plugin-unicorn: no-new-buffer by @camc314 in #1174
- eslint-plugin-unicorn: prefer-date-now by @camc314 in #1150
- eslint-plugin-unicorn: prefer-regex-test by @camc314 in #1187
- eslint-plugin-unicorn: no-static-only-class by @camc314 in #1161
- eslint-plugin-unicorn: prefer-blob-reading-methods by @camc314 in #1168
- eslint-plugin-unicorn: prefer-code-point by @camc314 in #1167
- eslint-plugin-unicorn: no-object-as-default-parameter by @camc314 in #1162
Style
- eslint-plugin-unicorn: prefer-string-trim-start-end by @camc314 in #1148
- eslint-plugin-jest: prefer-todo rule by @eryue0220 in #1065
- eslint-plugin-react(jsx_key): ignore ObjectProterty nodes by @yesmeck in #1139
- eslint: default-case-last by @PerfectPan in #1156
Nursery
- eslint-plugin-import: no-amd by @qinyuhang in #1171
- eslint-plugin-jest: no-hooks by @eryue0220 in #1172
Fixes
- reduce the lookup times of Call Expression in Jest rules by @mysteryven in #1184
- parse configuration for unicorn/filename-case by @camc314 in #1145
- fix covered span of eslint-disable-next-line comments by @haocheng6 in #1128
New Contributors
- @ubugeeei made their first contribution in #1136
- @PerfectPan made their first contribution in #1156
- @qinyuhang made their first contribution in #1171
Full Changelog: oxlint_v0.0.15...oxlint_v0.0.16
oxlint v0.0.15
What's Changed
- fix(linter) Improve span for jsx key by @camc314 in #1040
- feat(linter): eslint-plugin-react/no-find-dom-node by @haocheng6 in #1031
- reactor(linter): Refactor jsx key rule to use static_property_info by @camc314 in #1043
- feat(linter): eslint-plugin-react(no-unescaped-entities) by @camc314 in #1044
- feat(linter): support react/no-render-return-value by @Dunqing in #1042
- feat(linter): eslint-plugin-react no-string-refs by @manzt in #1053
- feat(linter): eslint-plugin-unicorn - no-empty-file by @camc314 in #1052
- feat(linter) eslint-plugin-unicorn - text-encoding-identifier-case by @camc314 in #1051
- feat(linter): support react/no-string-refs by @Dunqing in #1055
- feat(linter) eslint-plugin-unicorn - prefer-logical-operator-over-ternary by @camc314 in #1064
- fix(linter): noTemplateLiterals configuration in no_string_refs rule not working by @Dunqing in #1063
- fix(linter) fix incorrect reporting for no_useless_escape by @camc314 in #1062
- feat(linter): eslint-plugin-unicorn switch-case-braces by @Dywanoid in #1054
- feat(linter): eslint-plugin-unicorn require-number-to-fixed-digits-argument by @Dywanoid in #1073
- fix(linter) Fix panic on no_mixed_operators rule by @camc314 in #1094
- fix(linter) Fix panic on no useless escape by @camc314 in #1092
- fix(linter) Fix panic when using ban ts comment on conformace tests by @camc314 in #1097
- fix(linter) Report error instead of panicing if the file fails to open by @camc314 in #1098
- fix(linter): revert changes to JSX attribute strings by @Boshen in #1101
- fix(linter): fix panic in no_unescaped_entities by @Boshen in #1103
- fix(linter/no_empty_file): point to start of file instead of the entire file by @Boshen in #1105
- feat(linter/no_children_prop): point the span to "children" by @Boshen in #1106
- feat(linter): support unicorn/prefer-query-selector by @Dunqing in #1068
- feat(linter): demote prefer_array_flat_map to style by @Boshen in #1108
- fix(linter/no_render_return_value): fix false positive when nested inside an arrow expression by @Boshen in #1109
- chore(linter/no_unescaped_entities): demote to pedantic by @Boshen in #1110
- fix(linter/no-render-return-value): remove duplicate test case by @Dunqing in #1111
- feat(linter): change some rules pedantic and improve help message by @Boshen in #1112
- chore(linter): move all import plugin rules to nursery by @Boshen in #1113
New Contributors
Full Changelog: oxlint_v0.0.14...oxlint_v0.0.15
oxlint v0.0.14
Try it out!
Run
npx --yes oxlint@latest .
in your JavaScript / TypeScript codebase and see it complete in milliseconds. No configurations required.npx oxlint@latest --help
for usage instructions.npx oxlint@latest --rules
for list of rules.
What's Changed
Linter
New Rules
- typescript-eslint: ban-types by @camc314 in #953
- eslint-plugin-jest: valid-expect by @mysteryven in #941
- eslint-plugin-jest: no-identical-title by @mysteryven in #957
- eslint-plugin-jest: valid-title by @mysteryven in #966
- eslint-plugin-jest: no-confusing-set-timeout by @eryue0220 in #938
- eslint-plugin-unicorn: filename-case by @Boshen in #978
- eslint-plugin-unicorn: catch-error-name by @camc314 in #984
- eslint-plugin-unicorn: no-console-spaces by @camc314 in #991
- eslint-plugin-unicorn: error-message by @camc314 in #992
- eslint-plugin-unicorn: prefer-array-flat-map by @camc314 in #997
- eslint-plugin-unicorn: throw-new-error by @camc314 in #1005
- eslint-plugin-react: jsx-key by @camc314 in #1016
- eslint-plugin-react: no-children-prop by @camc314 in #1015
- eslint-plugin-react: no-useless-fragment by @camc314 in #1021
- eslint-plugin-react: jsx-no-duplicate-props by @camc314 in #1024
- eslint-plugin-react: no-dangerously-set-inner-html by @camc314 in #1029
- eslint-plugin-react: jsx-no-comment-text-nodes by @camc314 in #1027
Fixes
- fix panic when no paths are provided by @camc314 in #944
- Fix oxlint --quiet suppressing errors by @developit in #1008
- fix panic with
strip_prefix
by @Boshen in #1013 - fix panic when linting declaration files by @camc314 in #1014
- incorrect reporting for jsx_key by @camc314 in #1020
Parser
- feat(parser): TypeScript 5.2 by @camc314 in #811
- fix(lexer) Fix spans for jsx children by @camc314 in #1030
New Contributors
Full Changelog: oxlint_v0.0.13...oxlint_v0.0.14
oxlint v0.0.13
What's Changed
- feat(linter): add typescript/no-explicit-any by @DonIsaac in #881
- feat(linter): eslint-plugin-import(no-cycle) by @Boshen in #890
- feat(linter): add eslint-plugin-import/default by @mysteryven in #895
- feat(linter): add no-console rule by @todor-a in #887
- feat(linter): implement eslint-plugin-unicorn/no-thenable rule by @Devin-Yeung in #910
- Fix: return 0 exit code when warnings<max_warnings by @developit in #933
Performance
- perf(cli): force
terminal_links
to reduce sys calls by @Boshen in #911 - perf(lexer): remove an extra branch from
identifier_name_handler
by @Boshen in #912 - perf(lexer): only check the first lower case for
match_keyword
by @Boshen in #913 - perf(parser): remove an extra branch from
parse_member_expression_rhs
hot path by @Boshen in #896 - perf(lexer): reduce an extra branch from peek by @Boshen in #841
- perf(linter): swap the order of checks for no_caller by @Boshen in #844
- perf(linter): parse ts-directive manually by @Devin-Yeung in #845
Parser Fixes
- fix(parser): parse [+In] in object binding initializer by @Boshen in #874
- fix: ts parsing error by @IWANABETHATGUY in #940
New Contributors
- @todor-a made their first contribution in #887
- @IWANABETHATGUY made their first contribution in #927
- @developit made their first contribution in #933
- @eryue0220 made their first contribution in #683
Full Changelog: oxlint_v0.0.12...oxlint_v0.0.13
oxlint v0.0.12
New Rules
- feat(linter): implement unicorn/no-unnecessary-await (#856)
What's Changed
- fix(linter): no-var-requires not warning if has bindings in ancestors (#799)
- feat(linter): eslint-plugin-jest/expect-expect (#802)
- feat(linter): add eslint-plugin-jest/no_alias_method rule (#818)
- feat(linter): add eslint-plugin-jest/no-conditional-expect rule (#832)
- fix(linter): fix incorrect behaviour for "-D correctness -A rule-name"
Performance
- perf(linter): swap the order of checks for no_caller (#844)
- perf(linter): parse ts-directive manually (#845)
Full Changelog: oxlint_v0.0.11...oxlint_v0.0.12
oxlint v0.0.11
What's Changed
- feat(linter): implement no-unsafe-declaration-merging (#748)
- fix(linter): show the escaped span for no-useless-escape (#790)
- refactor(linter): move the label message to help for no_constant_binary_expression
- fix(cli): correct ignore-pattern behavior; add more cli tests (#796)
Performance
These two commits reduced total CPU instructions count by about 1%.
Full Changelog: oxlint_v0.0.10...oxlint_v0.0.11