-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Switch default eslint plugin #6847
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I don't think we necessarily want to hold up v1 for this. That ESLint plugin will need to be more thoroughly vetted and brought under the sveltejs org before we include it in templates. Luckily, we can switch this out as a breaking change in create-svelte if necessary, without it being a breaking change in SvelteKit itself. |
@Jojoshua is there documentation for converting from eslint-plug-svelte3 to eslint-plug-svelte ? I migrated but getting a bunch of these errors for all my config files:
And for this code it returns an error:
Says 'like' is not defined. While the eslint-plugin-svelte3 doesn't return an error. |
@ZetiMente I followed https://ota-meshi.github.io/eslint-plugin-svelte/user-guide/ I would ask @baseballyama or @ota-meshi to chime in if they know of a better article. |
Creating the migration guide is my task but still I didn't start. Did you finish switching the plugin after following https://ota-meshi.github.io/eslint-plugin-svelte/user-guide/ ? |
@baseballyama Do I need to add *.config.ts & *.config.js files to the eslint ignore or did I mess up something? Seems to be the only eslint migration issue.
|
This comment was marked as off-topic.
This comment was marked as off-topic.
@baseballyama I have created an example of adopting eslint-plugin-svelte using the sveltekit demo app. There is a slight trap which @ZetiMente reported. I think the most robust solution is to use a |
@kevin-a-naude Thank you for the REPL. I think some people also will face the issue, so I think we should add some statements to the doc. (Also previously I faced the same issue😅) |
That is a viable solution for the demo app. I hesitate to suggest it as a general recommendation as it is a bit of a broad brush. There may be tools or build processes in the wild that read There are two other alternatives worth considering. One of these is to use The documentation for
The other approach that works in the put I am leaning towards an explicit |
…eslint-plugin-svelte` (#9749) close: #9342 close: #6847 --------- Co-authored-by: Yosuke Ota <[email protected]> Co-authored-by: Conduitry <[email protected]> Co-authored-by: Ben McCann <[email protected]>
Describe the problem
If setting up a new sveltekit project via
npm create svelte@latest
and you request eslint support, you will by default get setup with https://github.com/sveltejs/eslint-plugin-svelte3The issue is that eslint-plugin-svelte3 is not a correct parser and there have been a lot of issues with its usage. eslint-plugin-svelte just works better and is staying more maintained.
References
sveltejs/eslint-plugin-svelte3#184
https://github.com/ota-meshi/eslint-plugin-svelte#-why
Describe the proposed solution
Before going v1 change the default use the eslint plugin https://github.com/ota-meshi/eslint-plugin-svelte
Alternatives considered
No response
Importance
nice to have
Additional Information
No response
The text was updated successfully, but these errors were encountered: