xo 0.25.0 → 0.25.4
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/config/plugins.js +15 -2
- package/index.js +1 -1
- package/lib/options-manager.js +5 -0
- package/package.json +1 -1
- package/readme.md +2 -1
package/config/plugins.js
CHANGED
|
@@ -50,6 +50,14 @@ module.exports = {
|
|
|
50
50
|
// TODO: Remove this override when the rule is more stable.
|
|
51
51
|
'unicorn/consistent-function-scoping': 'off',
|
|
52
52
|
|
|
53
|
+
// TODO: Change the rule default for this.
|
|
54
|
+
'unicorn/expiring-todo-comments': [
|
|
55
|
+
'error',
|
|
56
|
+
{
|
|
57
|
+
allowWarningComments: true
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
|
|
53
61
|
// TODO: Temporarily disabled as the rule is buggy.
|
|
54
62
|
'function-call-argument-newline': 'off',
|
|
55
63
|
|
|
@@ -134,7 +142,9 @@ module.exports = {
|
|
|
134
142
|
// }
|
|
135
143
|
// ],
|
|
136
144
|
|
|
137
|
-
|
|
145
|
+
// Disabled because of https://github.com/benmosher/eslint-plugin-import/pull/1651 and other issues.
|
|
146
|
+
// 'import/order': 'error',
|
|
147
|
+
|
|
138
148
|
'import/no-unassigned-import': [
|
|
139
149
|
'error',
|
|
140
150
|
{
|
|
@@ -237,6 +247,9 @@ module.exports = {
|
|
|
237
247
|
// 'eslint-comments/no-unlimited-disable': 'error',
|
|
238
248
|
|
|
239
249
|
'eslint-comments/no-unused-disable': 'error',
|
|
240
|
-
'eslint-comments/no-unused-enable': 'error'
|
|
250
|
+
'eslint-comments/no-unused-enable': 'error',
|
|
251
|
+
|
|
252
|
+
// Disabled by default, enabled only in Node.js >= 11 in option-manager.js
|
|
253
|
+
'unicorn/prefer-flat-map': 'off'
|
|
241
254
|
}
|
|
242
255
|
};
|
package/index.js
CHANGED
package/lib/options-manager.js
CHANGED
|
@@ -107,6 +107,9 @@ const ENGINE_RULES = {
|
|
|
107
107
|
},
|
|
108
108
|
'prefer-named-capture-group': {
|
|
109
109
|
'10.0.0': 'error'
|
|
110
|
+
},
|
|
111
|
+
'unicorn/prefer-flat-map': {
|
|
112
|
+
'11.0.0': 'error'
|
|
110
113
|
}
|
|
111
114
|
};
|
|
112
115
|
|
|
@@ -304,6 +307,8 @@ const buildConfig = options => {
|
|
|
304
307
|
if (options.prettier) {
|
|
305
308
|
// Disable formatting rules conflicting with Prettier
|
|
306
309
|
config.rules['unicorn/number-literal-case'] = 'off';
|
|
310
|
+
// Can be re-enabled when https://github.com/prettier/prettier/issues/4157 is fixed
|
|
311
|
+
config.rules['unicorn/no-nested-ternary'] = 'off';
|
|
307
312
|
// The prettier plugin uses Prettier to format the code with `--fix`
|
|
308
313
|
config.plugins = config.plugins.concat('prettier');
|
|
309
314
|
// The prettier config overrides ESLint stylistic rules that are handled by Prettier
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -388,7 +388,8 @@ XO is based on ESLint. This project started out as just a shareable ESLint confi
|
|
|
388
388
|
|
|
389
389
|
- [Gulp](https://github.com/xojs/gulp-xo)
|
|
390
390
|
- [Grunt](https://github.com/xojs/grunt-xo)
|
|
391
|
-
- [webpack](https://github.com/Semigradsky/xo-loader)
|
|
391
|
+
- [webpack loader](https://github.com/Semigradsky/xo-loader)
|
|
392
|
+
- [webpack plugin](https://github.com/nstanard/xo-webpack-plugin)
|
|
392
393
|
- [Metalsmith](https://github.com/blainsmith/metalsmith-xo)
|
|
393
394
|
- [Fly](https://github.com/lukeed/fly-xo)
|
|
394
395
|
|