cybozu / eslint-config

ESLint rules for Cybozu
MIT License
97 stars 7 forks source link

feat: Add support for ESLint 9 #797

Closed sajikix closed 2 months ago

sajikix commented 3 months ago

Outline

Added support for eslint v9. Specifically, I did the following.

  1. Update "eslint" and “@eslint/js” to v9
  2. Update plugins this pakcage is using
  3. Changed plugins that are not compatible with eslint v9 to alternative ones
  4. Resolve differences in ruleset created by changes in 2.
  5. Update test fixture due to API change by v9
  6. Add eslint v9 to peerDependency

Details

Update plugins this pakcage is using

Changed plugins that are not compatible with eslint v9 to alternative ones

Since eslint-plugin-import does not support eslint v9, we chose to use eslint-plugin-import-x (famous fork of eslint-plugin-import) instead.

Resolve differences in ruleset created by changes in 2.

There are changes in ruleset due to a major version update of typescript-eslint to v8.

Also, some rules were transferred from typescript-eslint to @stylistic

and, these rules are not disabled by eslint-config-prettier, so disable these two rules where eslint-config-prettier is used.

Update test fixture due to API change by v9

The eslint Node.js API has changed since FlatConfig became the default in eslint v9. Therefore, the fixture for rule-set testing was also changed to match this API change.

Update flat config type due to API change by v9

Change Linter.FlatConfig[] to Linter.Config[].

~awaiting~

~eslint-plugin-jsx-a11y~

→ Now eslint v9 support is complete.(2024/09/10)