Skip to content
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

eslint-plugin-svelte is incompatible with sublime text linting plugin #576

Open
2 tasks done
r-nl opened this issue Aug 31, 2023 · 3 comments
Open
2 tasks done

eslint-plugin-svelte is incompatible with sublime text linting plugin #576

r-nl opened this issue Aug 31, 2023 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@r-nl
Copy link

r-nl commented Aug 31, 2023

Before You File a Bug Report Please Confirm You Have Done The Following...

  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.

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.

@ota-meshi
Copy link
Member

I don't use SublimeText. So I don't know the cause. If the problem is with the package, consider submitting a pull request.

@ildella
Copy link

ildella commented Feb 16, 2024

Created the issue on the Sublime eslint package repo as well: polygonplanet/sublime-text-eslint#31

@ildella
Copy link

ildella commented Feb 20, 2024

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants