-
Notifications
You must be signed in to change notification settings - Fork 335
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
Overrides warnings not showing in problems pane #1059
Comments
Please see https://github.com/microsoft/vscode-eslint#settings-options especially the setting Please ping if this doesn't address your problem. |
Just to be clear: you need to run the task to get problems for all files using the Run Task command in VS Code. |
Sorry, updating my description for clarity:
|
@mcchong can you provide me with a GitHub repository I can clone that demos that. |
Specifically, looking at DemoComponent.tsx vs ImageCompressor.jsx Building with "npm run build" or the build task emits 2 linter warnings, one for the jsx file on line 64, and one for the tsx file on line 8. |
@mcchong I can not reproduce this. Running in the terminal gives: |
There is no file DemoComponent.tsx in the repository. |
Try cloning from here https://github.com/mcchong/react-image-compressor.git ? It's the forked repository under my account, master branch. The latest commit should be d785f00949794c1a80278112b2806939e26c9a6c, and DemoComponent.tsx is in src/components. I just tried cloning it myself and was able to reproduce.. |
But running |
Yes, I guess react-scripts build will run with different ESLint settings. You need to look into these script to find out which settings they use from where. The ESLint extension uses the same settings as the eslint command in the terminal. Let me know if you need further help. |
Were you able to reproduce the issue from the repo above? Both scripts seem to be using my .eslintrc file, but the eslint command seems to be missing some rules. |
Okay figured it out. There is an "eslintConfig" option in the package json that webpack uses that I didn't see. I made that consistent with the .eslintrc. Thanks for the tips. |
For anyone running into similar issues it looks like the issue is actually on react-scripts side: |
I am migrating from a javascript project to typescript, and have set up a eslintrc.yml file with the following overrides:
However, the warnings emitted by that overrides (which appear when building in the terminal) do not show in the problems pane. I can't figure how to enable them so I think this is a bug.
Some more details:
The text was updated successfully, but these errors were encountered: