-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
92 lines (92 loc) · 2.95 KB
/
.eslintrc.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
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
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
tsconfigRootDir: __dirname,
sourceType: 'module',
ecmaVersion: 15,
},
plugins: ['@typescript-eslint', 'unused-imports'],
extends: [
'airbnb-base',
'airbnb-typescript/base',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:@typescript-eslint/stylistic-type-checked',
'prettier',
],
rules: {
'no-await-in-loop': 'off',
'no-restricted-syntax': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/no-redundant-type-constituents': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'no-plusplus': 'off',
'@typescript-eslint/ban-tslint-comment': 'off', // caused by no way to remove this from generated code
'object-property-newline': [
'error',
{
allowAllPropertiesOnSameLine: true,
// allowMultiplePropertiesPerLine is deprecated property, but is used by Webstorm
allowMultiplePropertiesPerLine: true,
},
],
'no-multiple-empty-lines': 'error',
'@typescript-eslint/no-misused-promises': ['error', { checksVoidReturn: false }],
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/prefer-nullish-coalescing': ['error', { ignorePrimitives: { string: true, boolean: true } }],
'unused-imports/no-unused-imports': 'error',
'import/no-unresolved': 'error',
'max-classes-per-file': 'off',
'no-underscore-dangle': 'off',
'no-useless-constructor': 'off',
'import/prefer-default-export': 'off',
'class-methods-use-this': 'off',
'@typescript-eslint/lines-between-class-members': 'off',
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'no-console': ['error', { allow: ['warn', 'error', 'info', 'log'] }],
'import/order': [
'error',
{
alphabetize: {
order: 'asc',
caseInsensitive: true,
},
pathGroups: [
{
pattern: '@/**',
group: 'internal',
position: 'after',
},
],
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'object', 'type'],
'newlines-between': 'always',
},
],
'operator-linebreak': [
'error',
'before',
{
overrides: {
'=': 'ignore',
':': 'before',
'||': 'before',
'&&': 'before',
'??': 'before',
},
},
],
},
ignorePatterns: ['.eslintrc.js'],
settings: {
'import/resolver': {
typescript: {},
},
},
};