Closed MrSlide closed 7 years ago
This introduces two problems.
Up to you guys.
With Standard JS you can still define environments, which will define a preset of globals, or you can manually define global names to be ignored by the linter.
You can also define blocks of code that will have certain rules be ignored.
I've been using Standard JS as a linter while developing on the Impero web site and so far it hasn't pointed out any errors related to JSX. The only errors it has been pointing out are things like modules being loaded but never used.
That's strange... it definitely gave me warnings about JSX quotes (see: https://github.com/feross/eslint-config-standard/issues/27).
In Standard, to define the globals you (I think) have to either pollute the codebase or npm's package manifest. In which case... surely it's better to just put that configuration in a config file specifically for the linter a la ESLint?
Another concern is that if you choose to extend the template provided by this generator in the future, for example with TypeScript or something, then I'd expect Standard to have fewer supported plugins than ESLint, whereas with ESLint you can just extend right over the top of the Standard config.
Standard is just a set of rules for eslint. The point is to end debates about style. Having an extensible eslint config based on standard is not a bad idea but for the sake of simplicity of this generator I would favour to just use standard or maybe even have the option to choose.
As a global note about all these discussions I think we should aim for this to be base for all Impero projects. That means less is more, we don't want to clutter projects with stuff they don't need. After you generate you can and should still adapt things to the project in hand.
The simplicity to which you refer is simply not having a preconfigured .eslintrc file in your project root. I don't think that's worth the tradeoffs.
It's up to you guys though. If you go with Standard while I'm away then remember to add something for the DEVMODE DefinePlugin global. :-)
Closed for inactivity. If this is to happen then at the very least the above issue needs a solution (that I imagine would be more complex than just using ESLint...).
Standard JS removes any discussion or friction because of personal preferences. It also avoids having to maintain a list of ESLint rules. There are a few tools available for IDEs as well that can facilitate in keeping the code consistent.
The code should be linted in a pre-commit hook and fail the commit if there is code that doesn't conform.