Skip to content

Releases: oxc-project/oxc

oxlint v0.0.20

13 Dec 05:52
Compare
Choose a tag to compare

What's Changed

Full Changelog: oxlint_v0.0.19...oxlint_v0.0.20

oxlint v0.0.19

08 Dec 10:44
Compare
Choose a tag to compare

Try it out!

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?

image

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

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

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

New Contributors

Full Changelog: oxlint_v0.0.18...oxlint_v0.0.19

oxlint v0.0.18

22 Nov 07:16
Compare
Choose a tag to compare

Try it out!

oxlint has 78 correctness rules turned on by default, with 164 rules in total.

What's Changed

Features

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
image

Notice $? prints 1.

New Rules

Correctness

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

Style

Fixes

Misc

New Contributors

Full Changelog: oxlint_v0.0.17...oxlint_v0.0.18

oxlint v0.0.17

09 Nov 05:29
Compare
Choose a tag to compare

Try it out!

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

08 Nov 05:13
Compare
Choose a tag to compare

Try it out!

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

Pedantic

Style

Nursery

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

Full Changelog: oxlint_v0.0.15...oxlint_v0.0.16

oxlint v0.0.15

30 Oct 16:42
ddd5314
Compare
Choose a tag to compare

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

23 Oct 03:25
Compare
Choose a tag to compare

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

Fixes

Parser

New Contributors

Full Changelog: oxlint_v0.0.13...oxlint_v0.0.14

oxlint v0.0.13

29 Sep 11:58
Compare
Choose a tag to compare

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

New Contributors

Full Changelog: oxlint_v0.0.12...oxlint_v0.0.13

oxlint v0.0.12

06 Sep 04:19
Compare
Choose a tag to compare

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

27 Aug 09:29
a803e04
Compare
Choose a tag to compare

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

  • perf(lexer): reduce checks on ident -> keyword (#783)
  • perf(lexer): jump table (#779)

These two commits reduced total CPU instructions count by about 1%.

Full Changelog: oxlint_v0.0.10...oxlint_v0.0.11