eslint-config-xo 0.22.2 → 0.24.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esnext.js +18 -4
- package/index.js +11 -1
- package/package.json +3 -3
package/esnext.js
CHANGED
|
@@ -13,17 +13,31 @@ module.exports = {
|
|
|
13
13
|
destructuring: 'all'
|
|
14
14
|
}
|
|
15
15
|
],
|
|
16
|
-
'prefer-numeric-literals':
|
|
16
|
+
'prefer-numeric-literals': 'error',
|
|
17
17
|
'prefer-rest-params': 'error',
|
|
18
18
|
'prefer-spread': 'error',
|
|
19
|
+
// TODO: Enable this when targeting Node.js 8
|
|
20
|
+
// 'prefer-object-spread': 'error',
|
|
19
21
|
'prefer-destructuring': [
|
|
20
22
|
'error',
|
|
21
23
|
{
|
|
22
|
-
//
|
|
24
|
+
// `array` is disabled because it forces destructuring on
|
|
23
25
|
// stupid stuff like `foo.bar = process.argv[2];`
|
|
24
26
|
// TODO: Open ESLint issue about this
|
|
25
|
-
|
|
26
|
-
|
|
27
|
+
VariableDeclarator: {
|
|
28
|
+
array: false,
|
|
29
|
+
object: true
|
|
30
|
+
},
|
|
31
|
+
AssignmentExpression: {
|
|
32
|
+
array: false,
|
|
33
|
+
|
|
34
|
+
// Disabled because object assignment destructuring requires parens wrapping:
|
|
35
|
+
// `let foo; ({foo} = object);`
|
|
36
|
+
object: false
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
enforceForRenamedProperties: false
|
|
27
41
|
}
|
|
28
42
|
]
|
|
29
43
|
}
|
package/index.js
CHANGED
|
@@ -16,6 +16,7 @@ module.exports = {
|
|
|
16
16
|
'comma-dangle': ['error', 'never'],
|
|
17
17
|
'for-direction': 'error',
|
|
18
18
|
'getter-return': 'error',
|
|
19
|
+
'no-async-promise-executor': 'error',
|
|
19
20
|
'no-await-in-loop': 'error',
|
|
20
21
|
'no-compare-neg-zero': 'error',
|
|
21
22
|
'no-cond-assign': 'error',
|
|
@@ -41,6 +42,7 @@ module.exports = {
|
|
|
41
42
|
'no-inner-declarations': 'error',
|
|
42
43
|
'no-invalid-regexp': 'error',
|
|
43
44
|
'no-irregular-whitespace': 'error',
|
|
45
|
+
'no-misleading-character-class': 'error',
|
|
44
46
|
'no-obj-calls': 'error',
|
|
45
47
|
'no-prototype-builtins': 'error',
|
|
46
48
|
'no-regex-spaces': 'error',
|
|
@@ -49,6 +51,7 @@ module.exports = {
|
|
|
49
51
|
'no-unreachable': 'error',
|
|
50
52
|
'no-unsafe-finally': 'error',
|
|
51
53
|
'no-unsafe-negation': 'error',
|
|
54
|
+
'require-atomic-updates': 'error',
|
|
52
55
|
'use-isnan': 'error',
|
|
53
56
|
'valid-typeof': ['error', {requireStringLiterals: false}],
|
|
54
57
|
'no-unexpected-multiline': 'error',
|
|
@@ -112,6 +115,12 @@ module.exports = {
|
|
|
112
115
|
'no-with': 'error',
|
|
113
116
|
'prefer-promise-reject-errors': ['error', {allowEmptyReject: true}],
|
|
114
117
|
radix: 'error',
|
|
118
|
+
|
|
119
|
+
// Disabled for now as it causes too much churn
|
|
120
|
+
// TODO: Enable it in the future when I have time to deal with
|
|
121
|
+
// the churn and the rule is stable and has an autofixer
|
|
122
|
+
// 'require-unicode-regexp': 'error',
|
|
123
|
+
|
|
115
124
|
'wrap-iife': ['error', 'inside', {functionPrototypeMethods: true}],
|
|
116
125
|
yoda: 'error',
|
|
117
126
|
'no-delete-var': 'error',
|
|
@@ -141,6 +150,7 @@ module.exports = {
|
|
|
141
150
|
'no-restricted-modules': ['error', 'domain', 'freelist', 'smalloc', 'sys', 'colors'],
|
|
142
151
|
'array-bracket-newline': ['error', 'consistent'],
|
|
143
152
|
'array-bracket-spacing': ['error', 'never'],
|
|
153
|
+
'array-element-newline': ['error', 'consistent'],
|
|
144
154
|
'brace-style': ['error', '1tbs', {
|
|
145
155
|
allowSingleLine: false
|
|
146
156
|
}],
|
|
@@ -161,7 +171,7 @@ module.exports = {
|
|
|
161
171
|
'computed-property-spacing': ['error', 'never'],
|
|
162
172
|
'eol-last': 'error',
|
|
163
173
|
'func-call-spacing': ['error', 'never'],
|
|
164
|
-
'func-name-matching': 'error',
|
|
174
|
+
'func-name-matching': ['error', {considerPropertyDescriptor: true}],
|
|
165
175
|
'func-names': ['error', 'never'],
|
|
166
176
|
indent: ['error', 'tab', {
|
|
167
177
|
SwitchCase: 1
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-xo",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.2",
|
|
4
4
|
"description": "ESLint shareable config for XO",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "xojs/eslint-config-xo",
|
|
@@ -51,11 +51,11 @@
|
|
|
51
51
|
],
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"ava": "*",
|
|
54
|
-
"eslint": "^
|
|
54
|
+
"eslint": "^5.3.0",
|
|
55
55
|
"is-plain-obj": "^1.0.0",
|
|
56
56
|
"temp-write": "^3.1.0"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
|
-
"eslint": ">=
|
|
59
|
+
"eslint": ">=5.3.0"
|
|
60
60
|
}
|
|
61
61
|
}
|