-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
52 lines (50 loc) · 1.58 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
module.exports = {
rules: {
/* shared custom rules */
'array-element-newline': ['error', 'consistent'],
'arrow-parens': ['error', 'as-needed'],
'comma-dangle': ['error', 'always-multiline'],
'comma-spacing': 'error',
'curly': ['error', 'all'],
'eol-last': ['error'],
'func-style': ['error', 'expression'],
'import/prefer-default-export': 0,
'import/no-duplicates': 'error',
// 'indent': ['error', 2, { 'SwitchCase': 1 }],
'key-spacing': 'error',
'keyword-spacing': [2, {'before': true, 'after': true}],
'no-extra-parens': 'error',
'no-multi-spaces': 'error',
'no-multiple-empty-lines': ['error', {'max': 1}],
'no-shadow': 'error',
'no-trailing-spaces': 'error',
'object-curly-spacing': ['error', 'always'],
'object-property-newline': 'error',
'object-shorthand': 'error',
'padded-blocks': 'error',
'prefer-const': 'error',
'prefer-template': 'error',
'quotes': ['error', 'single'],
'quote-props': ['error', 'as-needed'],
'require-await': 'error',
'semi': ['error', 'never'],
'space-before-function-paren': 'error',
'space-infix-ops': ['error', {'int32Hint': false}],
// PTR rules
'import/default': 0,
'import/extensions': 'error',
'import/first': 'error',
'import/no-unresolved': 'error',
// 'sort-imports': 'warn',
'max-lines': 'warn',
'max-len': 0,
'no-console': 0,
'no-undef': 'error',
'no-tabs': 2,
'no-unused-vars': 'error',
'no-underscore-dangle': 0,
// es6
'no-confusing-arrow': "off",
'no-mixed-operators': "off"
},
};