Skip to content
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

Turn some of the linter messages into errors #498

Closed
andreypopp opened this issue Aug 26, 2016 · 8 comments
Closed

Turn some of the linter messages into errors #498

andreypopp opened this issue Aug 26, 2016 · 8 comments
Milestone

Comments

@andreypopp
Copy link
Contributor

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.

@gaearon
Copy link
Contributor

gaearon commented Aug 26, 2016

Sometimes I don't pay attention to lint warnings

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
Copy link
Contributor Author

andreypopp commented Aug 26, 2016

Are there any lint warnings in CRA that you don’t pay attention to?

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
Copy link
Contributor

gaearon commented Aug 26, 2016

Can you compile a list of which warnings you’d rather see as errors?

@andreypopp
Copy link
Contributor Author

Can you compile a list of which warnings you’d rather see as errors?

Probably just no-undef for now as I validated it through my workflow. Not sure about others for now.

@gaearon
Copy link
Contributor

gaearon commented Aug 26, 2016

Send a PR please?

@gaearon
Copy link
Contributor

gaearon commented Sep 18, 2016

This should be fixed in 0.4.2.
Please verify!

@andreypopp
Copy link
Contributor Author

Works well, thanks!

Btw. love how it is easy to upgrade to the new version—just npm install you get new features!

@gaearon
Copy link
Contributor

gaearon commented Sep 18, 2016

🍰

feiqitian pushed a commit to feiqitian/create-react-app that referenced this issue Oct 25, 2016
@lock lock bot locked and limited conversation to collaborators Jan 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants