-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
55 lines (47 loc) · 1.92 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
const IN_PRODUCTION = process.env.NODE_ENV !== 'production'
const OFF = 0
const WARN = 1
const ERR = 2
module.exports = {
root: true,
ignorePatterns: [
'/*',
'!/src'
],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended'
],
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
'eslint-plugin-align-import'
],
rules: {
'camelcase': ERR,
'complexity': [WARN, {max: 4}],
'comma-spacing': [ERR, { before: false, after: true }],
'key-spacing': [ERR, { align: 'value' }],
'eol-last': [ERR, 'always'],
'linebreak-style': [ERR, 'unix'],
'no-console': IN_PRODUCTION ? OFF : ERR,
'no-duplicate-imports': ERR,
'no-empty': [ERR, { allowEmptyCatch: true }],
'no-extra-parens': ERR,
'no-trailing-spaces': [ERR, { ignoreComments: true }],
'no-useless-rename': ERR,
'object-curly-newline': [ERR, {
ObjectExpression: { multiline: true },
ObjectPattern: { multiline: true },
ImportDeclaration: { multiline: true, minProperties: 4 },
ExportDeclaration: { multiline: true, minProperties: 4 }
}],
'object-curly-spacing': [ERR, 'always'],
'quotes': [ERR, 'single'],
'semi': [ERR, 'never'],
'spaced-comment': [ERR, 'always', { exceptions: ['-', '+'] }],
'space-infix-ops': ERR,
'align-import/align-import': ERR,
'@typescript-eslint/ban-ts-comment': OFF
}
}