-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
fix: simplify ESLint config to improve dependency management #2883
fix: simplify ESLint config to improve dependency management #2883
Conversation
The new |
Talked about this more in Slack - if we're open to dropping
In each case, the initial Ignite command worked, along with the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. I know you didn't modify it but mind removing the format
script from package.json
in boilerplate
? It seems to be a duplicate of lint
. Since we have lint:check
seems reasonable to keep lint
over format
## [10.1.3](v10.1.2...v10.1.3) (2025-01-12) ### Bug Fixes * **boilerplate:** simplify ESLint config ([#2883](#2883) by [@coolsoftwaretyler](https://github.com/coolsoftwaretyler)) ([2ab0092](2ab0092))
🎉 This PR is included in version 10.1.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Please verify the following:
yarn test
jest tests pass with new tests, if relevantyarn lint
eslint checks pass with new code, if relevantyarn format:check
prettier checks pass with new code, if relevantREADME.md
(or relevant documentation) has been updated with your changesDescribe your PR
In #2823, we added
--legacy-peer-deps
to thenpm
install script in order to try and resolve #2818 (issues with conflictingeslint-plugin-n
andeslint-config-standard
).I believe this led to some new bugs because of peer dependency resolution in npm, like #2840. We have also had some reports in Slack where people are getting confused because they need to use the
--legacy-peer-deps
flag on subsequent dependency installs.I was talking to @frankcalise yesterday about these plugins. They've been in Ignite for a while, and maybe it's simpler to eliminate eslint-plugin-n at this point. As far as I can tell, these are just extra rules for Node.js, which might not be very relevant in most React Native projects.
There was some support for slimming down linting configuration in this Slack thread from October. So I hope this PR aligns with that approach. I think it's reasonable to remove ESLint rules for Node.js in order to simplify a React Native project.
Alternative approach
If we want to keep using the standard config and the
eslint-plugin-n
, we need to useneostandard
, which requires ESLint v9. But we are blocked on adopting ESLint v9 until React Native settles on support for ESLint v9: facebook/react-native#43959, but that isn't ready yet.Screenshots (if applicable)
No screenshots since there are no real UI changes, but here are two Ignite commands I ran from my local branch:
Standard settings, but use
npm
as the packager (just testing this PR as a replacement fix for #2823)Standard settings, but use
npm
as the packager, and enable Expo Router (fixes #2840, which is related to expo/expo#29150)In both cases I ran
npm run android
andnpm run ios
from the project and Ignite started without issue.Failing with Yarn, now:
Now if I try to use yarn as my package manager, I end up with a new error after running
npx ignite-cli new yarncheck --yes
: