-
-
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
Move Babel and ESLint configuration into package.json after ejecting #766
Comments
Why not ask for it? Example: |
What’s the benefit to separate files as opposed to |
I like to have each library configuration on its respective config file |
Less dotfiles FTW in my opinion. It's getting out of hand have a dotfile for all the things. Seems to make more sense to have all the configuration live in a single spot with key value pairs rather than distributing the concern to all these different dotfiles. |
You can always move it, it’s literally four lines: babel: {
presets: ['react-app']
},
eslintConfig: {
extends: 'react-app'
} I think this is a better default but once you eject, you can do anything you like. |
Yeah - and especially because CRA is targeted towards beginners, I can't tell you how much email I get from people who lose their dotfiles because no OS shows hidden files by default. |
Ok, agree, can I do it? :D |
Go for it @montogeek! |
I'm not sure if this is a good idea. I understand hidden files can be confusing beginners, but maybe the solution is not moving parts of the config to package.json, but teaching beginners to work with dotfiles. Dotfiles are still going to be the solution for any platform independent configuration files that are supposed to also work in non-JS projects where |
Those are system level dotfiles though, and that makes sense. Seems like for package specific ones it can eliminate confusion by keeping that configuration altogether? (no strong opinion here, just thoughts) :) |
I meant the project specific Anyway, I don't feel strongly about this either, and can't come up with reasons why config in package.json would be any worse than separate files. So why not. 😅 |
You project’s build won’t break if you miss |
Agreed, you convinced me. 👍 And unlike GraphQL or environment variables, Jest, ESLint and Babel are all JS specific things, so package.json also kind of makes sense for them. |
I'm glad that my decision to not make yet another dotfile for jest is getting some traction :) |
Fixed in #773. |
Update: claimed by @montogeek
Currently we emit
.babelrc
and.eslintrc
after ejecting.This is better than embedding them in Webpack config like before, but still not ideal.
I think we should embed Babel and ESLint configuration into
package.json
after ejecting.We already do this for Jest.
Relevant settings in
package.json
are calledbabel
andeslintConfig
.This issue is up for grabs. If you’d like to work on it please comment below so that multiple people don’t work on the same thing. Please respect it if somebody has already commented, and don’t try to submit a PR before them.
The text was updated successfully, but these errors were encountered: