-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
141 lines (128 loc) · 3.85 KB
/
.eslintrc
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
{
"root": true,
"env": { "browser": true, "node": true },
"extends": [
"eslint:all",
"plugin:@typescript-eslint/all",
"plugin:@typescript-eslint/recommended-type-checked",
"plugin:@typescript-eslint/stylistic-type-checked",
"plugin:import/recommended",
"plugin:import/typescript",
"airbnb-base",
"airbnb-typescript/base",
"plugin:unicorn/all",
"prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["@typescript-eslint"],
"rules": {
"no-param-reassign": "off",
"no-underscore-dangle": "off",
"init-declarations": "off",
"prefer-destructuring": "off",
"@typescript-eslint/lines-between-class-members": [
"error",
{
"enforce": [
{ "blankLine": "never", "prev": "field", "next": "field" },
{ "blankLine": "always", "prev": "field", "next": "method" }
]
}
],
"func-names": ["warn", "as-needed"],
"no-plusplus": ["error", { "allowForLoopAfterthoughts": true }],
"@typescript-eslint/no-type-alias": "off",
"@typescript-eslint/no-invalid-this": "off",
"@typescript-eslint/prefer-readonly-parameter-types": "off",
"@typescript-eslint/strict-boolean-expressions": "off",
"@typescript-eslint/consistent-type-imports": "warn",
"@typescript-eslint/no-unused-expressions": [
"error",
{ "allowTaggedTemplates": true }
],
"unicorn/no-array-for-each": "off",
"unicorn/no-null": "off",
"unicorn/switch-case-braces": "off",
"unicorn/prevent-abbreviations": ["error", { "ignore": ["^args$"] }]
},
"overrides": [
{
"files": ["**/*.ts"],
"parserOptions": { "project": true },
"overrides": [
{
"files": ["rollup.config.ts"],
"rules": {
"unicorn/prevent-abbreviations": "off",
"unicorn/prefer-module": "off"
}
},
{
"files": ["src/__tests__/**/*.ts"],
"parserOptions": {
"project": ["./src/__tests__/tsconfig.test.json"]
},
"rules": {
"import/no-extraneous-dependencies": "off",
"@typescript-eslint/naming-convention": "off",
"@typescript-eslint/init-declarations": "off",
"unicorn/prefer-module": "off",
"unicorn/prevent-abbreviations": [
"warn",
{ "ignore": ["[aA]rgs$", "^ctx$"] }
]
},
"overrides": [
{
"files": ["src/__tests__/utils/**/*.ts"],
"rules": {
"@typescript-eslint/max-params": "off"
}
},
{
"files": ["src/__tests__/**/*.{spec,test}.ts"],
"extends": ["plugin:jest/recommended"],
"plugins": ["jest"]
}
]
}
]
},
{
"files": ["*.js"],
"extends": ["plugin:@typescript-eslint/disable-type-checked"],
"rules": {
"global-require": "off",
"@typescript-eslint/no-require-imports": "off",
"@typescript-eslint/no-var-requires": "off",
"unicorn/prefer-module": "off"
},
"overrides": [
{
"files": ["src/__tests__/**/*.js"],
"parserOptions": {
"project": ["./src/__tests__/tsconfig.test.json"]
},
"rules": {
"@typescript-eslint/explicit-function-return-type": "off"
},
"overrides": [
{
"files": ["src/__tests__/fixtures/**/*.js"],
"globals": { "Chart": "readonly", "helpers": "readonly" },
"rules": {
"no-nested-ternary": "off",
"unicorn/filename-case": "warn"
}
}
]
}
]
}
],
"ignorePatterns": ["dist", "coverage"]
}