-
-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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
Cannot use .eslintignore
for generated files
#7339
Comments
Slightly related to #7295. I'll look into what it would take to support eslintignore and bring it up at the next maintainers meeting? I'm not sure if there's a reason we don't support it or if it just hasn't been implemented. |
@heyimalex Well, that's 2 years old and I don't see any discussion except "we don't do that". What if some views have changed on the problem? @Timer Please, what's your take on this after that time? And can you give it a serious thought and explain some actual reasoning? So far it seems it's just "inconvenient" and nothing else. It's hard to believe that such a trivial problem needs hard solutions. I do understand why you don't want to support Besides, it would kinda solve #6871 and people could disable ESlint for a whole project if they really want. |
I think it makes sense to re-evaluate whether this is viable, given that we are working towards allowing custom eslint configs. However it is a breaking change so it would only be included in a major release that might be a while away. |
I am not entirely sure how is it breaking considering its opt-in feature, but I am fine with it either way. Thanks for reopening. |
I too suggested removing this pesky Change should be fully backwards compatible. |
I would really love to use an Maybe this can be implemented without breaking backwards compatibility by requiring an additional env variable to be set? Maybe something like Edit: Since extending the ESLint config is still experimental maybe a breaking change is okay at this point? |
Came across this thread after scratching my head as to why I could customize eslint in my CRA app to my heart's desire using .eslintrc.js, but then being unable to compile due to .eslintignore being ignored. I think an env variable as suggested by @nphmuller is a good solution to offer this needed functionality before the long and distant CRA 4.0 is released. |
This should be resolved in 3.2.0 with 6f5221c. |
Describe the bug
When running
yarn start
, the ESLint errors are shown from files I have ignored with.eslintignore
and the app won't start.Did you try recovering your dependencies?
Reproducible in a fresh new project.
Which terms did you search for in User Guide?
eslintignore (yielded #6871)
Environment
Expected behavior
To ignore specified files from ESLint checks and start the app. Talking here mostly about generated files which we cannot just modify with the comment to disable eslint. The best course of action is to just ignore these.
Quite an exhaustive issue #6871 talks about customizing ESLint config, but not much of the mention of utilizing
.eslintignore
which isn't exactly huge customization and shouldn't be prohibited like that.I can use a workaround with
cra-override
, but I don't want to disable a conflicting rule for a whole project when the only a bunch of generated files is affected.Actual behavior
I have VSCode properly working with ESLint in the project. The specified file is correctly ignored there.
Reproducible demo
https://github.com/FredyC/cra-eslint-ignore
The text was updated successfully, but these errors were encountered: