-
Notifications
You must be signed in to change notification settings - Fork 19
/
.eslintrc.js
141 lines (141 loc) · 3.63 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
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
module.exports = {
'parser': '@typescript-eslint/parser',
'parserOptions': {
'project': './tsconfig.json',
'sourceType': 'module',
},
'extends': [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'standard',
'eslint-config-airbnb-base',
'plugin:import/errors',
],
'plugins': [
'@typescript-eslint',
'standard',
'import',
'promise',
],
'env': {
'browser': false,
'node': true,
'mocha': true,
},
'root': true,
"globals": {
"GLOBAL": true,
},
'rules': {
'no-restricted-syntax': [
'error',
'ForInStatement',
'LabeledStatement',
'WithStatement',
],
'no-await-in-loop': 0,
'camelcase': 0,
'@typescript-eslint/camelcase': [2, {
'properties': 'never',
'ignoreDestructuring': true,
}],
'class-methods-use-this': 0,
'comma-dangle': [2, 'always-multiline'],
'curly': [2, 'multi-line'],
'eol-last': [2, 'always'],
'global-require': 1,
'arrow-parens': 0,
'implicit-arrow-linebreak': 0,
'max-len': [2,
120,
2,
{
'ignoreUrls': true,
'ignoreComments': false,
'ignoreRegExpLiterals': true,
'ignoreStrings': true,
'ignoreTemplateLiterals': true,
},
],
'max-classes-per-file': [2, 5],
'func-names': 0,
'function-paren-newline': [2, 'multiline-arguments'],
'no-confusing-arrow': 0,
'no-prototype-builtins': 0,
'no-plusplus': 0,
'no-param-reassign': [2, {
'props': true,
}],
'no-underscore-dangle': [1, {
'allowAfterThis': false,
'allowAfterSuper': false,
'enforceInMethodNames': true,
}],
'prefer-destructuring': 0,
'promise/param-names': 0,
'promise/no-nesting': 0,
'object-curly-spacing': 0,
'object-shorthand': [1, 'always'],
'operator-linebreak': 0,
'object-curly-newline': [2, {
'ObjectExpression': {
'minProperties': 8,
'multiline': true,
'consistent': true,
},
'ObjectPattern': {
'minProperties': 8,
'multiline': true,
'consistent': true,
},
'ImportDeclaration': {
'minProperties': 8,
'multiline': true,
'consistent': true,
},
'ExportDeclaration': {
'minProperties': 8,
'multiline': true,
'consistent': true,
},
}],
'quotes': [2, 'single', { allowTemplateLiterals: true }],
'semi': [2, 'always'],
'@typescript-eslint/array-type': [2, { default: 'array-simple' }],
'@typescript-eslint/explicit-function-return-type': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-inferrable-types': 0,
'@typescript-eslint/no-var-requires': 1,
'import/extensions': [2, 'always', {
'js': 'never',
'ts': 'never',
}],
'import/first': 0,
'import/prefer-default-export': 0,
'import/no-unassigned-import': [2, {
allow: [
'**/*.css',
'**/*.less',
'**/*.html',
'core-js/**',
'regenerator-runtime/**',
'**/polyfills*',
]
}],
'import/no-named-as-default': 0,
'import/no-deprecated': 2,
'indent': ['error', 2],
"no-unused-expressions": 0,
"prefer-arrow-callback": 0,
'@typescript-eslint/no-use-before-define': ["error", {"variables": false, "typedefs": false, "functions": false, "classes": false }],
'no-use-before-define': ["error", {"variables": true, "functions": false, "classes": false }],
},
'settings': {
'import/resolver': {
'node': {
'extensions': ['.ts', '.d.ts', '.js', '.json'],
},
},
},
};