Releases: oxc-project/oxc
oxlint v0.5.1
oxlint v0.5.0
[0.5.0] - 2024-06-27
Features
- 3ae2628 linter: Change
no-import-assign
to correctness (#3928) (Boshen) - a89d501 linter: @typescript-eslint/no-non-null-asserted-nullish-coalescing (#3850) (kaykdm)
- fc48cb4 linter: eslint-plugin-jest/prefer-jest-mocked (#3865) (cinchen)
- 328445b linter: vitest/no-disabled-tests (#3717) (mysteryven)
- 8c61f9c linter: @typescript-eslint/no-non-null-assertion (#3825) (kaykdm)
- 9493fbe linter: oxc/no-optional-chaining (#3700) (mysteryven)
- 139adfe linter: @typescript-eslint/no-import-type-side_effects (#3699) (mysteryven)
- 5f84500 linter: react/prefer-es6-class (#3812) (Jelle van der Waa)
- fafe67c linter: max-dependencies (#3814) (Jelle van der Waa)
Bug Fixes
Refactor
oxlint v0.4.4
[0.4.4] - 2024-06-14
Highlights
Sort imports via oxlint --fix -D sort-imports
Features
- 8f5655d linter: Add eslint/no-useless-constructor (#3594) (Don Isaac)
- 29c78db linter: Implement @typescript-eslint/explicit-function-return-type (#3455) (kaykdm)
- 21d3425 linter: Typescript-eslint no-useless-empty-export (#3605) (keita hino)
- 85c3b83 linter: Eslint-plugin-jest/max-nested-describes (#3585) (cinchen)
- 046ff3f linter/eslint: Add
no_unreachable
rule. (#3238) (rzvxa) - e32ce00 linter/jsdoc: Implement require-param-name rule (#3636) (Yuji Sugiura)
- 110661c linter/jsdoc: Implement require-param-description (#3621) (Yuji Sugiura)
- d6370f1 linter/jsdoc: Implement require-param-type rule (#3601) (Yuji Sugiura)
Bug Fixes
- f0b689d linter: Panic in jsdoc/require-param (#3590) (Don Isaac)
oxlint v0.4.3
[0.4.3] - 2024-06-07
Features
- 1fb9d23 linter: Add fixer for no-useless-fallback-in-spread rule (#3544) (Don Isaac)
- 6506d08 linter: Add fixer for no-single-promise-in-promise-methods (#3531) (Don Isaac)
- daf559f linter: Eslint-plugin-jest/no-large-snapshot (#3436) (cinchen)
- 4c17bc6 linter: Eslint/no-constructor-return (#3321) (谭光志)
- 4a075cc linter/jsdoc: Implement require-param rule (#3554) (Yuji Sugiura)
- 747500a linter/jsdoc: Implement require-returns-type rule (#3458) (Yuji Sugiura)
- 6b39654 linter/tree-shaking: Support options (#3504) (Wang Wenzhe)
Bug Fixes
oxlint v0.4.2
What's Changed
Linter
require-await
by @todor-a in #3406eslint-plugin-unicorn/no-magic-array
flat depth by @camc314 in #3411@typescript-eslint/consistent-indexed-object-style
by @todor-a in #3126oxc/no-async-await
rule by @mysteryven in #3438oxc/no-const-enum
rule by @mysteryven in #3435oxc/no-rest-spread-properties
rule by @mysteryven in #3432eslint-plugin-jest/prefer-hooks-on-top
by @eryue0220 in #3437eslint-plugin-jest/require-top-level-describe
by @eryue0220 in #3439no-div-regex
by @jelly in #3442no-useless-concat
by @jelly in #3363- prefer-string-starts-ends-with: accept more valid regex by @magic-akari in #3408
Parser
New Contributors
Full Changelog: oxlint_v0.4.1...oxlint_v0.4.2
oxlint v0.4.1
What's Changed
The previous version refactored some parsing code around arrow expressions, which failed to parse the following snippet correctly
(/\./.exec())
Full Changelog: oxlint_v0.4.0...oxlint_v0.4.1
oxlint v0.4.0
Potential Breaking Changes
enforce rule severity from the cli and configuration file by @Boshen in #3337
The --deny
or -D
flag in the CLI, and the "error"
severity setting in the configuration file will now set linter diagnostics to be an "error" and exit the program with exit code 1.
Previously, these flags had no effect, and all linter diagnostics were reported as warnings.
This means in CI, oxlint --deny-warnings
is no longer needed for exit code 1 if oxlint -D correctness
is set.
To restore the previous "report as warning" behaviour, the --warn
or -W
flag is added to the CLI, and the "warn"
severity in the configuration file will take into effect.
merge deepscan rules into oxc rules by @Boshen in #3327
deepscan
rules are now "oxc" rules, because there is no "deepscan" plugin in the eslint ecosystem and this caused some confusion.
Ecosystem CI
We added the Oxlint Ecosystem CI
to maximize ecosystem compatibility, reduce churn, and minimize break-after-release
New Features
--disable-oxc-plugin
by @Boshen in #3328--disable
-react/unicorn/typescript-plugin
by @Boshen in #3305
The default rule set enables some plugins by default, the following CLI arguments are added for disabling them:
--disable-react-plugin
--disable-unicorn-plugin
--disable-oxc-plugin
--disable-typescript-plugin
New Rules
Two notable new rules that are under experiment but worth a try:
No Barrel File
oxlint --import-plugin -D no-barrel-file
Loading a lot of modules is slow for runtimes and bundlers.
To change the threshhold:
oxlint -c oxlintrc.json --import-plugin -D no-barrel-file
{
"rules": {
"oxc/no-barrel-file": ["error", {
"threshold": 10
}]
}
}
See Speeding up the JavaScript ecosystem - The barrel file debacle for background reading.
Rule of Hooks
oxlint -D rules-of-hooks
Enforce the React Rules of Hooks.
eslint-plugin-jest/no-duplicate-hooks
by @eryue0220 in #3358default-case
rule by @jelly in #3379no-new
by @jelly in #3368prefer-exponentiation-operator
by @jelly in #3365symbol-description
by @jelly in #3364jsdoc/require-returns-description
by @leaysgur in #3397
Bug Fixes
- fix(linter): avoid infinite loop in
jest/expect-expect
by @mysteryven in #3332 - fix(linter): avoid infinite loop when traverse ancestors in
jest/no_conditional_expect
by @mysteryven in #3330 - fix(linter): fix panic in jest/expect-expect by @Boshen in #3324
- fix(linter/jsx-no-undef): check for globals when an identifier is undefined by @Boshen in #3331
- fix(linter/next): false positives for non-custom font link by @Dunqing in #3383
Performance Improvements
- perf(lexer): use bitshifting when parsing known integers by @DonIsaac in #3296
- perf(linter): use
usize
forRuleEnum
hash by @Boshen in #3336 - perf(parser): more efficient number parsing by @overlookmotel in #3342
- perf(parser): use
FxHashSet
fornot_parenthesized_arrow
by @Boshen in #3344 - perf(parser): improve
parse_simple_arrow_function_expression
by @Boshen in #3349 - perf(parser): improve expression parsing by @Boshen in #3352
- perf(parser): improve is_parenthesized_arrow_function_expression by @Boshen in #3343
What's coming next
- Published JSON schema for configuration file
- More features to the configuration file
- Automatically synced and never outdated documentation website pages
Full Changelog: oxlint_v0.3.5...oxlint_v0.4.0
oxlint v0.3.5
What's Changed
- feat(linter): add use-isnan fixer for (in)equality operations by @DonIsaac in #3284
- feat(linter/eslint): Implement fixer for unicode-bom rule by @jelly in #3259
- fix(linter/no-direct-mutation-state): false positive when class is declared inside a
CallExpression
by @Boshen in #3294 - fix(parser): parse
DecoratorCallExpression
whenArguments
containsMemberExpression
by @Boshen in #3265 - perf(ast): inline all
ASTBuilder
methods by @Boshen in #3295 - perf(lexer): dedupe numeric separator check by @DonIsaac in #3283
- perf(linter): rewrite react/require-render-return by @mysteryven in #3276
New Contributors
Full Changelog: oxlint_v0.3.4...oxlint_v0.3.5
oxlint v0.3.4
What's Changed
- feat(linter): move react/rules_of_hooks to nursery
- feat(linter/eslint): Implement max-classes-per-file by @jelly in #3241
Full Changelog: oxlint_v0.3.3...oxlint_v0.3.4
From v0.3.3
What's Changed
Features
- add
--symlinks
to allow symbolic walking by @Boshen in #3244 - add
--format github
for github check annotation by @Boshen in #3191 - change the category of all react-perf rules to perf by @Dunqing in #3243
- remove deprecated eslint v9 rules
no-return-await
andno-mixed-operators
by @Boshen in #3188 - move prefer-node-protocol to restriction by @Boshen in #3171
New Rules
- react/rules-of-hooks by @rzvxa in #3071
- eslint/radix by @KubaJastrz in #3167
- eslint/no-new-native-nonconstructor by @Boshen in #3187
- eslint/unicode-bom by @jelly in #3239
- eslint/no-empty-function rule by @jelly in #3181
- eslint-plugin-next/no-duplicate-head by @Boshen in #3174
- eslint-plugin-next/no-page-custom-font by @Dunqing in #3185
- eslint-plugin-next/no-styled-jsx-in-document by @Dunqing in #3184
- unicorn/no-anonymous-default-export by @1zumii in #3220
Bug Fixes
- improve
prefer-string-starts-ends-with
rule by @camc314 in #3176 - import/export: improve multiple exports error message by @Dunqing in #3160
- import/named: handle
import { default as foo }
by @Boshen in #3255 - shorten eslint/eqeqeq rule error message's span by @mysteryven in #3193
- fix(parser): correctly parse cls.fn = x by @Dunqing in #3208
New Contributors
- @KubaJastrz made their first contribution in #3167
- @1zumii made their first contribution in #3220
Full Changelog: oxlint_v0.3.2...oxlint_v0.3.3
oxlint v0.3.3
What's Changed
Features
- add
--symlinks
to allow symbolic walking by @Boshen in #3244 - add
--format github
for github check annotation by @Boshen in #3191 - change the category of all react-perf rules to perf by @Dunqing in #3243
- remove deprecated eslint v9 rules
no-return-await
andno-mixed-operators
by @Boshen in #3188 - move prefer-node-protocol to restriction by @Boshen in #3171
New Rules
- react/rules-of-hooks by @rzvxa in #3071
- eslint/radix by @KubaJastrz in #3167
- eslint/no-new-native-nonconstructor by @Boshen in #3187
- eslint/unicode-bom by @jelly in #3239
- eslint/no-empty-function rule by @jelly in #3181
- eslint-plugin-next/no-duplicate-head by @Boshen in #3174
- eslint-plugin-next/no-page-custom-font by @Dunqing in #3185
- eslint-plugin-next/no-styled-jsx-in-document by @Dunqing in #3184
- unicorn/no-anonymous-default-export by @1zumii in #3220
Bug Fixes
- improve
prefer-string-starts-ends-with
rule by @camc314 in #3176 - import/export: improve multiple exports error message by @Dunqing in #3160
- import/named: handle
import { default as foo }
by @Boshen in #3255 - shorten eslint/eqeqeq rule error message's span by @mysteryven in #3193
- fix(parser): correctly parse cls.fn = x by @Dunqing in #3208
New Contributors
- @KubaJastrz made their first contribution in #3167
- @1zumii made their first contribution in #3220
Full Changelog: oxlint_v0.3.2...oxlint_v0.3.3