Closed adrianmroz closed 4 years ago
Yeah I need to get to it. Thanks for reporting!
I thought this used to be a deal-breaker without having eslint support. But if you add a watcher in settings to automatically run eslint (autofix) every time the file is saved, this becomes less of a problem for now until eslint is properly supported.
@shirotech Nice! Personally I run linting during committing and pushing, using a combination of husky
and lint-staged
.
@shirotech Nice! Personally I run linting during committing and pushing, using a combination of
husky
andlint-staged
.
Yeah and that too, but also the main advantage of the built-in File Watchers
is it allows the IDE to sync the file that was changed. I couldn't find a way to do that with tools running outside of the IDE.
@anstarovoyt I wonder if you could take a look at that issue? Last time I've checked (a year ago), there were some file extensions hardcoded into the builtin ESLint code - e.g. .vue
- and I didn't notice a way to extend that
@tomblachut yes, I will try to implement this
@anstarovoyt great, thanks
@adrianmroz
so. Actually you can enable the ESLint integration in the IDE by changing the key in the Registry:
Help - Find Action - Registry
Key:
eslint.additional.file.extensions
Value
svelte
I am searching a better way to do it programmatically but it should work
As I understand, right now in WebStorm you can run eslint only against files with extensions associated with JavaScript. Svelte plugin has separate file type.
If that's the case, it would be nice if we could get option to run eslint against .svelte files. Right now I managed run eslint from command line with https://github.com/sveltejs/eslint-plugin-svelte3 and works great.