Skip to content

Releases: oxc-project/oxc

oxlint v0.2.6

26 Jan 14:55
1b5bbb9
Compare
Choose a tag to compare

What's Changed

VSCode

  • feat(vscode): allow config path configuration by @Djiit in #2172

Linter

  • support read eslint env from eslintrc by @fi3ework in #2130
  • rename react_perf/jsx_no_new_function_as_props to jsx_no_new_function_as_prop by @leaysgur in #2175

Semantic

Cli

New Contributors

Full Changelog: oxlint_v0.2.5...oxlint_v0.2.6

oxlint v0.2.5

25 Jan 09:37
8ca1812
Compare
Choose a tag to compare

What's Changed

This release matched all linter rule names with their ESLint counterparts.

New Rules

Fixes

  • fix(linter): explicit-length-check inside ternary by @maurice in #2165

New Contributors

Full Changelog: oxlint_v0.2.4...oxlint_v0.2.5

oxlint v0.2.4

23 Jan 11:48
2406e94
Compare
Choose a tag to compare

What's Changed

Fixed linux installation failures.

Full Changelog: oxlint_v0.2.3...oxlint_v0.2.4

oxlint v0.2.3

23 Jan 05:14
518bc0d
Compare
Choose a tag to compare

What's Changed

New eslint-plugin-react-perf

oxlint --react-perf-plugin

Differenciate linux gnu / musl binary targets

  • linux-x64-gnu
  • linux-arm64-gnu
  • linux-x64-musl
  • linux-arm64-musl
  • ci: release oxlint with linux-{x64-gnu, arm64-gnu, x64-musl, arm64-musl} by @Boshen in #2126

New Rules

  • jest: no-restricted-matchers by @eryue0220 in #2090
  • jest: no-restricted-jest-methods by @eryue0220 in #2091
  • import: no-named-as-default by @XantreGodlike in #2109
  • unicorn: promote no-new-array to correctness with better help message by @Boshen in #2123

Favor Array.from({ length: n }) and [onlyElement] instead of ambiguous new Array(arg)

Improvements

Fixes

New Contributors

Full Changelog: oxlint_v0.2.2...oxlint_v0.2.3

oxlint v0.2.2

20 Jan 15:22
2fdfc4c
Compare
Choose a tag to compare

What's Changed

  • fix(parser): fix crash on TSTemplateLiteralType in function return position by @Boshen in #2089
  • feat(linter): improve no_redeclare rule implementation by @Dunqing in #2084
  • refactor(linter): perfect the scope linter by @msdlisper in #2092
  • fix(linter): s/consistent-type-export/consistent-type-exports by @Boshen in #2065
  • feat(linter): eslint-plugin-import no-named-as-default-member rule by @XantreGodlike in #2071

New Contributors

Full Changelog: oxlint_v0.2.1...oxlint_v0.2.2

oxlint v0.2.1

16 Jan 12:01
b0d662f
Compare
Choose a tag to compare

Try it out!

New Rules

  • eslint-plugin-next: no-document-import-in-page by @kaykdm in #1997
  • eslint-plugin-next: no-head-element by @kaykdm in #2006
  • eslint-plugin-next: no-typos by @kaykdm in #1978
  • eslint-plugin-jsx-a11y: aria-activedescendant-has-tabindex by @keita-hino in #2012
  • eslint-plugin-jsx-a11y: click-events-have-key-events by @leaysgur in #1976
  • eslint-plugin-jsx-a11y: no-redundant-roles rule by @yossydev in #1981
  • eslint-plugin-import: no-named-as-default-member rule by @XantreGodlike in #1988

Improvements

Linter

  • fix(linter) fix false positive for erasing-op in 0/0 case by @camc314 in #2009
  • fix(linter): false positive for filename_case where filename doesn't have a proper casing by @Boshen in #2032
  • fix(linter): keep rules disabled if the rule is not enabled in the config by @Boshen in #2031

