sveltejs / vite-plugin-svelte

Svelte plugin for http://vitejs.dev/
MIT License
864 stars 105 forks source link

chore: match svelte and kit eslint config #720

Closed benmccann closed 1 year ago

benmccann commented 1 year ago

the node: prefix is supported in the same versions of Node that vite-plugin-svelte supports: https://2ality.com/2021/12/node-protocol-imports.html#support-for-node%3A-imports

dominikg commented 1 year ago

adding the node: prefix is nice, but is there a benefit for the quote rule? prettier single is already active.

benmccann commented 1 year ago

prettier single will only change double quotes to single quotes, but it won't change unnecessary backticks to single quotes. I think it's a bit weird to go from three types of quotes down to two as that's still leaves a lot of inconsistency. I personally find it harder to read backticks because I often assume there's a variable nested within them and then I waste time looking for it, when it may not exist

you could change pnpm fixup to run eslint --fix and then it'd get handled automatically

dominikg commented 1 year ago

fixup runs both lint and fornat already

benmccann commented 1 year ago

strings are also better for performance than template literals

benchmark