-
-
Notifications
You must be signed in to change notification settings - Fork 381
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
Add recommended-browser
& recommended-node
configs
#298
Comments
We might also want a third config, that has no environment specific rules enabled. |
Why? In Node.js, the browser rules do nothing, and same the other way around. |
For instance, I also don't see any downsides to splitting the config, since the external API stays backwards compatible. Wouldn't have any hard feelings, if you disagree though. |
Sounds good. I was just curious about the use-case. PR welcome. |
You can use DOM API in backend code. Maybe we better add an exception to these rules? What kind of code leads to false positives? |
Unfortunately I can't exactly recall the code that caused it. I also think that adding an exception is pretty much impossible, since ESLint is not type-aware. :/ For the few cases where you actually want to use the DOM API in backend code, I personally would rather opt-in to these rules by adding the specific config for these directories. |
I agree, if you want DOM in Node.js, you just |
Another option is to make the rules check |
Assuming you would want to use DOM API in Node, would you set the env to |
I would like to split up the
recommended
config intorecommended-browser
andrecommended-node
.recommended
would then just be a merge of both.Happy to submit a PR, if appreciated. 😊
The text was updated successfully, but these errors were encountered: