eslint-plugin-svelte icon indicating copy to clipboard operation
eslint-plugin-svelte copied to clipboard

Extract stylistic rules into another eslint plugin

Open JounQin opened this issue 2 years ago • 3 comments

It could be compatible but deprecate current stylistic rules.

From https://github.com/ota-meshi/eslint-plugin-svelte/pull/186#issuecomment-1191531093

JounQin avatar Jul 21 '22 15:07 JounQin

I think the disadvantage of extracting a plugin for stylistic rules is that it makes it a little harder for users to find it. So far I haven't seen a plugin for stylistic rules exist as a separate plugin in the ESLint plugin ecosystem.

I think the advantage is that there is no need to download stylistic rules, which is not necessary for users who have already introduced the formatter (prettier-plugin-svelte).

ota-meshi avatar Jul 21 '22 23:07 ota-meshi

Sorry to stoke an old issue, but this is actually a growing trend in the world of ESLint plugins. There is actually a monorepo where all of the style rules are being moved to. So far, eslint-stylistic has collected the rules from ESLint, @typescript-eslint, and eslint-plugin-react. I think the Vue community is still clinging to their stylistic rules for now. If there is interest within the Svelte team, I could look into extracting the stylistic rules into a package in the eslint-stylistic monorepo (assuming they are also interested), and we could run both for a while to try to encourage the community to switch. Then (assuming it can be done in time), depreciate the rules with Svelte 5, maybe?

eagerestwolf avatar Jan 01 '24 06:01 eagerestwolf

Don't panic about the issue title there. I am just running the idea of adding another package by the eslint-stylistic team before anyone really commits to anything. If they (and you) approve the change, I will work on moving the rules over and everything so that way you guys don't have to worry about it.

eagerestwolf avatar Jan 01 '24 07:01 eagerestwolf