Not able to use type-aware rules (setting Eslint parserOptions.project turns off all linting in Svelte files)
When I define parserOptions.project Eslint won't lint Svelte files.
I think this may be due to the fact that when parserOptions.project are set, Eslint will only lint files in the scope of tsconfig.json - which probably excludes .svelte files;
I was able to apply an override for .svelte files (project: false) but I can't use type-aware rules in .svelte files - which require the parser to work.
As an example, @typescript-eslint/no-floating-promises is such rule.
v3.2.1
See also https://github.com/typescript-eslint/typescript-eslint/issues/3174#issuecomment-797334643
Maybe it helps somebody else but for SvelteKit it seems like I got it working with https://github.com/mohe2015/sveltekit-advanced-typescript/commit/98c42be37363ee000d61b5e829d0ebab3b254e6e
I'm having this same problem. @mohe2015's solution of adding extraFileExtensions: ['.svelte'] to parserOptions resulted in linting errors in .svelte files which should not apply to Svelte syntax. So I disabled the corresponding rules for .svelte files like so:
overrides: [
{
files: ['*.svelte'],
processor: 'svelte3/svelte3',
rules: {
"import/no-mutable-exports": 0,
"no-multiple-empty-lines": 0,
}
}
],
Still, this feels like a hack. Is there a better solution?