-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
77 lines (69 loc) · 1.68 KB
/
.eslintrc.json
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
{
// An environment in which the code will run in
"env": {
"browser": true,
"es2021": true
// jest: true, // If you intend to use jest
},
// Extends the configuration of other ESLint plugins
"extends": [
"eslint:recommended",
// Recommended TypeScript configuration
"plugin:@typescript-eslint/recommended",
// Recommended Prettier configuration
"prettier",
"plugin:prettier/recommended"
],
// "overrides": [
// {
// "env": {
// "node": true
// },
// "files": [".eslintrc.{js,cjs}"],
// "parserOptions": {
// "sourceType": "script"
// }
// }
// ],
"ignorePatterns": [
"**/dist/",
"*.generated.*",
"*.test.js",
"__tests__/",
"**/.eslintrc*",
"**/eslint.config.json*",
"**/.prettierrc*",
"**/prettier.config.json*",
".vscode/",
".env",
".env.*"
],
// Specifies the parser to use for parsing the code
"parser": "@typescript-eslint/parser", // TypeScript parser
// Specifies the parser options
"parserOptions": {
// ecmaFeatures: {
// jsx: true, // enable jsx
// },
"ecmaVersion": "latest", // Code uses ECMAScript 2021 syntax
"sourceType": "module"
},
// Specifies the ESLint plugins to use
"plugins": ["@typescript-eslint", "prettier"],
// Specifies the ESLint rules to use
"rules": {
"prettier/prettier": [
"error",
{
"endOfLine": "auto"
}
]
// "react-refresh/only-export-components": ["warn", { "allowConstantExport": true }]
},
// Specifies the settings for the ESLint plugins
"settings": {
"import/resolver": {
"typescript": {} // TypeScript resolver
}
}
}