41% faster after removing the --timings feature

  • feat(linter): remove the --timings feature by @Boshen in #2049

Parser - 7% faster than the previous version

Full Changelog: oxlint_v0.2.0...oxlint_v0.2.1

oxlint v0.2.0

12 Jan 15:16
e621e9b
Compare
Choose a tag to compare

Try it out!

Better configuration support

oxlint -c ./eslintrc.json

will use the rules field for rule configuration, as documented in ESLint's documentation.

Unfortunately, only the json format is supported right now.

The extends field will not take effect; normal -D and -A flags still apply.

To add / remove / configure a rule:

{
  "rules": {
      "no-empty": "off", // removes the rule
      "no-empty": "error", // adds the rule
      "no-empty": ["error", { "allowEmptyCatch": true }]` configures the rule
  }
}

Next.js Plugin

oxlint --nextjs-plugin

Vscode

New Rules

correctness

restriction

  • react: no-unknown-property by @XantreGodlike in #1875

style

Fixes

Linter

  • always print without considering the --max-warnings option by @Boshen in #1996
  • support vue generic component by @Boshen in #1989
  • Support cases where aria-hidden includes expressions by @keita-hino in #1964
  • allow eslintrc to add rule when overriding by @fi3ework in #1984
  • fix plugin name parsing when reading config file by @haocheng6 in #1972
  • handle anonymous functional components in arrays that have a function body by @maurice in #1983

Parser

Improvements

  • Parser is 10% faster than the previous version

New Contributors

Full Changelog: oxlint_v0.1.2...oxlint_v0.2.0

oxlint v0.1.2

06 Jan 17:10
4a9e0c4
Compare
Choose a tag to compare

Try it out!

Svelte support

<script> tag is linted by default.

Features

  • feat(linter): <script> part of svelte file by @Boshen in #1918
  • feat(linter): disable no-unused-labels for svelte by @Boshen in #1919

Fixes

Full Changelog: oxlint_v0.1.1...oxlint_v0.1.2

oxlint v0.1.1

06 Jan 13:31
821cc8e
Compare
Choose a tag to compare

Try it out!

Vue support

<script> and <script setup> are linted by default.

Astro support

Frontmatter component script --- and all <script> tags are linted by default.

Configuration files (experimental)

-c ./eslintrc.json will use the rules field for rule configuration, as documented in ESLint's documentation.

Unfortunately, only the json format is supported right now.

The extends field will not take effect; normal -D and -A flags still apply.

New Rules

Correctness

Suspicious

Restriction

Fixes

  • fix(linter): ignore anonymous functional components in arrays for eslint-plugin-react(jsx-key) by @maurice in #1858
  • Prioritize ignored paths when linting by @clarkf in #1878
  • feat(linter): handle more cases for const-comparisons by @camc314 in #1817
  • feat(semantic): allow reserved keyword defined in ts module block by @Dunqing in #1907
  • fix(parser): error on source larger than 4 GiB by @overlookmotel in #1860
  • fix(parser): fix incorrectly identified directives by @overlookmotel in #1885
  • fix(parser): terminate parsing if an EmptyParenthesizedExpression error occurs by @Dunqing in #1874
  • fix(semantic): remove duplicate errors in ModuleDeclaration::ImportDeclaration by @Dunqing in #1846
  • perf(linter): reduce the number of diagnostics for no_sparse_arrays by @camc314 in #1895

New Contributors

Full Changelog: oxlint_v0.0.22...oxlint_v0.1.1

oxlint v0.0.22

25 Dec 06:50
a1accdc
Compare
Choose a tag to compare

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

Screenshot 2023-12-17 at 21 18 34

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

Screenshot 2023-12-17 at 22 34 06

Performance

10 - 20% faster than the previous version.

Sampling from an internal codebase (119900 files) - Before 12.8s vs 11.2s after.

Improvements

Fixes

parser

New Contributors

Full Changelog: oxlint_v0.0.21...oxlint_v0.0.22