@markuplint/rules 4.10.7 → 4.10.8

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/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [4.10.8](https://github.com/markuplint/markuplint/compare/@markuplint/rules@4.10.7...@markuplint/rules@4.10.8) (2025-02-04)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **rules:** fix verifing pretendered label element ([9b3266a](https://github.com/markuplint/markuplint/commit/9b3266a4f08ca725586672054f1353b1c663babc)), closes [#2392](https://github.com/markuplint/markuplint/issues/2392)
11
+
6
12
  ## [4.10.7](https://github.com/markuplint/markuplint/compare/@markuplint/rules@4.10.6...@markuplint/rules@4.10.7) (2024-12-04)
7
13
 
8
14
  **Note:** Version bump only for package @markuplint/rules
@@ -9,6 +9,12 @@ export default createRule({
9
9
  if (el.localName !== 'label') {
10
10
  return;
11
11
  }
12
+ // If the label is a pretender, the descendants are unknown, so end the verification.
13
+ // However, if the `as` attribute is explicitly specified, the descendant relationship is clear,
14
+ // so verify it as a normal element.
15
+ if (el.pretenderContext?.type === 'pretender' && !el.hasAttribute('as')) {
16
+ return;
17
+ }
12
18
  if (el.children.length === 0 && !el.hasAttribute('for')) {
13
19
  report({
14
20
  scope: el,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@markuplint/rules",
3
- "version": "4.10.7",
3
+ "version": "4.10.8",
4
4
  "description": "Built-in rules of markuplint",
5
5
  "repository": "git@github.com:markuplint/markuplint.git",
6
6
  "author": "Yusuke Hirao <yusukehirao@me.com>",
@@ -25,18 +25,18 @@
25
25
  "./lib/permitted-contents/debug.js": "./lib/permitted-contents/debug.browser.js"
26
26
  },
27
27
  "dependencies": {
28
- "@markuplint/html-spec": "4.11.1",
29
- "@markuplint/ml-core": "4.11.0",
30
- "@markuplint/ml-spec": "4.9.1",
31
- "@markuplint/selector": "4.6.14",
28
+ "@markuplint/html-spec": "4.12.0",
29
+ "@markuplint/ml-core": "4.12.0",
30
+ "@markuplint/ml-spec": "4.9.2",
31
+ "@markuplint/selector": "4.7.0",
32
32
  "@markuplint/shared": "4.4.10",
33
- "@markuplint/types": "4.7.1",
33
+ "@markuplint/types": "4.7.2",
34
34
  "@types/debug": "4.1.12",
35
- "@ungap/structured-clone": "1.2.0",
35
+ "@ungap/structured-clone": "1.3.0",
36
36
  "ansi-colors": "4.1.3",
37
- "chrono-node": "2.7.7",
38
- "debug": "4.3.7",
39
- "type-fest": "4.30.0"
37
+ "chrono-node": "2.7.8",
38
+ "debug": "4.4.0",
39
+ "type-fest": "4.33.0"
40
40
  },
41
- "gitHead": "2a067903214e5633bd9b77690613837ead9683c3"
41
+ "gitHead": "687a84e00546b8f1f2ed88125fe507239723c8d8"
42
42
  }