mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-09-28 13:13:37 +08:00
Bug: none Change-Id: Iebcc53c0f70a51242f22e4df167cd588b08cefcd Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6140633 Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org> Auto-Submit: Nikolay Vitkov <nvitkov@chromium.org>
1.6 KiB
1.6 KiB
ESLint JavaScript Plugin
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")
Installation
npm install @eslint/js -D
Usage
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
{
name: "your-project/recommended-rules",
files: ["**/*.js"],
rules: js.configs.recommended.rules
},
// apply recommended rules to JS files with an override
{
name: "your-project/recommended-rules-with-override",
files: ["**/*.js"],
rules: {
...js.configs.recommended.rules,
"no-unused-vars": "warn"
}
},
// apply all rules to JS files
{
name: "your-project/all-rules",
files: ["**/*.js"],
rules: {
...js.configs.all.rules,
"no-unused-vars": "warn"
}
}
]
License
MIT