-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Is there a silent version of "detect" ? #2276
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
Comments
I certainly think that it shouldn't need to warn more than once; we should fix that. However, if you ask for detection (and you have a react-specific eslint plugin activated in your eslint config), why would you not have react installed? |
I really like My preference would be to have a single plugin configuration representing my viewpoints, which I could use on both react and non-react projects. I don't want to make multiple configs within the repo, even though eslint has facilities for that, because I already use that for other things and would quickly face a combinatorial explosion As stands, my shared config works, but is noisy solely on this plugin. |
My preferred preconfig involves the invocation of a great many extension plugins |
I'm happy to push a fix that ensures the warning only fires once; I don't think it's reasonable to support a one-size-fits-all config, since that's not really something the ecosystem typically does. |
bummer :( most of my other tools do. this would be a pretty big ergonomics win for me but i guess it's your choice |
I have the same use case as @StoneCypher – a config that’s mostly meant for React projects, but that I find useful to occasionally use for not-React code – and was also looking for a way to silence "detect". It looks like the best alternative for this is to override the setting back to |
I just made a matrix of configs :( |
My team is facing the same issue we have mostly non-react cases and this is noisy for them. 1 warning is still too much when it is the only warning. |
If I have
settings: { react: { version: "16" }}}
(or whatever) in my project, and the project doesn't actually have React installed,eslint-plugin-react
is silent. I believe that this is correct behavior.If I have
settings: { react: { version: "detect" }}}
in my project, and the project doesn't actually have React installed, I receive (repeatedly) a warning:Thing is, I use
eslint
's plugin configuration setup, meaning that I have the same config for all my projects, whether they have react in them or not.If I have them all set to the same version of
react
, everything is fine. But if I ask for detection, then every project I have that doesn't have react starts yelling at me.I would like to ask for one of two things, please
detect
to be as quiet as a version number absent react, ordetect
, egdetect-silent
, which shuts upThanks for your time
The text was updated successfully, but these errors were encountered: