Releases: oxc-project/oxc
oxlint v0.2.9
What's Changed
Linter
- unicorn: no-process-exit rule by @leaysgur in #2410
- typescript: ban-tslint-comment by @tudorbarbu in #2371
- jest: require-to-throw-message by @keita-hino in #2384
- jest: prefer-equality-matcher by @eryue0220 in #2358
- jest: detect jest file by default glob pattern by @mysteryven in #2408
- implement from_configuration for jsx-a11y autocomplete-valid by @tudorbarbu in #2404
Fixes
getter-return
false positive with TypeScript syntax by @Boshen in #2363- add missing typescript-eslint(_) prefix for some errors by @maurice in #2342
- jsx_a11y: Ensure plugin settings are used by @leaysgur in #2359
- jsx_a11y: Refactor jsx-a11y related utils and its usage by @leaysgur in #2389
Parser
- recover from
async x [newline] => x
by @Boshen in #2375 - fix incorrect parsing of class accessor property name by @Dunqing in #2386
- remove erroneous debug assertion by @overlookmotel in #2356
New Contributors
- @tudorbarbu made their first contribution in #2404
Full Changelog: oxlint_v0.2.8...oxlint_v0.2.9
oxlint v0.2.8
What's Changed
This release addresses a long-standing issue where the AST had memory leaks.
I can finally sleep well, knowing that my software is free of memory leaks 😀
Moreover, the parser is now 4% faster (again!), thanks to @overlookmotel's improvements.
New Rules
- Implement no_this_before_super with cfg by @TzviPM in #2254
- add typescript-eslint rule array-type by @luhc228 in #2292
Fixes
- add regression case for require-yield by @Boshen in #2326
- fix no_dupe_keys false postive on similar key names by @Boshen in #2291
Parser
- fix memory leak by implementing inlineable string for oxc_allocator by @Boshen in #2294
- fix BigInt memory leak by removing it by @Boshen in #2293
- perf: lexer replace
Chars
withSource
by @overlookmotel in #2288
Full Changelog: oxlint_v0.2.7...oxlint_v0.2.8
oxlint v0.2.7
What's Changed
This release fixes a critical bug where errors not being reported from finally
block of try/catch/finally.
New Rules
- implement @next/next/no-before-interactive-script-outsi… by @kaykdm in #2203
- implement @next/next/no-unwanted-polyfillio by @kaykdm in #2197
Features
- complete custom components setting by @hjiog in #2234
- ban
--fix
for variety files(vue, astro, svelte) by @mysteryven in #2189
Fixes
- Better report source line and col for multiline annotations by @maurice in #2242
- Better source line and column numbers by @maurice in #2213
- display target triple when error is thrown by @Boshen in #2259
- correct the span for irregular whitespaces by @Boshen in #2245
- jsx no undef match scope should check with ancestors by @xxleyi in #2027
Parser
- feat(ast): TypeScript definition for wasm target by @H-Plus-Time in #2158
- feat(ast): remove expression property from Function by @Dunqing in #2247
- feat(ast): remove generator property from ArrowFunction by @Dunqing in #2260
- feat(ast): remove serde skip for symbol_id and reference_id by @Dunqing in #2220
- perf(parser): faster offset calculation by @overlookmotel in #2215
- perf(parser): pad
Token
to 16 bytes by @overlookmotel in #2211
New Contributors
- @xxleyi made their first contribution in #2027
- @H-Plus-Time made their first contribution in #2158
- @TzviPM made their first contribution in #2210
Full Changelog: oxlint_v0.2.6...oxlint_v0.2.7
oxlint v0.2.6
What's Changed
VSCode
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
What's Changed
This release matched all linter rule names with their ESLint counterparts.
New Rules
- react: jsx-no-target-blank by @hjiog in #2149
- eslint: no-void by @eryue0220 in #2162
- jest: prefer-called-with by @eryue0220 in #2163
Fixes
New Contributors
Full Changelog: oxlint_v0.2.4...oxlint_v0.2.5
oxlint v0.2.4
oxlint v0.2.3
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
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
- eslint config jsonc support by @Boshen in #2121
- support eslint config in nextjs eslint by @kaykdm in #2107
- complete img-redundant linter by @msdlisper in #2112
Fixes
- cli: disallow path pointing to parent directories by @Boshen in #2125
- fix panic in prefer-native-coercion-function by @camc314 in #2100
- allow
[...new Array(n)]
in no-useless-spread by @Boshen in #2124 - not use
new_inline
with flexible str by @mysteryven in #2106
New Contributors
Full Changelog: oxlint_v0.2.2...oxlint_v0.2.3
oxlint v0.2.2
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
Try it out!
- Run
npx --yes oxlint@latest
from your terminal - Install the VSCode extension https://marketplace.visualstudio.com/items?itemName=oxc.oxc-vscode
- Read the usage guide
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
in0/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
Parser - 7% faster than the previous version
- perf(parser): reduce
Token
size from 16 to 12 bytes by @Boshen in #2010 - perf(parser): lexer byte handlers consume ASCII chars faster by @overlookmotel in #2046
- perf(parser): lexer match byte not char by @overlookmotel in #2025
- refactor(parser): lexer handle unicode without branch by @overlookmotel in #2039
- refactor(parser): remove extraneous code from regex parsing by @overlookmotel in #2008
- refactor(parser): remove noop code by @overlookmotel in #2028
Full Changelog: oxlint_v0.2.0...oxlint_v0.2.1
oxlint v0.2.0
Try it out!
- Run
npx --yes oxlint@latest
from your terminal - Install the VSCode extension https://marketplace.visualstudio.com/items?itemName=oxc.oxc-vscode
- Read the usage guide
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
- google-font-display by @camc314 in #1931
- google-font-preconnect by @camc314 in #1932
- inline-script-id by @camc314 in #1933
- next-script-for-ga by @camc314 in #1934
- no-assign-module-variable by @camc314 in #1935
- no-async-client-component by @camc314 in #1936
- no-css-tags by @camc314 in #1937
- no-head-import-in-document by @camc314 in #1957
- no-img-element by @camc314 in #1951
- no-script-component-in-head by @camc314 in #1954
- no-sync-scripts by @camc314 in #1953
- no-title-in-document-head by @camc314 in #1952
Vscode
- support vue, astro and svelte by @IWANABETHATGUY in #1923
New Rules
correctness
- react: require-render-return by @kaykdm in #1946
- react: no-direct-mutation-state by @zhangrunzhao in #1892
- typescript: triple-slash-reference by @kaykdm in #1903
- jsx-a11y: role-support-aria-props by @re-taro in #1961
- jsx-a11y: role-has-required-aria-props rule by @yossydev in #1881
- jsx-a11y: autocomplete-valid by @yossydev in #1901
restriction
- react: no-unknown-property by @XantreGodlike in #1875
style
- jest: no-test-return-statement by @eryue0220 in #1979
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
- only allocate for escaped template strings by @Boshen in #2005
- reduce
Token
size from 32 to 16 bytes by @Boshen in #1962 - reduce work parsing regexps by @overlookmotel in #1999
- remove
TokenValue::BigInt
fromToken
by @Boshen in #1924 - remove
TokenValue::Number
fromToken
by @Boshen in #1945 - remove
TokenValue::RegExp
fromToken
by @Boshen in #1926 - remove string builder from number parsing by @Boshen in #2002
New Contributors
- @bmeck made their first contribution in #1950
- @leaysgur made their first contribution in #1965
- @keita-hino made their first contribution in #1964
- @kaykdm made their first contribution in #1946
- @underfin made their first contribution in #1967
- @fi3ework made their first contribution in #1984
- @luhc228 made their first contribution in #1993
Full Changelog: oxlint_v0.1.2...oxlint_v0.2.0