-
Notifications
You must be signed in to change notification settings - Fork 5
/
.eslintrc.js
92 lines (91 loc) · 2.54 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
const tslintRules = {
'member-access': false,
'ordered-imports': false,
'quotemark': false,
'no-var-keyword': false,
'object-literal-sort-keys': false,
'no-console': false,
'arrow-parens': false,
'max-line-length': false,
'object-literal-key-quotes': false,
'no-shadowed-variable': false,
'only-arrow-functions': false,
'no-var-requires': false,
'semicolon': false,
'interface-over-type-literal': false,
'align': false
};
module.exports = {
'root': true,
'env': {
'es6': true
},
'parser': '@typescript-eslint/parser',
'parserOptions': {
'parserOptions': {
'ecmaFeatures': {
'jsx': true
}
}
},
'plugins': [
'@typescript-eslint',
'import',
'tslint',
'unused-imports',
'@typescript-eslint'
],
'extends': [
'eslint:recommended',
],
'rules': {
'no-constant-condition': 'off',
'no-case-declarations': 'off',
'no-prototype-builtins': 'off',
'keyword-spacing': 'error',
'no-undef': 0,
'indent': 'off',
'no-multi-spaces': ['error'],
'arrow-spacing': ['error'],
'@typescript-eslint/indent': ['error', 2, {
'SwitchCase': 0
}],
'@typescript-eslint/member-delimiter-style': ['error', {
multiline: {
delimiter: 'semi',
requireLast: true,
},
singleline: {
delimiter: 'semi',
requireLast: false,
},
}],
'tslint/config': [1, {
rules: tslintRules,
rulesDirectory: ['node_modules/tslint/lib/rules' ]
} ],
'space-before-blocks': ['error'],
'import/newline-after-import': ['error', { 'count': 1 } ],
'import/no-duplicates': 1,
'object-curly-spacing': ['error', 'always' ],
quotes: [2, 'single'],
'semi': [1, 'always' ],
'comma-spacing': [2, { 'before': false, 'after': true } ],
'space-infix-ops': ['error', { 'int32Hint': false } ],
//'comma-dangle': ['error', 'never' ],
'padding-line-between-statements': [
'error',
{ blankLine: 'always', prev: ['const', 'let', 'var', 'if'], next: '*' },
{ blankLine: 'any', prev: ['const', 'let', 'var'], next: ['const', 'let', 'var'] }
],
'no-multiple-empty-lines': ['error', { 'max': 1, 'maxEOF': 0 }],
'lines-between-class-members': ['error', 'always'],
'linebreak-style': ['error', process.platform === 'win32' ? 'windows' : 'unix'],
'no-unused-vars': 0,
'unused-imports/no-unused-imports': 'error',
'unused-imports/no-unused-vars': [
'warn',
{ 'vars': 'all', 'varsIgnorePattern': '^_', 'args': 'none', 'argsIgnorePattern': '^_' }
]
}
};