react-scripts no longer prints ESLint warnings
See original GitHub issueDescribe the bug
After upgrading to react-scripts@4.0.2
, react-scripts start
no longer prints ESLint warnings (both to the terminal and browser console), while it still prints ESLint errors.
Did you try recovering your dependencies?
1.22.10
Which terms did you search for in User Guide?
None.
Environment
Environment Info:
current version of create-react-app: 4.0.1
running from /Users/erikmuller/.config/yarn/global/node_modules/create-react-app
System:
OS: macOS 11.2
CPU: (8) x64 Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
Binaries:
Node: 14.15.1 - ~/.nvm/versions/node/v14.15.1/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 6.14.8 - ~/.nvm/versions/node/v14.15.1/bin/npm
Browsers:
Chrome: 88.0.4324.150
Edge: Not Found
Firefox: 84.0.2
Safari: 14.0.3
npmPackages:
react: Not Found
react-dom: Not Found
react-scripts: Not Found
npmGlobalPackages:
create-react-app: Not Found
Steps to reproduce
- Make sure to have
"@typescript-eslint/no-unused-vars": "warn"
in the eslint config - Add unused variable somewhere in your code, e.g.
const x = 42
- Run
yarn react-scripts start
Expected behavior
React Scripts prints both ESLint errors and warnings.
Actual behavior
React Scripts only prints ESLint errors but no warnings.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:24
Top Results From Across the Web
eslint warnings no longer appear in create-react-app terminal
I know I have code that used to throw warnings, but now I always get the same message no matter what: Compiled successfully!...
Read more >Create-react-app not showing any eslint warnings/error (code ...
Hi, so I'm working on a couple of side projects and in every one of them, everything works great. In this one, (inside...
Read more >Find and fix problems in your JavaScript code - ESLint ...
ESLint fixes are syntax-aware so you won't experience errors introduced by traditional find-and-replace algorithms. Learn more about fixing problems ...
Read more >react-scripts | Yarn - Package Manager
react -scripts. #12245 fix: webpack noise printed only if error or warning (@Andrew47) · create-react-app. #11915 Warn when not using the latest version...
Read more >Using Prettier and ESLint to automate formatting and fixing ...
ESLint section. Linting and pretty-printing JavaScript code can help developers catch errors early, make code more legible, and improve ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m not sure if what happens to me is the same but, even though I have the ESLINT_NO_DEV_ERRORS (v4.0.2) env variable set to
true
, and the ESlint errors are transformed to ESlint warnings, the build is still not successful and I get a Failed to compile. message.For example, with this code:
And the rule:
I get the following console output:
And the following error in the App Overlay
What I understood about the ESLINT_NO_DEV_ERRORS env is that, even if I have ESlint errors in my code, those errors would be transformed to warnings and therefore the App compilation would be successful, printing those in console. Have I maybe misunderstood or is it possibly a bug?
This seems to be related to this release: https://github.com/webpack-contrib/eslint-webpack-plugin/releases/tag/v2.5.0
@miguelCT Running
npm i eslint-webpack-plugin@2.4.3 --save-dev -E
fixed it for me.