Skip to content

Is it possible to use with the new/flat config file format? #361

Answered by OJFord
OJFord asked this question in Q&A
Discussion options

You must be logged in to vote

I have it working with just the parser, no svelte/* rules, as:

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.

I'd still appreciate any pointers for how I can get the Svelt…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by OJFord
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant