-
Notifications
You must be signed in to change notification settings - Fork 5
/
.eslintrc.js
102 lines (102 loc) · 2.96 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
module.exports = {
root: true,
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
},
env: {
node: true,
jest: true,
},
extends: [
'eslint:all',
'plugin:promise/recommended',
'plugin:jest/all',
],
plugins: [
// eslint-plugin-jest
'jest',
],
rules: {
'array-bracket-newline': ['error', 'consistent'],
'array-element-newline': 'off',
'arrow-body-style': 'off',
'brace-style': ['error', '1tbs', {allowSingleLine: true}],
camelcase: 'warn',
'capitalized-comments': ['warn', 'always', {
ignoreConsecutiveComments: true,
}],
'comma-dangle': ['error', 'always-multiline'],
curly: ['error', 'multi-line'],
'dot-location': ['error', 'property'],
eqeqeq: ['error', 'smart'],
'func-names': 'off',
'func-style': ['error', 'declaration', {allowArrowFunctions: true}],
'function-call-argument-newline': ['error', 'consistent'],
'guard-for-in': 'off',
'id-length': 'off',
indent: ['error', 2],
'init-declarations': 'off',
'line-comment-position': 'off',
'linebreak-style': ['error', 'unix'],
'lines-around-comment': 'off',
'max-len': ['warn', {ignoreTrailingComments: true}],
'max-lines-per-function': 'off',
'max-statements': 'off',
'max-statements-per-line': 'off',
'multiline-comment-style': ['error', 'separate-lines'],
'multiline-ternary': ['error', 'always-multiline'],
'new-cap': 'off',
// 'babel/new-cap': 1,
'newline-per-chained-call': 'off',
'no-alert': 'warn',
'no-confusing-arrow': 'off',
'no-console': 'warn',
'no-continue': 'off',
'no-eq-null': 'off',
'no-extra-semi': 'error',
'no-inline-comments': 'off',
'babel/no-invalid-this': 2,
'no-invalid-this': 'off',
'no-magic-numbers': 'off',
'no-mixed-operators': 'off',
'no-multi-assign': 'off',
'no-multi-str': 'off',
'no-new': 'warn',
'no-plusplus': 'off',
'no-prototype-builtins': 'off',
'no-ternary': 'off',
'no-underscore-dangle': 'off',
// 'babel/no-unused-expressions': 1,
'no-unused-expressions': ['error', {
allowShortCircuit: true,
allowTernary: true,
allowTaggedTemplates: true,
}],
'no-unused-vars': 'warn',
'no-use-before-define': 'off',
'no-warning-comments': 'warn',
'object-curly-newline': 'off',
// 'babel/object-curly-spacing': 1,
'object-property-newline': ['error', {
allowAllPropertiesOnSameLine: true,
}],
'one-var': ['error', 'never'],
'padded-blocks': ['error', 'never'],
'prefer-destructuring': 'warn',
'quote-props': ['error', 'as-needed'],
// 'babel/quotes': 1,
quotes: ['error', 'single', {avoidEscape: true}],
'require-jsdoc': 'off',
// 'babel/semi': 1,
semi: ['error', 'never'],
'sort-imports': 'off',
'sort-keys': 'off',
'space-before-function-paren': ['error', {
anonymous: 'always',
named: 'never',
asyncArrow: 'always',
}],
// 'babel/valid-typeof': 1
},
}