Closed
Description
I think it would be useful to have some of the linter messages to be errors instead of warnings.
For example:
- no-undef (used undefined variable)
Sometimes I don't pay attention to lint warnings and then only see errors when they happen at runtime.
We could also format lint errors in a similar fashion babel loader reports, including code frame with location.
Metadata
Metadata
Assignees
Type
Projects
Relationships
Development
No branches or pull requests
Activity
gaearon commentedon Aug 26, 2016
Are there any lint warnings in CRA that you don’t pay attention to?
We tried to err on the side of only picking lint warnings that represent actual errors in 95% cases.
andreypopp commentedon Aug 26, 2016
Yes, no-unused-vars for example. It is pretty useful but doesn't prevent my code running so I don't bother fixing it while prototyping. Of course I still want it to be reported as I want to fix it before commit, for example.
gaearon commentedon Aug 26, 2016
Can you compile a list of which warnings you’d rather see as errors?
andreypopp commentedon Aug 26, 2016
Probably just no-undef for now as I validated it through my workflow. Not sure about others for now.
gaearon commentedon Aug 26, 2016
Send a PR please?
Promote no-undef to be treated as an error
Promote no-undef to be treated as an error (#669)
gaearon commentedon Sep 18, 2016
This should be fixed in 0.4.2.
Please verify!
andreypopp commentedon Sep 18, 2016
Works well, thanks!
Btw. love how it is easy to upgrade to the new version—just
npm install
you get new features!gaearon commentedon Sep 18, 2016
🍰
Promote no-undef to be treated as an error (facebook#669)