Closed lud closed 4 years ago
I'm currently using eslint-plugin-svelte3
with "semi": ["warn", "never"]
and semicolons are removed from .svelte
files when I run eslint with --fix
It sounds like it would be a bug, but it's not one I can reproduce either. Do you have a small repo that can be cloned and demonstrate this?
Hello,
Thanks, I'll try to provide a shrinked version of my repository. In the meantime I found that the following block was commented out:
overrides: [
{
"files": ["*.svelte"],
"processor": "svelte3/svelte3"
}
],
But I cannot enable it back as eslint fails with "unexpected top-level property overrides[0].processor".
If that's commented out, the plugin's probably not running at all. As of version 2.0.0, this plugin requires ESLint 6, which provides a different interface for linter plugins than 5. Are you still using ESLint 5?
I did some tests.
With eslint 6 installed locally and ran from the command line, it works as expected with svelte files. So the problem may be in the vscode eslint plugin only. I use .svelte for extensions so I did not follow the INTEGRATIONS.md guide.
👍 See #50 for discussion on how we can make it clearer in the docs what you need to do to set up things in vscode.
Hi,
The plugin seem to work fine for me, except from the command line where it chokes on html tags (unexpected '<').
Although, i have this rule to discard all semicolons:
and it works fine for .js files, but has the opposite effect on .svelte files: semicolons are added if not present.
Is it expected behaviour or a bug ?