-
-
Notifications
You must be signed in to change notification settings - Fork 27k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Eslint Auto fix #1597
Comments
Which rules would it be valuable for? Our lint rules don't include any style rules, so I'm not sure anything we report is autofixable. I also heard reports of autofix not working well with eslint-loader, causing infinite cycles. For enforcing style, I would instead suggest Prettier. Does this help? |
I am not sure what rules are used in this project. but if there are not there I will add them in eslint.js Rules that the auto fix was useful for me is (you can see that all rules are fixable) jsx-indent it's very convenient that it auto fix my stuff. can we add it? |
I don't quite understand what you're asking. Before ejecting, you can't change the ESLint config. Our ESLint config does not contain any style rules, as I said earlier. This is intentional, and briefly discussed at the end of #808. I recommend using Prettier to enforce style, if you want to. |
I don't want to use Prettier, I just want to turn on Auto fix in eslint. I added some rules in my own custom eslint config. and I Can't turn on eslint auto fix. |
Sorry, it is not clear from your comments what you problem is. You didn't specify whether you ejected or not, what have you tried, what exactly didn't work, etc. It is very hard to help if you give so little information. |
I didn't eject. everything is working, I am not reporting a bug. I didn't try to turn on Eslint fix option because there is no way to do that without eject. I am asking for an ability to turn on Eslint fix without ejecting I Understand that your ESLint config does not include style rules. I added style rules manually (no eject, only by adding .eslintrc to my project as discussed at #808) I understand that there is reports of autofix not working well with eslint-loader, causing infinite cycles, but for me its working fine (we have 50 engineers working with it) so Thats why I want the fix flag to be configurable (default off) so we can decide if to use it. |
Okay, I understand better now. This is not really supported. If you add your own style rules, then please also manually run |
I understand that there is reports of autofix not working well with eslint-loader, causing infinite cycles, but for me its working fine for me (we have 50 engineers working with it) so Thats why I want the fix flag to be configurable (default off) so we can decide if to use it. adding run eslint --fix will not help, because I Will need to run it every time I change my code. please consider adding it, its a very minor change. 👍 |
It is not a minor change if it breaks in some cases, and people can't turn it off. I understand your concerns but using a custom I'm sorry if this is frustrating to you. |
If you need modifications like this, consider making a fork for your company: #682 |
I think that using a custom .eslintrc is very important, is there an open discusstion on it?, so I will write done my opinion about it. |
Thanks, it's been discussed in #808 at length. Feel free to write here. |
so, there's no way to get autofix? |
can we make Eslint Auto fix configurable?
I like that when in watch mode, it fixes my eslint on the fly.
The text was updated successfully, but these errors were encountered: