oxc/tasks/lint_rules
Yuji Sugiura 41fb7ef7e7
chore(tasks/lint_rules): Arrange UI (#2187)
Part of #2020

- [x] rule counters
- [x] show two tables
- [x] omit all the deprecated rules

Eventually I decided to split them into 3 tables.

In order to be aware of the newly deprecated rules in the future, the
deprecated rules are hidden by default, rather than omitted altogether.
2024-01-28 22:25:33 +08:00
..
src chore(tasks/lint_rules): Arrange UI (#2187) 2024-01-28 22:25:33 +08:00
.gitignore feat(tasks): Enable tasks/lint_rules(JS ver) (#2177) 2024-01-26 15:45:05 +08:00
jsconfig.json feat(tasks): Enable tasks/lint_rules(JS ver) (#2177) 2024-01-26 15:45:05 +08:00
package.json feat(tasks): Enable tasks/lint_rules(JS ver) (#2177) 2024-01-26 15:45:05 +08:00
README.md feat(tasks): Enable tasks/lint_rules(JS ver) (#2177) 2024-01-26 15:45:05 +08:00

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