-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use ESLint new flat config system #13271
Labels
Comments
Quick note for consumers that want to move to flat config. I think this works.
|
still no progress :( eslint v9 makes flat config to be the default format and deprecates .eslintrc |
+1 |
sergei-maertens
added a commit
to maykinmedia/open-archiefbeheer
that referenced
this issue
Jan 3, 2025
See CRA upstream issue: facebook/create-react-app#13271 Essentially, the eslint.config.mjs flat config is not picked up by CRA, and it tries to run it with its default configuration (especially now that .eslintrc.json is gone). The linter errors during builds on the main branch are turned into warnings (because of how the CRA shared config works) and currently they're ignore anyway - I suspect that's why CI=false is added in the frontend build in Github actions, as the default behaviour is to fail the build. Instead, the CI job now explicitly invokes 'npm run lint', which *will* error the build. 'npm start' also disables the eslint plugin which is a slightly worse developer experience, but the linting runs as a husky pre-commit hook so hopefully this is an acceptable tradeoff. ESLint flat config *is* the way forward and CRA is holding projects back - if it becomes too problematic I'd consider migrating to ViteJS.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The text was updated successfully, but these errors were encountered: