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