-
Notifications
You must be signed in to change notification settings - Fork 63
/
.eslintrc.js
104 lines (103 loc) · 3.27 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
93
94
95
96
97
98
99
100
101
102
103
104
/* eslint-disable quote-props */
module.exports = {
root: true,
env: {
browser: true
},
parser: '@typescript-eslint/parser',
plugins: [
'import',
'@typescript-eslint'
],
extends: [
'eslint:recommended',
'airbnb-base',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended'
],
settings: {
'import/resolver': {
typescript: {}
}
},
rules: {
'import/no-unresolved': 'error',
'import/extensions': 'off',
'@typescript-eslint/indent': ['error', 2],
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-member-accessibility': 'off',
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/no-this-alias': 'off',
'@typescript-eslint/ban-types': 'off',
'import/prefer-default-export': 'off',
'import/no-extraneous-dependencies': 'off',
'import/no-cycle': 'off',
'comma-dangle': ['error', 'never'],
'prefer-destructuring': 'off',
'semi': ['error', 'always'],
'class-methods-use-this': 'error',
'block-scoped-var': 'error',
'no-console': 'error',
'no-debugger': 'error',
'no-lonely-if': 'error',
'no-plusplus': 'off',
'no-continue': 'off',
'lines-between-class-members': 'off',
'class-methods-use-this': ['error', {
exceptMethods: ['type', 'kind', 'parseValue']
}],
'max-len': [
'error',
{
code: 125,
comments: 125,
tabWidth: 2,
ignoreUrls: true,
ignoreRegExpLiterals: true,
ignoreTemplateLiterals: true,
ignorePattern: '(@returns|@param)'
}
],
'complexity': [ 'error', { max: 40 } ],
'no-use-before-define': [
'error',
{
classes: false,
functions: false
}
],
'arrow-parens': [ 'error', 'always' ],
'arrow-body-style': 'off',
'object-shorthand': 'off',
'guard-for-in': 'off',
'no-nested-ternary': 'off',
'object-curly-newline': 'off',
'array-bracket-spacing': [ 'error', 'always' ],
'no-param-reassign': 'off',
'default-case': 'off',
'no-shadow': 'off',
'no-restricted-syntax': 'off',
'no-prototype-builtins': 'off',
'space-before-function-paren': 'off',
'no-var': 'error',
'padding-line-between-statements': [
'error',
{ 'blankLine': 'always', 'prev': 'block-like', 'next': '*' },
{ 'blankLine': 'always', 'prev': '*', 'next': 'block-like' },
{ 'blankLine': 'any', 'prev': 'block-like', 'next': ['block-like', 'break'] },
// require blank lines before all return statements
{ 'blankLine': 'always', 'prev': '*', 'next': 'return' },
// require blank lines after every sequence of variable declarations
{ 'blankLine': 'always', 'prev': ['const', 'let', 'var'], 'next': '*'},
{ 'blankLine': 'any', 'prev': ['const', 'let', 'var'], 'next': ['const', 'let', 'var']},
// require blank lines after all directive prologues
{ 'blankLine': 'always', 'prev': 'directive', 'next': '*' },
{ 'blankLine': 'any', 'prev': 'directive', 'next': 'directive' }
]
}
}