@markuplint/rules 5.6.0 → 5.6.1

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,13 @@
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
+ ## [5.6.1](https://github.com/markuplint/markuplint/compare/v5.6.0...v5.6.1) (2026-11-13)
7
+
8
+ ### Bug Fixes
9
+
10
+ * **rules:** report in no-duplicate-attr what the framework counts as a repeat ([5164c08](https://github.com/markuplint/markuplint/commit/5164c08ceca6f74f6e71544080d5b58fb2d8cbfd))
11
+
12
+
6
13
  # [5.6.0](https://github.com/markuplint/markuplint/compare/v5.5.0...v5.6.0) (2026-11-12)
7
14
 
8
15
  ### Bug Fixes
@@ -6,13 +6,16 @@ export default createRule({
6
6
  async verify({ document, report, t }) {
7
7
  const message = t('{0} is {1:c}', t('the {0}', 'attribute name'), 'duplicated');
8
8
  await document.walkOn('Element', node => {
9
- const attrNameStack = [];
9
+ const keyStack = [];
10
10
  for (const attr of node.getAttributeTokens()) {
11
- if (attr.isDuplicatable) {
11
+ // A directive is not an attribute of the DOM, so the name that it resolves to says nothing of a
12
+ // repeat: the framework tells it by the key that it keeps of the name as written, which
13
+ // `MLAttr#duplicateKey` is, and for an attribute of the DOM it is the name that the DOM gives.
14
+ const key = attr.duplicateKey;
15
+ if (key === null) {
12
16
  continue;
13
17
  }
14
- const name = attr.nameKey;
15
- if (attrNameStack.includes(name)) {
18
+ if (keyStack.includes(key)) {
16
19
  const scope = attr.nameNode ?? attr;
17
20
  report({
18
21
  scope: {
@@ -26,7 +29,7 @@ export default createRule({
26
29
  });
27
30
  }
28
31
  else {
29
- attrNameStack.push(name);
32
+ keyStack.push(key);
30
33
  }
31
34
  }
32
35
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@markuplint/rules",
3
- "version": "5.6.0",
3
+ "version": "5.6.1",
4
4
  "description": "Built-in rules of markuplint",
5
5
  "repository": {
6
6
  "type": "git",
@@ -31,11 +31,11 @@
31
31
  "./lib/permitted-contents/debug.js": "./lib/permitted-contents/debug.browser.js"
32
32
  },
33
33
  "dependencies": {
34
- "@markuplint/html-spec": "5.6.0",
35
- "@markuplint/ml-config": "5.6.0",
36
- "@markuplint/ml-core": "5.6.0",
37
- "@markuplint/ml-spec": "5.6.0",
38
- "@markuplint/selector": "5.6.0",
34
+ "@markuplint/html-spec": "5.6.1",
35
+ "@markuplint/ml-config": "5.6.1",
36
+ "@markuplint/ml-core": "5.6.1",
37
+ "@markuplint/ml-spec": "5.6.1",
38
+ "@markuplint/selector": "5.6.1",
39
39
  "@markuplint/shared": "5.6.0",
40
40
  "@markuplint/types": "5.6.0",
41
41
  "@mdn/browser-compat-data": "^8.1.8",
@@ -48,7 +48,7 @@
48
48
  "type-fest": "^5.10.0"
49
49
  },
50
50
  "devDependencies": {
51
- "@markuplint/test-tools": "5.6.0"
51
+ "@markuplint/test-tools": "5.6.1"
52
52
  },
53
- "gitHead": "eade3d7202682e567f3c1b6985478f1d4b5c5481"
53
+ "gitHead": "a9245162df3699c4880469f493aaaf6103343d83"
54
54
  }