RightCapitalHQ / frontend-style-guide

RightCapital's frontend style guide.
MIT License
7 stars 0 forks source link

ESLint v9 support #128

Open frantic1048 opened 4 months ago

frantic1048 commented 4 months ago

ESLint v9 has two major changes that affect us:

  1. Plugin API changes: Plugins need to be updated to support the new API.
  2. Defaults to new "Flat Config" format: Our config files need to be reorganized to match the new format.

To upgrade to ESLint v9, we need to:

  1. Update all the plugins to support the new API. Otherwise, consider replacing the plugin with alternatives.
  2. Reorganize the config files to match the new format.
  3. Upgrade upstream shared ESLint config to versions that support the new format. Otherwise, consider replacing the shared config with our own.
Note: Last updated on 2024-09-26. Name Type Details ESLint v9 Flat Config
eslint-config-prettier Config eslint-config-prettier N/A
airbnb[^2] Config eslint-config-airbnb-base[^2]
eslint-config-airbnb/rules/react[^1]
eslint-config-airbnb/rules/react-a11y[^2]
eslint-config-airbnb/hooks[^2]
@typescript-eslint Plugin
@rightcapital Plugin 🟨[^3] 🟨[^3]
eslint-plugin-import-x Plugin
eslint-plugin-jsx-a11y Plugin
eslint-plugin-react [^1] Plugin
eslint-react Plugin Replaces eslint-plugin-react[^1]
eslint-plugin-react-hooks Plugin
eslint-plugin-lodash Plugin
eslint-plugin-n Plugin
eslint-plugin-simple-import-sort Plugin
eslint-plugin-unicorn Plugin
@stylistic/eslint-plugin-js Plugin

Reference:

[^1]: eslint-plugin-react and eslint-config-airbnb/rules/react are deprecated in favor of eslint-react. See #156 [^2]: eslint-config-airbnb* are deprecated in favor of our own shared config. See #159, #160 [^3]: Compatible with FlatCompat from @eslint/eslintrc.

frantic1048 commented 1 week ago

ESLint v8 will reach end of life on October 5, 2024

We may utilize @eslint/compat to help upgrade most rules to ESLint v9 without modifying the upstream implementation.

Reference: ESLint v8 End of Life Announcement