prc b6c02717e6 Upload complete no-internet building environment. | пре 1 година | |
---|---|---|
.. | ||
src | пре 1 година | |
LICENSE | пре 1 година | |
README.md | пре 1 година | |
package.json | пре 1 година |
Website | Configure ESLint | Rules | Contributing | Twitter | Chatroom
The beginnings of separating out JavaScript-specific functionality from ESLint.
Right now, this plugin contains two configurations:
recommended
- enables the rules recommended by the ESLint team (the replacement for "eslint:recommended"
)all
- enables all ESLint rules (the replacement for "eslint:all"
)npm install @eslint/js -D
Use in your eslint.config.js
file anytime you want to extend one of the configs:
import js from "@eslint/js";
export default [
// apply recommended rules to JS files
{
files: ["**/*.js"],
rules: js.configs.recommended.rules
},
// apply recommended rules to JS files with an override
{
files: ["**/*.js"],
rules: {
...js.configs.recommended.rules,
"no-unused-vars": "warn"
}
},
// apply all rules to JS files
{
files: ["**/*.js"],
rules: {
...js.configs.all.rules,
"no-unused-vars": "warn"
}
}
]
MIT