Among several popular eslint/prettier integration options, eslint-plugin-prettier requires the fewest dependencies and is the simplest for our needs.
It would be enough to only use prettier. We agreed on just a few simple rules (semicolons, double-quotes, and 2-space indents), all of which come out-of-the-box with prettier defaults.
I declared prettier rules in .prettierrc for the rules we agreed upon to override local editor settings (for instance, I have prettier.singleQuote set to true in my user settings).
The eslint plugin allows us to use eslint's robust configuration as well as any eslint plugins we may choose down the road along and prettier without conflicts. Eslint will handle all rules in the standard way. It will provide feedback (error – and red, squiggly line) if a prettier rule is broken, but will yield to prettier for handling in those cases.
TODO: While this solution meets the requirements we discussed, it does not account for linting within svelte components (*.html). That's better saved for another issue, but I'll just leave these links here:
Among several popular eslint/prettier integration options, eslint-plugin-prettier requires the fewest dependencies and is the simplest for our needs.
It would be enough to only use prettier. We agreed on just a few simple rules (semicolons, double-quotes, and 2-space indents), all of which come out-of-the-box with prettier defaults.
I declared prettier rules in
.prettierrc
for the rules we agreed upon to override local editor settings (for instance, I haveprettier.singleQuote
set to true in my user settings).The eslint plugin allows us to use eslint's robust configuration as well as any eslint plugins we may choose down the road along and prettier without conflicts. Eslint will handle all rules in the standard way. It will provide feedback (error – and red, squiggly line) if a prettier rule is broken, but will yield to prettier for handling in those cases.
Compared with prettier-eslint and eslint-config-prettier.
TODO: While this solution meets the requirements we discussed, it does not account for linting within svelte components (*.html). That's better saved for another issue, but I'll just leave these links here: