eslint-config-xo 4.0.0 → 5.0.0
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/index.js +3 -0
- package/package.json +13 -17
- package/readme.md +1 -1
- package/source/json.js +3 -1
- package/source/typescript-rules.js +16 -0
package/index.js
CHANGED
|
@@ -14,6 +14,7 @@ import pluginComments from '@eslint-community/eslint-plugin-eslint-comments';
|
|
|
14
14
|
import pluginAva from 'eslint-plugin-ava';
|
|
15
15
|
import pluginNodeTest from 'eslint-node-test';
|
|
16
16
|
import pluginPackageJson from 'eslint-package-json';
|
|
17
|
+
import pluginCssicorn from 'eslint-cssicorn';
|
|
17
18
|
import {fixupPluginRules} from '@eslint/compat';
|
|
18
19
|
import pluginPrettier from 'eslint-plugin-prettier';
|
|
19
20
|
import eslintConfigPrettier from 'eslint-config-prettier';
|
|
@@ -432,6 +433,7 @@ export default function eslintConfigXo({
|
|
|
432
433
|
name: 'xo/css',
|
|
433
434
|
plugins: {
|
|
434
435
|
css,
|
|
436
|
+
cssicorn: pluginCssicorn,
|
|
435
437
|
},
|
|
436
438
|
files: [
|
|
437
439
|
'**/*.css',
|
|
@@ -448,6 +450,7 @@ export default function eslintConfigXo({
|
|
|
448
450
|
// TODO: Enable when false positives with CSS variables are fixed: https://github.com/eslint/css/issues/199
|
|
449
451
|
// 'css/no-invalid-properties': 'error',
|
|
450
452
|
'css/no-unmatchable-selectors': 'error',
|
|
453
|
+
...pluginCssicorn.configs.recommended.rules,
|
|
451
454
|
},
|
|
452
455
|
},
|
|
453
456
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-xo",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "ESLint shareable config for XO",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "xojs/eslint-config-xo",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"node": ">=22"
|
|
17
17
|
},
|
|
18
18
|
"scripts": {
|
|
19
|
-
"test": "eslint &&
|
|
19
|
+
"test": "eslint && node --test --test-timeout=600000 'test/[!_]*.js'"
|
|
20
20
|
},
|
|
21
21
|
"files": [
|
|
22
22
|
"index.js",
|
|
@@ -61,23 +61,23 @@
|
|
|
61
61
|
"@stylistic/eslint-plugin": "^5.10.0",
|
|
62
62
|
"confusing-browser-globals": "^1.0.11",
|
|
63
63
|
"eslint-config-prettier": "^10.1.8",
|
|
64
|
+
"eslint-cssicorn": "^0.1.0",
|
|
64
65
|
"eslint-import-resolver-typescript": "^4.4.5",
|
|
65
|
-
"eslint-node-test": "^0.
|
|
66
|
-
"eslint-package-json": "^
|
|
66
|
+
"eslint-node-test": "^1.0.1",
|
|
67
|
+
"eslint-package-json": "^2.0.0",
|
|
67
68
|
"eslint-plugin-ava": "^17.0.1",
|
|
68
69
|
"eslint-plugin-import-x": "^4.17.1",
|
|
69
|
-
"eslint-plugin-jsdoc": "^
|
|
70
|
-
"eslint-plugin-n": "^18.
|
|
70
|
+
"eslint-plugin-jsdoc": "^65.0.2",
|
|
71
|
+
"eslint-plugin-n": "^18.4.1",
|
|
71
72
|
"eslint-plugin-prettier": "^5.5.6",
|
|
72
|
-
"eslint-plugin-regexp": "^3.3.
|
|
73
|
-
"eslint-plugin-unicorn": "^
|
|
74
|
-
"globals": "^17.
|
|
75
|
-
"typescript-eslint": "^8.
|
|
73
|
+
"eslint-plugin-regexp": "^3.3.1",
|
|
74
|
+
"eslint-plugin-unicorn": "^77.0.0",
|
|
75
|
+
"globals": "^17.13.0",
|
|
76
|
+
"typescript-eslint": "^8.71.0"
|
|
76
77
|
},
|
|
77
78
|
"devDependencies": {
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"prettier": "^3.9.8",
|
|
79
|
+
"eslint": "^10.12.0",
|
|
80
|
+
"prettier": "^3.9.9",
|
|
81
81
|
"typescript": "^6.0.3"
|
|
82
82
|
},
|
|
83
83
|
"peerDependencies": {
|
|
@@ -92,9 +92,5 @@
|
|
|
92
92
|
"typescript": {
|
|
93
93
|
"optional": true
|
|
94
94
|
}
|
|
95
|
-
},
|
|
96
|
-
"ava": {
|
|
97
|
-
"serial": true,
|
|
98
|
-
"timeout": "10m"
|
|
99
95
|
}
|
|
100
96
|
}
|
package/readme.md
CHANGED
|
@@ -156,7 +156,7 @@ import {foo, bar} from 'x';
|
|
|
156
156
|
|
|
157
157
|
XO is an ESLint wrapper with great defaults.
|
|
158
158
|
|
|
159
|
-
Here are some
|
|
159
|
+
Here are some reasons why you should use the [XO CLI](https://github.com/xojs/xo) instead of this config:
|
|
160
160
|
|
|
161
161
|
- XO comes bundled with this config.
|
|
162
162
|
- [Beautiful output.](https://github.com/sindresorhus/eslint-formatter-pretty)
|
package/source/json.js
CHANGED
|
@@ -343,6 +343,22 @@ export const typescriptRules = {
|
|
|
343
343
|
checkThenables: true,
|
|
344
344
|
ignoreVoid: true, // Prepend a function call with `void` to mark it as not needing to be await'ed, which silences this rule.
|
|
345
345
|
ignoreIIFE: true,
|
|
346
|
+
// `node:test` functions return promises that do not need to be awaited.
|
|
347
|
+
allowForKnownSafeCalls: [
|
|
348
|
+
{
|
|
349
|
+
from: 'package',
|
|
350
|
+
package: 'node:test',
|
|
351
|
+
name: [
|
|
352
|
+
'test',
|
|
353
|
+
'it',
|
|
354
|
+
'describe',
|
|
355
|
+
'suite',
|
|
356
|
+
'skip',
|
|
357
|
+
'todo',
|
|
358
|
+
'only',
|
|
359
|
+
],
|
|
360
|
+
},
|
|
361
|
+
],
|
|
346
362
|
},
|
|
347
363
|
],
|
|
348
364
|
'@typescript-eslint/no-for-in-array': 'error',
|