jest-preset-stylelint 7.1.1 → 7.2.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/getTestRule.js +2 -0
- package/index.d.ts +14 -0
- package/package.json +6 -6
package/getTestRule.js
CHANGED
|
@@ -70,6 +70,7 @@ module.exports = function getTestRule(options = {}) {
|
|
|
70
70
|
config: stylelintConfig,
|
|
71
71
|
customSyntax: schema.customSyntax,
|
|
72
72
|
codeFilename: testCase.codeFilename || schema.codeFilename,
|
|
73
|
+
computeEditInfo: schema.computeEditInfo,
|
|
73
74
|
};
|
|
74
75
|
|
|
75
76
|
const outputAfterLint = await lint(stylelintOptions).catch(formatExceptions);
|
|
@@ -92,6 +93,7 @@ module.exports = function getTestRule(options = {}) {
|
|
|
92
93
|
column: expected.column,
|
|
93
94
|
endLine: expected.endLine,
|
|
94
95
|
endColumn: expected.endColumn,
|
|
96
|
+
fix: expected.fix,
|
|
95
97
|
};
|
|
96
98
|
|
|
97
99
|
for (const [key, value] of Object.entries(expectedWarning)) {
|
package/index.d.ts
CHANGED
|
@@ -57,6 +57,13 @@ export type Warning = {
|
|
|
57
57
|
* Expected end column number of the warning.
|
|
58
58
|
*/
|
|
59
59
|
endColumn?: number;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Expected `EditInfo` of the warning.
|
|
63
|
+
*
|
|
64
|
+
* @experimental
|
|
65
|
+
*/
|
|
66
|
+
fix?: { range: [number, number]; text: string };
|
|
60
67
|
};
|
|
61
68
|
|
|
62
69
|
/**
|
|
@@ -108,6 +115,13 @@ export type TestSchema = {
|
|
|
108
115
|
*/
|
|
109
116
|
fix?: boolean;
|
|
110
117
|
|
|
118
|
+
/**
|
|
119
|
+
* Turn on computing `EditInfo`. Default: `false`.
|
|
120
|
+
*
|
|
121
|
+
* @experimental
|
|
122
|
+
*/
|
|
123
|
+
computeEditInfo?: boolean;
|
|
124
|
+
|
|
111
125
|
/**
|
|
112
126
|
* Maps to Stylelint's `plugins` configuration property.
|
|
113
127
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jest-preset-stylelint",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.2.0",
|
|
4
4
|
"description": "Jest preset for Stylelint plugins.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"stylelint",
|
|
@@ -63,18 +63,18 @@
|
|
|
63
63
|
"@stylelint/prettier-config": "^3.0.0",
|
|
64
64
|
"@stylelint/remark-preset": "^5.1.1",
|
|
65
65
|
"@types/jest": "^29.5.14",
|
|
66
|
-
"eslint": "^9.
|
|
66
|
+
"eslint": "^9.17.0",
|
|
67
67
|
"eslint-config-stylelint": "^23.0.0",
|
|
68
|
-
"eslint-plugin-jest": "^28.
|
|
68
|
+
"eslint-plugin-jest": "^28.10.0",
|
|
69
69
|
"husky": "^9.1.7",
|
|
70
70
|
"jest": "^29.7.0",
|
|
71
71
|
"jest-light-runner": "^0.6.0",
|
|
72
|
-
"lint-staged": "^15.
|
|
72
|
+
"lint-staged": "^15.3.0",
|
|
73
73
|
"np": "^10.1.0",
|
|
74
74
|
"npm-run-all": "^4.1.5",
|
|
75
|
-
"prettier": "^3.4.
|
|
75
|
+
"prettier": "^3.4.2",
|
|
76
76
|
"remark-cli": "^12.0.1",
|
|
77
|
-
"stylelint": "^16.
|
|
77
|
+
"stylelint": "^16.14.0",
|
|
78
78
|
"typescript": "^5.7.2"
|
|
79
79
|
},
|
|
80
80
|
"peerDependencies": {
|