facebook / create-react-app

Set up a modern web app by running one command.
https://create-react-app.dev
MIT License
102.62k stars 26.79k forks source link

Use ESLint new flat config system #13271

Open filetvignon opened 1 year ago

filetvignon commented 1 year ago

Is your proposal related to a problem?

ESLint is deprecating its current config system and moving to a new one.

Blog post: https://eslint.org/blog/2022/08/new-config-system-part-1/ Docs: https://eslint.org/docs/latest/use/configure/configuration-files-new

I can't find a way to make CRA eslint rules to work with the new config system.

connorjs commented 1 year ago

Quick note for consumers that want to move to flat config. I think this works.

  1. Set up plugins.
  2. Include rules. The overrides[0] is TypeScript specific.
plugins: {
    flowtype: flowtypePlugin,
    "jsx-a11y": jsxA11y,
    react: reactPlugin,
    "react-hooks": reactHooks,
},
rules: {
    ...reactAppConfig.rules,
    ...reactAppConfig.overrides[0].rules,
},
lmeysel commented 6 months ago

still no progress :( eslint v9 makes flat config to be the default format and deprecates .eslintrc

bayasdev commented 5 months ago

still no progress :( eslint v9 makes flat config to be the default format and deprecates .eslintrc

+1