-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy patheslint.config.js
More file actions
36 lines (35 loc) · 1.26 KB
/
eslint.config.js
File metadata and controls
36 lines (35 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import globals from "globals";
import { defineConfig, globalIgnores } from "eslint/config";
import pluginJs from "@eslint/js";
import tseslint from "typescript-eslint";
import eslintConfigPrettier from "eslint-config-prettier/flat";
import svelte from "eslint-plugin-svelte";
import svelteConfig from "./svelte.config.js";
export default defineConfig([
globalIgnores([
"dist",
"demo",
"book/.vitepress/dist",
"book/.vitepress/cache",
"docs",
]),
// Recommended JavaScript and TypeScript lints
pluginJs.configs.recommended,
...tseslint.configs.recommended,
// Configure ESLint for use with Svelte, see https://github.com/sveltejs/eslint-plugin-svelte#typescript-project
...svelte.configs.recommended,
{ languageOptions: { globals: globals.browser } },
{
files: ["**/*.svelte", "**/*.svelte.ts", "**/*.svelte.js"],
languageOptions: {
parserOptions: {
projectService: true,
extraFileExtensions: [".svelte"],
parser: tseslint.parser,
svelteConfig,
},
},
},
// Turn off lints that conflict with Prettier, see https://github.com/prettier/eslint-config-prettier#installation
eslintConfigPrettier,
]);