-
-
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
Only show lint warnings from most recently edited file in browser console #2378
Comments
I'm wondering if this helps with the complaint from tnrich in that linked thread. If the developer is commenting out stuff or w/e, saving and looking back to the browser - the changes (and thus, the output that annoys him) is going to come from that last edited file. Aren't those errors the ones he doesn't want to see in the console? |
We can cap it to maximum 5 warnings per file, for example. They would still be there but they would be more relevant, and limited. |
Wouldn't that be confusing if you have more than five and are only displaying five of them? As in, wouldn't capping the number defeat the purpose of having them there in the first place? I guess my pondering is whether displaying the linting errors in the console is to let the user know that he HAS errors or that he has these EXACT errors. I'm wondering if we should leave this alone and let it stay as is :) |
We can debate whether to cap them or not, but I think displaying them just for most recently edited file is a good start by itself. |
@svicalifornia Nope, see #2409 |
Not yet. We'll do a cleanup pass some time after releasing React 16. For now most of my effort is focused on React. |
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 7 days if no further activity occurs. |
@gaearon Now that React 16 and CRA 2 are out, can we revisit this issue? |
Is this being worked on? |
Hello, now we have an infinite recursion in react-dev-utils. It is using console to warn about usage of console. So it should complain about it's own console usage also (using console) and then complain about it's own console usage also (using console)... :) Currently I have all linter messages in the terminal in the output of "yarn start" and am happy with them there. The output from webpackHotDevClient.js is only making my debugging and experimenting harder. Would it be possible to respect the 'no-console' best practice and stop writing there completely? https://eslint.org/docs/rules/no-console |
can we just have an option to disable eslint console logs and that's it? I use eslint in IDE setup, it's logging stuff on terminal, errors are shown full screen, during build it logs errors on build machine and stops the production build if there are issues but polluting console with all those warnings is just a mess in my case. I need those warnings in IDE to highlight potential issues, but mostly i don't care about that warning. I use eslint to warn about sketchy code and throw errors about code which is potentially broken or may be broken in some case. Could be an option to enable eslint and default is whatever is now, but there would be a way to disable. and whatever extras like "recent file only" "limit to 5 warnings per file" and so on are just extension on main options - to log or not to log those warning at all |
Huge +1 to @liesislukas. I tried to configure my webpack config through From what I've seen, people in my team interact with lints in the editor first, the "Problems" tab on VSCode second and the terminal third— not the browser. I don't doubt this might be useful for some people, but for us it in fact detrimental, since we do a lot of our debugging via console logging. Rather than blocking a solution on the harder problem of filtering by recently-edited files, some immediate impact for many teams like mine would be an environment flag or some other mechanism to disable warnings in the browser outright. I'm so slowed down by this I'd be happy to add a flag for disabling the relay of warnings. Where can I learn about the HMR system and how to disable warnings @gaearon? |
This came up in discussion in #2070 (comment).
Seems like a sensible thing to do, although I'm not sure how hard it would be.
Tagging as good first bug but I don't have any ideas on how to do it.
The text was updated successfully, but these errors were encountered: