-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Remove prettier from eslint-config-react-native-community #26903
Comments
Why does React-Native force developers to use prettier by default? Why add dependencies unnecessarily? IMO, we should remove prettier eslint configuration by default and let developers add it if required. It shouldn't be the other way where react-native adds it by default and users have to disable it if not required. Already react-native takes lot of effort to start a simple project and run for new developers, why then add more configurations. Let's keep it simple and clean. |
I agree with @ravirajn22. Why is prettier enabled by default? Seems to conflict with rules within the eslint config. |
Absolutely hate the fact that the cli is shipping with preset eslint/prettier rules. I had both of them conflicting about whether to use double or single quotes. |
I really love prettier & use it on every projects since the first day I tried that. But this "prettier" rules are really annoying, especially if prettier is setup in your IDE and/or as precommit hook. The goal of prettier is to help you "NOT CARE ABOUT STYLING". The prettier and all styles rules enabled by Please please remove all styles rules OR remove prettier & prettier rules, but be consistant. Encouraging prettier + adding unecessary/annoyings styles rules is a very awkward situation... |
Until a decision is made for those wanting to get "most of this config except prettier stuff", you can Install eslint-config-prettier And use this config module.exports = {
root: true,
extends: [
'@react-native-community/eslint-config',
'eslint-config-prettier',
],
rules: {
'prettier/prettier': 0,
},
}; |
As a follow-up to @MoOx - Prettier was still issuing linting errors with my editor. I solved it with an additional step. I created a
Cheers. |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions. |
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information. |
I'm still seeing these issues. The standard prettier config blended with react-native-community's eslint contradict eachother. If I format a document it breaks prettier's rules |
Prettier eslint rules should be removed. Prettier is to forget about formatting, not to paint your code with red underlines everywhere. |
This would disable prettier all together, wouldn't it. The goal should be to get rid of the eslint plugin. |
Hi.
I use prettier as a plugin in my code editor (Sublime Text), and use eslint-config-prettier to disable formatting rules from Eslint. But eslint keep popping up a lot of formatting rules. After some time searching i found that the origin of these rules was the prettier plugin in the eslint-config-react-native-community package.
I don't know why these rules are in this package, but i think they don't need to be there.
Steps to reproduce:
Follow the configuration tutorial in the readme page:
https://github.com/facebook/react-native/blob/master/packages/eslint-config-react-native-community/README.md
Run the bellow command to check the enabled rules:
yarn eslint --print-config *.tsx (replace *.tsx with your project file format)
Output:
These are the enabled plugins with the extension.
Now i disabled it and run the print-config again:
As you can see, these plugins are added by the @react-native-community extension:
The text was updated successfully, but these errors were encountered: