@markuplint/rules 5.0.0-rc.6 → 5.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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
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.0.0](https://github.com/markuplint/markuplint/compare/v5.0.0-rc.7...v5.0.0) (2026-09-11)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **rules:** add role predefined group to attr-order ([ed07019](https://github.com/markuplint/markuplint/commit/ed07019cafaf5dc85ce5c5e6f4ac56f908b93b54)), closes [#4033](https://github.com/markuplint/markuplint/issues/4033)
|
|
11
|
+
|
|
12
|
+
# [5.0.0-rc.7](https://github.com/markuplint/markuplint/compare/v5.0.0-rc.6...v5.0.0-rc.7) (2026-08-31)
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
- **rules:** exempt no-unclosed-element-at-eof for never-close-tag parsers ([4f426d9](https://github.com/markuplint/markuplint/commit/4f426d9dd7e29fc28b14873674069dcbd7424970)), closes [#4022](https://github.com/markuplint/markuplint/issues/4022)
|
|
17
|
+
|
|
6
18
|
# [5.0.0-rc.6](https://github.com/markuplint/markuplint/compare/v5.0.0-rc.5...v5.0.0-rc.6) (2026-08-30)
|
|
7
19
|
|
|
8
20
|
### Bug Fixes
|
package/lib/attr-order/index.js
CHANGED
|
@@ -112,6 +112,13 @@ eventAttrs) {
|
|
|
112
112
|
match: (name) => /^aria-.+$/.test(name),
|
|
113
113
|
};
|
|
114
114
|
}
|
|
115
|
+
case 'role': {
|
|
116
|
+
return {
|
|
117
|
+
entryIndex,
|
|
118
|
+
order: groupOrder,
|
|
119
|
+
match: (name) => name === 'role',
|
|
120
|
+
};
|
|
121
|
+
}
|
|
115
122
|
case 'data': {
|
|
116
123
|
return {
|
|
117
124
|
entryIndex,
|
package/lib/index.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ declare const rules: {
|
|
|
16
16
|
readonly 'attr-order': Readonly<import("@markuplint/ml-core").RuleSeed<(string | {
|
|
17
17
|
name?: string;
|
|
18
18
|
pattern?: string;
|
|
19
|
-
group?: "data" | "aria" | "global" | "event" | "spread";
|
|
19
|
+
group?: "data" | "aria" | "global" | "event" | "role" | "spread";
|
|
20
20
|
order?: string[] | "alphabetical" | "source-order";
|
|
21
21
|
})[], {
|
|
22
22
|
alphabetical?: boolean;
|
|
@@ -61,6 +61,16 @@ function deepEndOffset(node) {
|
|
|
61
61
|
export default createRule({
|
|
62
62
|
meta: meta,
|
|
63
63
|
async verify({ document, report, t }) {
|
|
64
|
+
/**
|
|
65
|
+
* A parser with `endTagType: 'never'` (e.g. `@markuplint/pug-parser`)
|
|
66
|
+
* structurally never records a close tag for any element, so
|
|
67
|
+
* `el.closeTag == null` carries no signal about whether the source is
|
|
68
|
+
* actually malformed — see `require-end-tag`'s identical guard for the
|
|
69
|
+
* same rationale.
|
|
70
|
+
*/
|
|
71
|
+
if (document.endTag === 'never') {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
64
74
|
const eof = document.raw.length;
|
|
65
75
|
await document.walkOn('Element', el => {
|
|
66
76
|
if (el.isOmitted)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@markuplint/rules",
|
|
3
|
-
"version": "5.0.0
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "Built-in rules of markuplint",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -31,13 +31,13 @@
|
|
|
31
31
|
"./lib/permitted-contents/debug.js": "./lib/permitted-contents/debug.browser.js"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@markuplint/html-spec": "5.0.0
|
|
35
|
-
"@markuplint/ml-config": "5.0.0
|
|
36
|
-
"@markuplint/ml-core": "5.0.0
|
|
37
|
-
"@markuplint/ml-spec": "5.0.0
|
|
38
|
-
"@markuplint/selector": "5.0.0
|
|
39
|
-
"@markuplint/shared": "5.0.0
|
|
40
|
-
"@markuplint/types": "5.0.0
|
|
34
|
+
"@markuplint/html-spec": "5.0.0",
|
|
35
|
+
"@markuplint/ml-config": "5.0.0",
|
|
36
|
+
"@markuplint/ml-core": "5.0.0",
|
|
37
|
+
"@markuplint/ml-spec": "5.0.0",
|
|
38
|
+
"@markuplint/selector": "5.0.0",
|
|
39
|
+
"@markuplint/shared": "5.0.0",
|
|
40
|
+
"@markuplint/types": "5.0.0",
|
|
41
41
|
"@mdn/browser-compat-data": "^7.3.2",
|
|
42
42
|
"@types/debug": "4.1.13",
|
|
43
43
|
"ansi-colors": "4.1.3",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"image-size": "^2.0.2",
|
|
48
48
|
"type-fest": "5.6.0"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "c99706fda4c186aeb87b521eaabc5208ac144bbd"
|
|
51
51
|
}
|