-
-
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
react-scripts build ignores ESLint overrides #8683
Comments
|
Can confirm. Overriding rules has no effect. Went back to |
Issue #8266 was fixed in 3.4.1. The problem was that it was only checking the eslint overrides that would be applied to However, I have seen the issue you're describing. I've seen it work and I've seen it not work. Through fiddling with patching |
@nickretallack I discovered the same today in Going back to Waiting for someone from community to confirm on this issue. |
Hi @nickretallack @saileshkotha I tried changing it to false by manually editing it in node_modules/react-scripts/config/webpack.config.js. But when trying to run eslint it reverts the changes in .prettierrc and .eslintconfig.json, runs the lint and then reverts the changes. I am using VSCode. |
Same issue here. What I am curious about is what caused the regression between 3.4.0 and 3.4.1. Looking at the PRs quoted in the release notes, I don't see anything that should have changed the behaviour of caching. At the moment, I'm holding on 3.4.0. As for where eslint caches the files: |
I'm no expert, but my guess is that the issue was introduced by this change. The problem is that it's not busting the eslint cache when you change your |
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs. |
Configure ESLint to ignore errors in the dragdroptouch library. We do this by turning on create-react-app's support for ESLint customization. This support is currently marked as "experimental" in the documentation (https://create-react-app.dev/docs/setting-up-your-editor/#experimental-extending-the-eslint-config). There is currently a caching issue in create-react-app that causes previous ESLint configurations to interfere with future runs. A workaround is to delete the 'node_modules/.cache/eslint-loader' directory. See: - facebook/create-react-app#8683 - https://webpack.js.org/loaders/eslint-loader/
same issue. i have an eslintrc.js file and the production build totaly ignores it |
same here |
Production build ignores |
Any news on this thread ? this bug is present since react-scripts 3.4.1. It's a shame it hasn't been fixed yet. |
still same issue on 3.4.3 |
Adding additional This issue is especially painful in CI pipelines. I strongly disagree with discrepancies between CI errors and local errors, but this is another story. |
Cannot override any of the @typescript-eslint properties.
versions:
I have in the packages json:
Also I have tried to apply setting by changing .eslintrc.json:
But @typescript-eslint/no-unused-vars" are still ignored. |
I have the same issue |
It's been half a year. Hope this will be prioritized soon. |
Still happens to me on 3.4.3 |
This helped me: I set |
Still happens to me |
This will probably fix it #9751. I ran a test project according to the contribution.md and that works as expected in regard to eslintrc and eslintignore. |
@ianschmitz updated react-scripts to 4.0.0 and tested in my project. With zero configuration changes, it is using .elintrc.json file. This can be closed. |
Bringing back #8266 as something that I'm experiencing now.
Describe the bug
I made a lint rule that applies everywhere but want to exclude it for a directory. ESLint supports the
overrides
option to achieve this butreact-scripts build
ignores that and applies the rule anyway withEXTEND_ESLINT=true
optionDid you try recovering your dependencies?
irrelevant
Which terms did you search for in User Guide?
extend eslint overrides lint
Environment
Steps to reproduce
EXTEND_ESLINT=true
to your invocation ofreact-scripts
overrides
propertyreact-scripts dev
orreact-scripts build
and see that CRA complains anywayExpected behavior
It respects the rule
Actual behavior
It doesn't
The text was updated successfully, but these errors were encountered: