jest-preset-stylelint 7.3.0 → 9.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/README.md +2 -0
- package/getTestRule.js +1 -1
- package/getTestRuleConfigs.js +1 -1
- package/package.json +17 -18
package/README.md
CHANGED
|
@@ -22,6 +22,8 @@ Add the preset to your `jest.config.js` or `jest` field in `package.json`:
|
|
|
22
22
|
}
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
+
If your plugin is ESM, you'll need to [configure Jest appropriately](https://jestjs.io/docs/ecmascript-modules).
|
|
26
|
+
|
|
25
27
|
### Adjust setup globally
|
|
26
28
|
|
|
27
29
|
Optionally, you can avoid specifying `plugins` in every schema by defining your own setup file to configure the `testRule`/`testRuleConfigs` functions.
|
package/getTestRule.js
CHANGED
|
@@ -15,7 +15,7 @@ module.exports = function getTestRule(options = {}) {
|
|
|
15
15
|
const loadLint =
|
|
16
16
|
schema.loadLint ||
|
|
17
17
|
options.loadLint ||
|
|
18
|
-
(() => import('stylelint').then((m) => m.default.lint));
|
|
18
|
+
(() => import('stylelint').then((m) => m.default.lint));
|
|
19
19
|
|
|
20
20
|
/** @type {import('stylelint').PublicApi['lint']} */
|
|
21
21
|
let lint;
|
package/getTestRuleConfigs.js
CHANGED
|
@@ -18,7 +18,7 @@ module.exports = function getTestRuleConfigs(options = {}) {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
const loadLint =
|
|
21
|
-
schemaLoadLint || options.loadLint || (() => import('stylelint').then((m) => m.default.lint));
|
|
21
|
+
schemaLoadLint || options.loadLint || (() => import('stylelint').then((m) => m.default.lint));
|
|
22
22
|
|
|
23
23
|
/** @type {import('stylelint').PublicApi['lint']} */
|
|
24
24
|
let lint;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jest-preset-stylelint",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0",
|
|
4
4
|
"description": "Jest preset for Stylelint plugins.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"stylelint",
|
|
@@ -38,11 +38,10 @@
|
|
|
38
38
|
"lint:js": "eslint .",
|
|
39
39
|
"lint:md": "remark . --quiet --frail",
|
|
40
40
|
"lint:types": "tsc",
|
|
41
|
-
"
|
|
41
|
+
"prepare": "husky",
|
|
42
42
|
"pretest": "npm run lint",
|
|
43
43
|
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
|
|
44
|
-
"watch": "npm --ignore-scripts test -- --watch"
|
|
45
|
-
"prepare": "husky"
|
|
44
|
+
"watch": "npm --ignore-scripts test -- --watch"
|
|
46
45
|
},
|
|
47
46
|
"lint-staged": {
|
|
48
47
|
"*.js": "eslint --cache --fix",
|
|
@@ -60,27 +59,27 @@
|
|
|
60
59
|
"testRegex": ".*\\.test\\.m?js$"
|
|
61
60
|
},
|
|
62
61
|
"devDependencies": {
|
|
63
|
-
"@stylelint/prettier-config": "^
|
|
62
|
+
"@stylelint/prettier-config": "^4.0.0",
|
|
64
63
|
"@stylelint/remark-preset": "^5.1.1",
|
|
65
|
-
"@types/jest": "^
|
|
66
|
-
"eslint": "^9.
|
|
67
|
-
"eslint-config-stylelint": "^
|
|
68
|
-
"eslint-plugin-jest": "^
|
|
64
|
+
"@types/jest": "^30.0.0",
|
|
65
|
+
"eslint": "^9.39.2",
|
|
66
|
+
"eslint-config-stylelint": "^26.0.0",
|
|
67
|
+
"eslint-plugin-jest": "^29.11.0",
|
|
69
68
|
"husky": "^9.1.7",
|
|
70
|
-
"jest": "^
|
|
71
|
-
"jest-light-runner": "^0.
|
|
72
|
-
"lint-staged": "^
|
|
73
|
-
"np": "^10.2.0",
|
|
69
|
+
"jest": "^30.2.0",
|
|
70
|
+
"jest-light-runner": "^0.7.10",
|
|
71
|
+
"lint-staged": "^16.2.7",
|
|
74
72
|
"npm-run-all": "^4.1.5",
|
|
75
|
-
"prettier": "^3.
|
|
73
|
+
"prettier": "^3.7.4",
|
|
76
74
|
"remark-cli": "^12.0.1",
|
|
77
|
-
"stylelint": "^
|
|
78
|
-
"typescript": "^5.
|
|
75
|
+
"stylelint": "^17.0.0",
|
|
76
|
+
"typescript": "^5.9.3"
|
|
79
77
|
},
|
|
80
78
|
"peerDependencies": {
|
|
81
|
-
"jest": "^
|
|
79
|
+
"jest": "^30.2.0",
|
|
80
|
+
"stylelint": "^17.0.0"
|
|
82
81
|
},
|
|
83
82
|
"engines": {
|
|
84
|
-
"node": ">=
|
|
83
|
+
"node": ">=20.19.0"
|
|
85
84
|
}
|
|
86
85
|
}
|