-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy path.eslintrc.js
66 lines (62 loc) · 1.74 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
'use strict';
const eslintConfig = {
overrides: [],
'parser': '@babel/eslint-parser',
'parserOptions': {
'sourceType': 'script',
'ecmaVersion': 2020,
'requireConfigFile': false
},
'env': {
'node': true,
'es6': true
},
'plugins': [
'no-only-tests'
],
'rules': {
'curly': [2, 'multi-line'],
'consistent-return': 0,
'quotes': [2, 'single', { 'avoidEscape': true, 'allowTemplateLiterals': true }],
'semi': [2, 'always'],
'strict': ['error', 'safe'],
'no-const-assign': 'error',
'no-undef': 2,
'no-underscore-dangle': 0,
'no-use-before-define': ['error', {'functions': false, 'classes': false}],
'no-unused-vars': [2, { 'vars': 'all', 'args': 'none', 'ignoreRestSiblings': true }],
'no-shadow': 2,
'keyword-spacing': 'error',
'eol-last': 'error',
'prefer-const': 'error',
'no-only-tests/no-only-tests': 'error',
'no-trailing-spaces': 'error',
'space-before-blocks': 'error',
'space-in-parens': 'error'
}
};
const tslintConfig = {
extends: [
'plugin:@typescript-eslint/recommended',
],
parser: '@typescript-eslint/parser',
files: ['**/*.ts'],
plugins: [
'@typescript-eslint',
'no-only-tests',
],
rules: {
...eslintConfig.rules,
'@typescript-eslint/no-var-requires': 0,
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': ['error', {'functions': false, 'classes': false}],
'@typescript-eslint/ban-ts-comment': ['warn'],
'no-shadow': 'off',
'@typescript-eslint/no-shadow': ['warn'],
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/no-explicit-any': 'off',
},
};
eslintConfig.overrides.push(tslintConfig);
module.exports = eslintConfig;