-
If I add it to plugins like: import svelte from "eslint-plugin-svelte"
export default = [
"eslint:recommended",
{
plugins: {
svelte,
},
rules: {
"comma-dangle": [
"error",
"always-multiline",
],
// ...
},
] then there's no error, but it doesn't seem to apply rules to Svelte files. If I add |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I have it working import svelteParser from "svelte-eslint-parser";
export default [
"eslint:recommended",
{
languageOptions: {
globals: {
document: true,
process: true,
},
},
{
rules: {
// ...
},
},
{
files: [
"**/*.svelte",
],
languageOptions: {
parser: svelteParser,
},
},
]; with the rules in a separate section it seems to work to apply these globally, and then the next section on only svelte files just overrides the parser. I can't find this clearly documented, but it seems to work well.
cf. also #340 (comment) Got it, add: import svelte from "eslint-plugin-svelte"
|
Beta Was this translation helpful? Give feedback.
I have it working
with just the parser, noas:svelte/*
rules,with the rules in a separate section it seems to work to apply these globally, and then the next section on only svelte files just overrides the parser. I can't find this clearly documented, but it seems to work well.
I'd still appreciate any pointers for how I can get the Svelt…