Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
eslint-plugin-oxlint
Advanced tools
Turn off all rules already supported by oxlint
. The rules are extracted from here.
See https://oxc.rs/blog/2023-12-12-announcing-oxlint.html
pnpm add eslint-plugin-oxlint --D
This plugin is optimized for flat config usage (eslint >= 9.0). See here for more details.
Example:
// eslint.config.js
import oxlint from 'eslint-plugin-oxlint';
export default [
...// other plugins
oxlint.configs['flat/recommended'], // oxlint should be the last one
];
If you are using legacy configuration (eslint < 9.0), you can use the following config:
// .eslintrc.js
module.exports = {
... // other config
extends: [
... // other presets
"plugin:oxlint/recommended",
],
}
oxlint.json
If you are using flat configuration (eslint >= 9.0), you can use the following config:
// eslint.config.js
import oxlint from 'eslint-plugin-oxlint';
export default [
..., // other plugins
...oxlint.buildFromOxlintConfigFile('./oxlint.json'),
];
Or build it by an oxlint.json
-like object:
// eslint.config.js
import oxlint from 'eslint-plugin-oxlint';
export default [
..., // other plugins
...oxlint.buildFromOxlintConfig({
categories: {
correctness: 'warn'
},
rules: {
eqeqeq: 'warn'
}
}),
];
buildFromOxlintConfigFile
is not supported for legacy configuration (eslint < 9.0).
And then you can add the following script to your package.json
:
{
"scripts": {
"lint": "npx oxlint && npx eslint"
}
}
configs: {
// recmmended only contains the `correctness` category
recommended: { plugins: [Array], rules: [Object] },
'flat/recommended': { rules: [Object] },
// all rules available
all: { plugins: [Array], rules: [Object] },
'flat/all': { rules: [Object] },
// turn eslint rules off by plugin
'flat/eslint': { rules: [Object] },
'flat/import': { rules: [Object] },
'flat/jest': { rules: [Object] },
'flat/jsdoc': { rules: [Object] },
'flat/jsx-a11y': { rules: [Object] },
'flat/nextjs': { rules: [Object] },
'flat/react': { rules: [Object] },
'flat/react-perf': { rules: [Object] },
'flat/tree-shaking': { rules: [Object] },
'flat/typescript': { rules: [Object] },
'flat/unicorn': { rules: [Object] },
// turn eslint rules off by oxlint category
'flat/pedantic': { rules: [Object] },
'flat/style': { rules: [Object] },
'flat/correctness': { rules: [Object] },
'flat/restriction': { rules: [Object] },
'flat/suspicious': { rules: [Object] }
}
You need to install both the oxc and eslint extensions
Generates the rules from installed oxlint version
pnpm generate
pnpm format
Tests the source code
pnpm test
FAQs
Turn off all rules already supported by oxlint
The npm package eslint-plugin-oxlint receives a total of 27,030 weekly downloads. As such, eslint-plugin-oxlint popularity was classified as popular.
We found that eslint-plugin-oxlint demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.