-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc-ts.js
44 lines (37 loc) · 1.18 KB
/
.eslintrc-ts.js
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
module.exports = {
parserOptions: {
project: './tsconfig.eslint.json',
tsconfigRootDir: __dirname,
},
extends: ['@vkontakte/eslint-config/typescript'],
plugins: ['eslint-plugin-import'],
rules: {
'import/order': [
'error',
{
'groups': ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
'newlines-between': 'always',
'alphabetize': {
order: 'asc',
},
'pathGroups': [
{
pattern: '#/**',
group: 'internal',
},
],
},
],
'@typescript-eslint/await-thenable': 'off',
// Disabled because: no configurable options for .length > 0, arr[0] and similar constructions.
'no-magic-numbers': 'off',
'@typescript-eslint/no-magic-numbers': 'off',
// Disabled because: errors on 'displayMode || '5min'' expression with nullable variable.
'@typescript-eslint/no-unnecessary-condition': 'off',
// Disabled: covered with stricter tsc settings
'@typescript-eslint/typedef': 'off',
'@typescript-eslint/prefer-string-starts-ends-with': 'off',
'no-shadow': 'off',
'no-console': ['warn', { allow: ['warn', 'error'] }],
},
};