xo 0.57.0 → 0.59.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/config/plugins.cjs +16 -15
- package/lib/options-manager.js +7 -1
- package/package.json +27 -26
- package/readme.md +3 -3
package/config/plugins.cjs
CHANGED
|
@@ -14,8 +14,7 @@ module.exports = {
|
|
|
14
14
|
'no-use-extend-native',
|
|
15
15
|
'ava',
|
|
16
16
|
'unicorn',
|
|
17
|
-
|
|
18
|
-
// 'promise',
|
|
17
|
+
'promise',
|
|
19
18
|
'import',
|
|
20
19
|
'n', // eslint-plugin-node's successor
|
|
21
20
|
'eslint-comments',
|
|
@@ -181,21 +180,23 @@ module.exports = {
|
|
|
181
180
|
// TODO: Temporarily disabled until it becomes more mature.
|
|
182
181
|
'unicorn/no-useless-undefined': 'off',
|
|
183
182
|
|
|
183
|
+
// TODO: Enable it when I have tried it more in practice.
|
|
184
|
+
'unicorn/prefer-string-raw': 'off',
|
|
185
|
+
|
|
184
186
|
// TODO: Temporarily disabled as the rule is buggy.
|
|
185
187
|
'function-call-argument-newline': 'off',
|
|
186
188
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
// 'promise/prefer-await-to-then': 'error',
|
|
189
|
+
'promise/param-names': 'error',
|
|
190
|
+
'promise/no-return-wrap': [
|
|
191
|
+
'error',
|
|
192
|
+
{
|
|
193
|
+
allowReject: true,
|
|
194
|
+
},
|
|
195
|
+
],
|
|
196
|
+
'promise/no-new-statics': 'error',
|
|
197
|
+
'promise/no-return-in-finally': 'error',
|
|
198
|
+
'promise/valid-params': 'error',
|
|
199
|
+
'promise/prefer-await-to-then': 'error',
|
|
199
200
|
|
|
200
201
|
'import/default': 'error',
|
|
201
202
|
'import/export': 'error',
|
|
@@ -356,7 +357,7 @@ module.exports = {
|
|
|
356
357
|
'n/process-exit-as-throw': 'error',
|
|
357
358
|
|
|
358
359
|
// Disabled as the rule doesn't exclude scripts executed with `node` but not referenced in 'bin'. See https://github.com/mysticatea/eslint-plugin-node/issues/96
|
|
359
|
-
// 'n/
|
|
360
|
+
// 'n/hashbang': 'error',
|
|
360
361
|
|
|
361
362
|
'n/no-deprecated-api': 'error',
|
|
362
363
|
|
package/lib/options-manager.js
CHANGED
|
@@ -101,7 +101,13 @@ The config files are searched starting from `options.filePath` if defined or `op
|
|
|
101
101
|
*/
|
|
102
102
|
const mergeWithFileConfig = async options => {
|
|
103
103
|
options.cwd = path.resolve(options.cwd || process.cwd());
|
|
104
|
-
|
|
104
|
+
|
|
105
|
+
const configExplorer = cosmiconfig(MODULE_NAME, {
|
|
106
|
+
searchPlaces: CONFIG_FILES,
|
|
107
|
+
loaders: {noExt: defaultLoaders['.json']},
|
|
108
|
+
stopDir: options.cwd,
|
|
109
|
+
});
|
|
110
|
+
|
|
105
111
|
const packageConfigExplorer = cosmiconfig('engines', {searchPlaces: ['package.json'], stopDir: options.cwd});
|
|
106
112
|
options.filePath &&= path.resolve(options.cwd, options.filePath);
|
|
107
113
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xo",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.59.0",
|
|
4
4
|
"description": "JavaScript/TypeScript linter (ESLint wrapper) with great defaults",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "xojs/xo",
|
|
@@ -54,53 +54,54 @@
|
|
|
54
54
|
"typescript"
|
|
55
55
|
],
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@eslint/eslintrc": "^3.
|
|
58
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
59
|
-
"@typescript-eslint/parser": "^
|
|
57
|
+
"@eslint/eslintrc": "^3.1.0",
|
|
58
|
+
"@typescript-eslint/eslint-plugin": "^7.16.1",
|
|
59
|
+
"@typescript-eslint/parser": "^7.16.1",
|
|
60
60
|
"arrify": "^3.0.0",
|
|
61
|
-
"cosmiconfig": "^
|
|
61
|
+
"cosmiconfig": "^9.0.0",
|
|
62
62
|
"define-lazy-prop": "^3.0.0",
|
|
63
|
-
"eslint": "^8.
|
|
63
|
+
"eslint": "^8.57.0",
|
|
64
64
|
"eslint-config-prettier": "^9.1.0",
|
|
65
|
-
"eslint-config-xo": "^0.
|
|
66
|
-
"eslint-config-xo-typescript": "^
|
|
65
|
+
"eslint-config-xo": "^0.45.0",
|
|
66
|
+
"eslint-config-xo-typescript": "^5.0.0",
|
|
67
67
|
"eslint-formatter-pretty": "^6.0.1",
|
|
68
68
|
"eslint-import-resolver-webpack": "^0.13.8",
|
|
69
69
|
"eslint-plugin-ava": "^14.0.0",
|
|
70
70
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
71
71
|
"eslint-plugin-import": "^2.29.1",
|
|
72
|
-
"eslint-plugin-n": "^
|
|
72
|
+
"eslint-plugin-n": "^17.9.0",
|
|
73
73
|
"eslint-plugin-no-use-extend-native": "^0.5.0",
|
|
74
|
-
"eslint-plugin-prettier": "^5.1
|
|
75
|
-
"eslint-plugin-
|
|
76
|
-
"
|
|
74
|
+
"eslint-plugin-prettier": "^5.2.1",
|
|
75
|
+
"eslint-plugin-promise": "^6.4.0",
|
|
76
|
+
"eslint-plugin-unicorn": "^54.0.0",
|
|
77
|
+
"esm-utils": "^4.3.0",
|
|
77
78
|
"find-cache-dir": "^5.0.0",
|
|
78
79
|
"find-up-simple": "^1.0.0",
|
|
79
80
|
"get-stdin": "^9.0.0",
|
|
80
|
-
"get-tsconfig": "^4.7.
|
|
81
|
-
"globby": "^14.0.
|
|
81
|
+
"get-tsconfig": "^4.7.5",
|
|
82
|
+
"globby": "^14.0.2",
|
|
82
83
|
"imurmurhash": "^0.1.4",
|
|
83
84
|
"json-stable-stringify-without-jsonify": "^1.0.1",
|
|
84
85
|
"lodash-es": "^4.17.21",
|
|
85
|
-
"meow": "^13.
|
|
86
|
-
"micromatch": "^4.0.
|
|
87
|
-
"open-editor": "^
|
|
88
|
-
"prettier": "^3.
|
|
89
|
-
"semver": "^7.6.
|
|
86
|
+
"meow": "^13.2.0",
|
|
87
|
+
"micromatch": "^4.0.7",
|
|
88
|
+
"open-editor": "^5.0.0",
|
|
89
|
+
"prettier": "^3.3.3",
|
|
90
|
+
"semver": "^7.6.3",
|
|
90
91
|
"slash": "^5.1.0",
|
|
91
92
|
"to-absolute-glob": "^3.0.0",
|
|
92
|
-
"typescript": "^5.
|
|
93
|
+
"typescript": "^5.5.3"
|
|
93
94
|
},
|
|
94
95
|
"devDependencies": {
|
|
95
|
-
"ava": "^6.1.
|
|
96
|
+
"ava": "^6.1.3",
|
|
96
97
|
"eslint-config-xo-react": "^0.27.0",
|
|
97
|
-
"eslint-plugin-react": "^7.
|
|
98
|
-
"eslint-plugin-react-hooks": "^4.6.
|
|
99
|
-
"execa": "^
|
|
100
|
-
"nyc": "^
|
|
98
|
+
"eslint-plugin-react": "^7.34.4",
|
|
99
|
+
"eslint-plugin-react-hooks": "^4.6.2",
|
|
100
|
+
"execa": "^9.3.0",
|
|
101
|
+
"nyc": "^17.0.0",
|
|
101
102
|
"proxyquire": "^2.1.3",
|
|
102
103
|
"temp-write": "^5.0.0",
|
|
103
|
-
"webpack": "^5.
|
|
104
|
+
"webpack": "^5.93.0"
|
|
104
105
|
},
|
|
105
106
|
"xo": {
|
|
106
107
|
"ignores": [
|
package/readme.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
> JavaScript/TypeScript linter (ESLint wrapper) with great defaults
|
|
10
10
|
|
|
11
11
|
[](https://codecov.io/gh/xojs/xo/branch/main)
|
|
12
|
-
[](https://github.com/xojs/xo)
|
|
12
|
+
[](https://github.com/xojs/xo)
|
|
13
13
|
|
|
14
14
|
Opinionated but configurable ESLint wrapper with lots of goodies included. Enforces strict and readable code. Never discuss code style on a pull request again! No decision-making. No `.eslintrc` to manage. It just works!
|
|
15
15
|
|
|
@@ -481,10 +481,10 @@ XO is based on ESLint. This project started out as just a shareable ESLint confi
|
|
|
481
481
|
|
|
482
482
|
## Badge
|
|
483
483
|
|
|
484
|
-
Show the world you're using XO → [](https://github.com/xojs/xo)
|
|
484
|
+
Show the world you're using XO → [](https://github.com/xojs/xo)
|
|
485
485
|
|
|
486
486
|
```md
|
|
487
|
-
[](https://github.com/xojs/xo)
|
|
487
|
+
[](https://github.com/xojs/xo)
|
|
488
488
|
```
|
|
489
489
|
|
|
490
490
|
Or [customize the badge](https://github.com/xojs/xo/issues/689#issuecomment-1253127616).
|