Enforce opinionated code style
Even after applying the current lint configuration in !9 (merged), I’ve noticed that are still quite a few issues with the code style and formatting. Some of these are:
- use of
var
declarations - use of
let
instead ofconst
for constant declarations - variable JavaScript indentation (2 and 4 spaces)
- differing brace styles
- differing object notation styles
This stems from the fact, that none of the ESLint presets seem to be very opinionated when it comes to the JavaScript code itself. I’ve thought about adding a more strict preset in !9 (merged) but didn’t proceed because it seemed like something that should be discussed.
For Vue projects I’ve frequently used the preset from @antfu. Personally I just want things to be consistent and don’t really care that much how it actually looks (give or take a few rules