-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy path.eslintrc.cjs
63 lines (55 loc) · 1.45 KB
/
.eslintrc.cjs
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//
// See also `.eslintignore`
//
module.exports = {
// Don't look for configuration files outside the project directory
root: true,
plugins: [
"@typescript-eslint",
"eslint-plugin-svelte",
"eslint-plugin-tailwindcss",
],
//
// Use the TypeScript parser as the default parser
// See https://typescript-eslint.io/architecture/parser/#configuration
//
parser: "@typescript-eslint/parser",
parserOptions: {
extraFileExtensions: [".svelte"],
project: ["./tsconfig.json"],
},
//
// *.svelte files are parsed by the Svelte parser, which again
// passes the embedded scripts to the TypeScript parser.
//
overrides: [
{
files: ["*.svelte"],
// TODO: Should the parser options be adjusted?
parser: "svelte-eslint-parser",
parserOptions: {
//
// The TypeScript parser uses the options set above
// See /~https://github.com/typescript-eslint/typescript-eslint/issues/6778
//
parser: "@typescript-eslint/parser",
},
},
],
// The linting rules
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:svelte/recommended",
"plugin:tailwindcss/recommended",
// Turn off rules that conflict with Prettier
"prettier",
"plugin:svelte/prettier",
"plugin:storybook/recommended",
],
// See https://eslint.org/docs/latest/use/configure/language-options
env: {
browser: true,
es2020: true,
},
};