Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
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",
],
}
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/nursery': { 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
sparse clone the oxlint repository to have a local copy
pnpm clone
generates the rules from the sparse cloned Rust library, only for the latest version, new rules that haven't been released will not be included.
pnpm generate
build cjs and esm versions of the library
pnpm build
FAQs
Turn off all rules already supported by oxlint
The npm package eslint-plugin-oxlint receives a total of 20,477 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
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.