-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
98 lines (98 loc) · 2.95 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
module.exports = {
'root': true,
'parserOptions': {
'ecmaVersion': 2018,
'sourceType': 'module',
},
'env': {
'node': true,
'jest': true,
'es6': true,
'es2017': true,
},
'extends': [
'eslint:all',
'plugin:promise/recommended',
'plugin:jest/all',
],
'plugins': [
'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': 'off',
'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',
'jest/consistent-test-it': ["error", {"fn": "test"}],
// BUG: jest/require-top-level-describe doesn't seem to support
// describe.each()
'jest/require-top-level-describe': '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',
'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',
'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',
'no-unused-expressions': ['error', {
'allowShortCircuit': true,
'allowTernary': true,
'allowTaggedTemplates': true
}],
'no-unused-vars': 'warn',
'no-use-before-define': 'warn',
'no-warning-comments': 'off',
'object-curly-newline': 'off',
'object-property-newline': ['error', {
'allowAllPropertiesOnSameLine': true,
}],
'one-var': ['error', 'never'],
'padded-blocks': ['error', 'never'],
'prefer-destructuring': 'warn',
'quote-props': ['error', 'as-needed'],
'quotes': ['error', 'single', {'avoidEscape': true}],
'require-jsdoc': 'off',
'semi': ['error', 'never'],
'sort-imports': 'off',
'sort-keys': 'off',
'space-before-function-paren': ['error', {
'anonymous': 'always',
'named': 'never',
'asyncArrow': 'always',
}],
},
}