jest-preset-stylelint 7.0.1 → 7.1.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 CHANGED
@@ -39,7 +39,7 @@ module.exports = function getTestRule(options = {}) {
39
39
  code: testCase.code,
40
40
  config: stylelintConfig,
41
41
  customSyntax: schema.customSyntax,
42
- codeFilename: schema.codeFilename,
42
+ codeFilename: testCase.codeFilename || schema.codeFilename,
43
43
  };
44
44
 
45
45
  const output = await lint(stylelintOptions);
@@ -67,7 +67,7 @@ module.exports = function getTestRule(options = {}) {
67
67
  code: testCase.code,
68
68
  config: stylelintConfig,
69
69
  customSyntax: schema.customSyntax,
70
- codeFilename: schema.codeFilename,
70
+ codeFilename: testCase.codeFilename || schema.codeFilename,
71
71
  };
72
72
 
73
73
  const outputAfterLint = await lint(stylelintOptions);
package/index.d.ts CHANGED
@@ -4,6 +4,11 @@ export type TestCase = {
4
4
  */
5
5
  code: string;
6
6
 
7
+ /**
8
+ * The filename for this `code` property.
9
+ */
10
+ codeFilename?: string;
11
+
7
12
  /**
8
13
  * Description of the test case.
9
14
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jest-preset-stylelint",
3
- "version": "7.0.1",
3
+ "version": "7.1.0",
4
4
  "description": "Jest preset for Stylelint plugins.",
5
5
  "keywords": [
6
6
  "stylelint",
@@ -73,21 +73,21 @@
73
73
  },
74
74
  "devDependencies": {
75
75
  "@stylelint/prettier-config": "^3.0.0",
76
- "@stylelint/remark-preset": "^5.1.0",
76
+ "@stylelint/remark-preset": "^5.1.1",
77
77
  "@types/jest": "^29.5.12",
78
78
  "eslint": "^8.57.0",
79
79
  "eslint-config-stylelint": "^21.0.0",
80
- "eslint-plugin-jest": "^28.5.0",
80
+ "eslint-plugin-jest": "^28.6.0",
81
81
  "husky": "^9.0.11",
82
82
  "jest": "^29.7.0",
83
83
  "jest-light-runner": "^0.6.0",
84
- "lint-staged": "^15.2.5",
85
- "np": "^10.0.5",
84
+ "lint-staged": "^15.2.7",
85
+ "np": "^10.0.6",
86
86
  "npm-run-all": "^4.1.5",
87
- "prettier": "^3.3.0",
87
+ "prettier": "^3.3.2",
88
88
  "remark-cli": "^12.0.1",
89
89
  "stylelint": "^16.6.1",
90
- "typescript": "^5.4.5"
90
+ "typescript": "^5.5.3"
91
91
  },
92
92
  "peerDependencies": {
93
93
  "jest": "^29.0.2"