oxlint_v0.2.0
版本发布时间: 2024-01-12 23:16:04
oxc-project/oxc最新发布版本:oxlint_v0.9.10(2024-10-08 13:45:46)
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 https://github.com/oxc-project/oxc/pull/1931
- google-font-preconnect by @camc314 in https://github.com/oxc-project/oxc/pull/1932
- inline-script-id by @camc314 in https://github.com/oxc-project/oxc/pull/1933
- next-script-for-ga by @camc314 in https://github.com/oxc-project/oxc/pull/1934
- no-assign-module-variable by @camc314 in https://github.com/oxc-project/oxc/pull/1935
- no-async-client-component by @camc314 in https://github.com/oxc-project/oxc/pull/1936
- no-css-tags by @camc314 in https://github.com/oxc-project/oxc/pull/1937
- no-head-import-in-document by @camc314 in https://github.com/oxc-project/oxc/pull/1957
- no-img-element by @camc314 in https://github.com/oxc-project/oxc/pull/1951
- no-script-component-in-head by @camc314 in https://github.com/oxc-project/oxc/pull/1954
- no-sync-scripts by @camc314 in https://github.com/oxc-project/oxc/pull/1953
- no-title-in-document-head by @camc314 in https://github.com/oxc-project/oxc/pull/1952
Vscode
- support vue, astro and svelte by @IWANABETHATGUY in https://github.com/oxc-project/oxc/pull/1923
New Rules
correctness
- react: require-render-return by @kaykdm in https://github.com/oxc-project/oxc/pull/1946
- react: no-direct-mutation-state by @zhangrunzhao in https://github.com/oxc-project/oxc/pull/1892
- typescript: triple-slash-reference by @kaykdm in https://github.com/oxc-project/oxc/pull/1903
- jsx-a11y: role-support-aria-props by @re-taro in https://github.com/oxc-project/oxc/pull/1961
- jsx-a11y: role-has-required-aria-props rule by @yossydev in https://github.com/oxc-project/oxc/pull/1881
- jsx-a11y: autocomplete-valid by @yossydev in https://github.com/oxc-project/oxc/pull/1901
restriction
- react: no-unknown-property by @XantreGodlike in https://github.com/oxc-project/oxc/pull/1875
style
- jest: no-test-return-statement by @eryue0220 in https://github.com/oxc-project/oxc/pull/1979
Fixes
Linter
- always print without considering the
--max-warnings
option by @Boshen in https://github.com/oxc-project/oxc/pull/1996 - support vue generic component by @Boshen in https://github.com/oxc-project/oxc/pull/1989
- Support cases where aria-hidden includes expressions by @keita-hino in https://github.com/oxc-project/oxc/pull/1964
- allow eslintrc to add rule when overriding by @fi3ework in https://github.com/oxc-project/oxc/pull/1984
- fix plugin name parsing when reading config file by @haocheng6 in https://github.com/oxc-project/oxc/pull/1972
- handle anonymous functional components in arrays that have a function body by @maurice in https://github.com/oxc-project/oxc/pull/1983
Parser
- unexpected ts type annotation in get/set by @Dunqing in https://github.com/oxc-project/oxc/pull/1942
Improvements
- Parser is 10% faster than the previous version
- only allocate for escaped template strings by @Boshen in https://github.com/oxc-project/oxc/pull/2005
- reduce
Token
size from 32 to 16 bytes by @Boshen in https://github.com/oxc-project/oxc/pull/1962 - reduce work parsing regexps by @overlookmotel in https://github.com/oxc-project/oxc/pull/1999
- remove
TokenValue::BigInt
fromToken
by @Boshen in https://github.com/oxc-project/oxc/pull/1924 - remove
TokenValue::Number
fromToken
by @Boshen in https://github.com/oxc-project/oxc/pull/1945 - remove
TokenValue::RegExp
fromToken
by @Boshen in https://github.com/oxc-project/oxc/pull/1926 - remove string builder from number parsing by @Boshen in https://github.com/oxc-project/oxc/pull/2002
New Contributors
- @bmeck made their first contribution in https://github.com/oxc-project/oxc/pull/1950
- @leaysgur made their first contribution in https://github.com/oxc-project/oxc/pull/1965
- @keita-hino made their first contribution in https://github.com/oxc-project/oxc/pull/1964
- @kaykdm made their first contribution in https://github.com/oxc-project/oxc/pull/1946
- @underfin made their first contribution in https://github.com/oxc-project/oxc/pull/1967
- @fi3ework made their first contribution in https://github.com/oxc-project/oxc/pull/1984
- @luhc228 made their first contribution in https://github.com/oxc-project/oxc/pull/1993
Full Changelog: https://github.com/oxc-project/oxc/compare/oxlint_v0.1.2...oxlint_v0.2.0
1、 oxlint-darwin-arm64 5.1MB
2、 oxlint-darwin-arm64.tar.gz 2.19MB
3、 oxlint-darwin-x64 5.76MB
4、 oxlint-darwin-x64.tar.gz 2.38MB
5、 oxlint-linux-arm64 6.39MB
6、 oxlint-linux-arm64.tar.gz 2.47MB
7、 oxlint-linux-x64 7.41MB
8、 oxlint-linux-x64.tar.gz 2.72MB
9、 oxlint-win32-arm64.exe 4.68MB
10、 oxlint-win32-arm64.zip 2.01MB
11、 oxlint-win32-x64.exe 5.3MB
12、 oxlint-win32-x64.zip 2.11MB