-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
50 lines (50 loc) · 1.76 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
module.exports = {
env: {
es6: true,
node: true,
browser: true
},
plugins: ['import'],
extends: ['eslint:recommended', 'plugin:import/recommended', 'airbnb-base'],
ignorePatterns: ['node_modules', 'dist'],
rules: {
'max-len': ['error', 130, { ignoreComments: true, ignoreTrailingComments: true, ignoreUrls: true, ignoreStrings: true, ignoreTemplateLiterals: true, ignoreRegExpLiterals: true }],
'brace-style': ['error'],
'no-unused-vars': ['warn'],
'comma-dangle': ['error', 'never'],
'no-var': ['off'],
'one-var': ['off'],
'one-var-declaration-per-line': ['off'],
'object-curly-newline': ['off'],
'no-prototype-builtins': ['off'],
'no-control-regex': ['off'],
'function-paren-newline': ['off'],
'no-underscore-dangle': ['off'],
'no-param-reassign': ['off'],
'no-await-in-loop': ['off'],
'array-callback-return': ['off'],
'no-promise-executor-return': ['off'],
'no-restricted-syntax': ['error', 'ForInStatement']
},
overrides: [
{
files: ['**/*.{ts,tsx}'],
parser: '@typescript-eslint/parser',
parserOptions: {
// tsconfigRootDir: __dirname,
project: 'tsconfig.json'
},
plugins: ['@typescript-eslint'],
extends: ['plugin:@typescript-eslint/recommended', 'plugin:import/typescript', 'airbnb-typescript/base'],
rules: {
'@typescript-eslint/no-unused-vars': ['warn'],
'@typescript-eslint/comma-dangle': ['error', 'never'],
'@typescript-eslint/indent': ['error', 2, { ignoredNodes: ['TSTypeParameterInstantiation'] }],
'@typescript-eslint/return-await': ['off'],
'@typescript-eslint/lines-between-class-members': ['off'],
'import/extensions': ['off'],
'import/order': ['off']
}
}
]
};