-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
.eslintrc.json
104 lines (101 loc) · 4.38 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
{
"overrides": [
{
"extends": ["canonical/json"],
"files": "*.json"
},
{
"extends": [
"eslint:recommended",
"canonical/typescript",
"canonical/typescript-type-checking",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript"
],
"plugins": ["canonical"],
"parserOptions": {
"tsconfigRootDir": "./",
"project": ["./tsconfig.json", "./packages/*/tsconfig.json"]
},
"settings": {
"import/resolver": {
"typescript": true,
"node": true
}
},
"rules": {
"comma-dangle": "off",
"no-extra-parens": "off",
"no-case-declarations": "warn",
"no-duplicate-imports": "error",
"canonical/prefer-inline-type-import": "error",
"typescript-sort-keys/string-enum": "off",
"sort-imports": [
"error",
{
"ignoreDeclarationSort": true
}
],
"import/first": "error",
"import/order": [
"error",
{
"newlines-between": "always",
"groups": ["builtin", "external", "internal", "parent", "sibling", "index", "object", "type"],
"pathGroups": [
{
"pattern": "@/**",
"group": "internal",
"position": "before"
}
],
"alphabetize": {
"order": "asc" /* sort in ascending order. Options: ['ignore', 'asc', 'desc'] */,
"caseInsensitive": true /* ignore case. Options: [true, false] */
}
}
],
"import/no-absolute-path": "error",
"import/no-cycle": "error",
"import/no-duplicates": "error",
"import/no-extraneous-dependencies": "error",
"import/no-named-as-default": "off",
"import/no-useless-path-segments": "error",
"@typescript-eslint/class-literal-property-style": "off",
"@typescript-eslint/comma-dangle": "off",
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
"@typescript-eslint/consistent-type-imports": ["error", { "prefer": "type-imports" }],
"@typescript-eslint/explicit-function-return-type": "warn",
"@typescript-eslint/indent": "off",
"@typescript-eslint/quotes": ["error", "double", { "avoidEscape": true }],
"@typescript-eslint/member-delimiter-style": "off",
"@typescript-eslint/no-base-to-string": "warn",
"@typescript-eslint/no-empty-interface": "warn",
"@typescript-eslint/no-extra-parens": "off",
"@typescript-eslint/no-loop-func": "warn",
"@typescript-eslint/no-misused-promises": ["error", { "checksVoidReturn": false }],
"@typescript-eslint/no-unused-vars": ["error", { "vars": "local", "args": "none" }],
"@typescript-eslint/no-use-before-define": "warn",
"@typescript-eslint/no-useless-empty-export": "error",
"@typescript-eslint/prefer-readonly": "warn",
"@typescript-eslint/prefer-reduce-type-parameter": "off",
"@typescript-eslint/require-array-sort-compare": "off",
"@typescript-eslint/space-before-function-paren": "off",
"@typescript-eslint/switch-exhaustiveness-check": "error",
"@typescript-eslint/unbound-method": "warn",
"@typescript-eslint/unified-signatures": "error"
},
"overrides": [
{
"files": "*.d.ts",
"rules": {
"no-var": "off"
}
}
],
"files": "*.ts"
}
],
"root": true
}