-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.json
71 lines (71 loc) · 2.11 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
{
"env": {
"es2021": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended-type-checked",
"prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": true,
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["@typescript-eslint", "import"],
"rules": {
"@typescript-eslint/explicit-function-return-type": "error",
"@typescript-eslint/no-unused-vars": "error",
// to enforce using type for object type definitions, can be type or interface
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
"@typescript-eslint/consistent-type-imports": [
"error",
{ "prefer": "type-imports" }
],
"sort-imports": ["error", { "ignoreDeclarationSort": true }],
"no-multiple-empty-lines": ["error", { "max": 1 }],
"import/no-absolute-path": "error",
"import/default": "error",
"import/namespace": "error",
"import/no-restricted-paths": "error",
"import/no-dynamic-require": "error",
"import/no-webpack-loader-syntax": "error",
"import/no-self-import": "error",
"import/no-cycle": "warn",
"import/no-useless-path-segments": "error",
"import/no-relative-packages": "error",
"import/export": "error",
"import/no-named-as-default": "error",
"import/no-named-as-default-member": "error",
"import/no-mutable-exports": "error",
"import/no-unused-modules": "error",
"import/no-amd": "error",
"import/first": "error",
"import/no-duplicates": "error",
"import/no-namespace": "error",
"import/order": [
"error",
{
"alphabetize": {
"order": "asc",
"caseInsensitive": true
},
"groups": [
"builtin",
"external",
"internal",
"parent",
"sibling",
"index"
],
"newlines-between": "always"
}
],
"import/newline-after-import": "error",
"import/no-named-default": "error",
"import/no-anonymous-default-export": "error",
"import/dynamic-import-chunkname": "error"
}
}