Open r-nl opened 1 year ago
I don't use SublimeText. So I don't know the cause. If the problem is with the package, consider submitting a pull request.
Created the issue on the Sublime eslint package repo as well: https://github.com/polygonplanet/sublime-text-eslint/issues/31
@r-nl I've found a workaround.
I added as devDeps both the new and the old npm package :)
Then just this in .eslintrc
extends: [
// ... all other extends
'plugin:svelte/recommended',
],
This way it works.
In my .svelte
files I can even see the other basic eslint warnings like camelcase
.
Before You File a Bug Report Please Confirm You Have Done The Following...
What version of ESLint are you using?
8.48.0
What version of
eslint-plugin-svelte
are you using?2.33.0
What did you do?
1) Install Sublime Text, eslint through package manager 2) Create Sveltekit project with eslint (Or manually install eslint-plugin-svelte) 3) Observe that eslint is not linting .svelte files 4) install eslint-plugin-svelte3 via npm 5) With no configuration or modifications to .eslintrc, observe eslint is now linting .svelte files
What did you expect to happen?
Like eslint-plugin-svelte3, linting would automatically pick up .svelte files
What actually happened?
Linting skipped .svelte files, fires on .ts and .js files.
Link to GitHub Repo with Minimal Reproducible Example
As this is a editor-specific issue, a repo cannot be provided.
Additional comments
I am unsure why merely installing eslint-plugin-svelte3 without including it in eslintrc would fix this. It is possible- and unfortunately likely- this is actually a fault in sublime's plugins implementation of eslint. However, it is strange it works fine with eslint-plugin-svelte3 and not the newer plugin, leading to some hope that this is easily correctable from this end without needing to fork sublime's eslint implementation. Installing eslint-plugin-svelte3 as a dev-dep and not using it anywhere seems a passable workaround for the moment, but I am hoping this is a simple missing line of configuration inside a eslint file somewhere in this project, as it does work with the other plugin.