-
Notifications
You must be signed in to change notification settings - Fork 26.8k
Closed
Labels
Description
Hey, I'm still getting up to speed on eslint and your implementation of shared config, so apologies if any of this feedback isn't quite right. And I'm happy to generate PRs for anything you think work addressing ...
env configured in 3 files ...
-
a.
'browser': true
b.'node': true
c.'amd': false
d.'mocha': false
e.'jasmine': false -
rules/node.js:
'node': true -
rules/es6.js:
'es6': false
issues
- Why is
legacy.jsdisablingamd,mocha, andjasmine? Aren't environments off until explicitly enabled? - Why is
legacy.jsenablingbrowserandnode? While these may be the most common usage contexts, that seems to overstep the role of this style-guide-based shared config, which might be used in a variety of circumstances. Even if that weren't the case, any "efficiency" gained in enabling both by default would seemingly be lost when most users then have to disable one or the other. Maybe I'm missing something? - Similarly - and this may seem like an odd question - why is
rules/node.jsenablingnode? The fact thatlegacy.jsextendsrules/node.js, and the fact that everything else extendslegacy.js, means thatnodeis always enabled. If the rules inrules/node.jsare "safe" to be included everywhere, I think it makes sense to keep that rule set in the chain of extensions, but then I don't think it makes sense for theenvto be configured in there. If the rules inrules/node.jsare NOT "safe" to be included everywhere, its place in the extension chain needs to be altered, at which point, it might end up making sense to leave theenvconfig in there, similar to howes6envconfig makes sense as you have it, in a rule set only included in an extension chain used by those intending to usees6. - Depending on how you respond to the prior 2 issues, this might be moot, but it seems redundant that
nodeenvis enabled in bothlegacy.jsandrules/node.js.