oxc/tasks/lint_rules
Cam McHenry e221ea3fb5
chore(tasks/lint_rules): sync rules with ESLint v9 (#6777)
The previous version of the `react-perf` ESLint plugin was holding us
back from updating this to ESLint V9. I've manually specified the ESLint
version here, because we want to make sure we are running the latest
major version of ESLint which changes a lot of things.

Also changed it so that rules which are not supported and also
implemented do not get counted twice in the total count. For example,
`eslint/no-with` is marked as not supported but it is still implemented.
This was previously counted for both, which made it look like we had an
additional rule implemented.
2024-10-22 20:14:10 +08:00
..
src chore(tasks/lint_rules): sync rules with ESLint v9 (#6777) 2024-10-22 20:14:10 +08:00
.gitignore chore(lint_rules): deprecated eslint no-dupe-args / no-octal / no-with 2024-02-02 17:33:54 +08:00
jsconfig.json
package.json chore(tasks/lint_rules): sync rules with ESLint v9 (#6777) 2024-10-22 20:14:10 +08:00
README.md

tasks/lint_rules

Task to update implementation progress for each linter plugin.

Usage:
  $ cmd [--target=<pluginName>]... [--update] [--help]

Options:
  --target, -t: Which plugin to target, multiple allowed
  --update: Update the issue instead of printing to stdout
  --help, -h: Print this help message

Environment variables GITHUB_TOKEN is required when --update is specified.

Design

  • Always install eslint-plugin-XXX@latest from npm
  • Load them through ESLint Node.js API
  • List all their plugin rules(name, deprecated, recommended, docs, etc...)
  • List all our implemented rules(name)
  • Combine these lists and render as markdown
  • Update GitHub issue body

FAQ

  • Why is this task written in Node.js? Why not Rust?
  • Why .cjs?
    • To keep dependencies as simple as possible
    • Some plugins only provide their module as CommonJS
    • So, CommonJS is the only way to go without bundling