eslint-config-svelte3 Svelte Themes

Eslint Config Svelte3

ESLint config for Svelte 3 with StandardJS and TypeScript

eslint-config-svelte3

ESLint config for Svelte 3 with StandardJS and TypeScript

npm i -D @tedbyron/eslint-config-svelte3
yarn add -D @tedbyron/eslint-config-svelte3
pnpm add -D @tedbyron/eslint-config-svelte3

.eslintrc.cjs:

module.exports = {
  extends: '@tedbyron/eslint-config-svelte3',
  ignorePatterns: ['*.cjs', 'svelte.config.js'],
  settings: {
    'import/resolver': {
      typescript: {
        project: './tsconfig.json'
      }
    }
  },
  parserOptions: {
    project: './tsconfig.json',
    tsconfigRootDir: __dirname
  }
}

If using the VSCode ESLint extension, add svelte to the eslint.validate setting:

"eslint.validate": ["javascript", "javascriptreact", "svelte"]

Top categories

Loading Svelte Themes