@markuplint/rules 4.5.0 → 4.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/lib/index.d.ts
CHANGED
|
@@ -75,6 +75,7 @@ declare const rules: {
|
|
|
75
75
|
ignoreIfAriaBusy?: boolean | undefined;
|
|
76
76
|
}>>;
|
|
77
77
|
readonly 'no-hard-code-id': Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, undefined>>;
|
|
78
|
+
readonly 'no-orphaned-end-tag': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, null>>;
|
|
78
79
|
readonly 'no-refer-to-non-existent-id': Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, {
|
|
79
80
|
ariaVersion: "1.1" | "1.2" | "1.3";
|
|
80
81
|
fragmentRefersNameAttr: boolean;
|
|
@@ -82,13 +83,13 @@ declare const rules: {
|
|
|
82
83
|
readonly 'no-use-event-handler-attr': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, {
|
|
83
84
|
ignore?: string | string[] | undefined;
|
|
84
85
|
}>>;
|
|
85
|
-
readonly 'permitted-contents': Readonly<import("@markuplint/ml-core").RuleSeed<import("
|
|
86
|
+
readonly 'permitted-contents': Readonly<import("@markuplint/ml-core").RuleSeed<import("./permitted-contents/types.js").TagRule[], import("./permitted-contents/types.js").Options>>;
|
|
86
87
|
readonly 'placeholder-label-option': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, undefined>>;
|
|
87
88
|
readonly 'require-accessible-name': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, {
|
|
88
89
|
ariaVersion: "1.1" | "1.2" | "1.3";
|
|
89
90
|
}>>;
|
|
90
91
|
readonly 'require-datetime': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, {
|
|
91
|
-
langs?: import("
|
|
92
|
+
langs?: import("./require-datetime/types.js").Lang[] | undefined;
|
|
92
93
|
}>>;
|
|
93
94
|
readonly 'required-attr': Readonly<import("@markuplint/ml-core").RuleSeed<string | (string | {
|
|
94
95
|
name: string;
|
|
@@ -105,6 +106,6 @@ declare const rules: {
|
|
|
105
106
|
prevComment?: boolean | undefined;
|
|
106
107
|
prevCodeBlock?: boolean | undefined;
|
|
107
108
|
}>>;
|
|
108
|
-
readonly 'wai-aria': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, import("
|
|
109
|
+
readonly 'wai-aria': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, import("./wai-aria/types.js").Options>>;
|
|
109
110
|
};
|
|
110
111
|
export default rules;
|
package/lib/index.js
CHANGED
|
@@ -22,6 +22,7 @@ import NoDefaultValue from './no-default-value/index.js';
|
|
|
22
22
|
import NoDuplicateDt from './no-duplicate-dt/index.js';
|
|
23
23
|
import NoEmptyPalpableContent from './no-empty-palpable-content/index.js';
|
|
24
24
|
import NoHardCodeId from './no-hard-code-id/index.js';
|
|
25
|
+
import NoOrphanedEndTag from './no-orphaned-end-tag/index.js';
|
|
25
26
|
import NoReferToNonExistentId from './no-refer-to-non-existent-id/index.js';
|
|
26
27
|
import NoUseEventHandlerAttr from './no-use-event-handler-attr/index.js';
|
|
27
28
|
import PermittedContents from './permitted-contents/index.js';
|
|
@@ -58,6 +59,7 @@ const rules = {
|
|
|
58
59
|
'no-duplicate-dt': NoDuplicateDt,
|
|
59
60
|
'no-empty-palpable-content': NoEmptyPalpableContent,
|
|
60
61
|
'no-hard-code-id': NoHardCodeId,
|
|
62
|
+
'no-orphaned-end-tag': NoOrphanedEndTag,
|
|
61
63
|
'no-refer-to-non-existent-id': NoReferToNonExistentId,
|
|
62
64
|
'no-use-event-handler-attr': NoUseEventHandlerAttr,
|
|
63
65
|
'permitted-contents': PermittedContents,
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { createRule } from '@markuplint/ml-core';
|
|
2
|
+
import meta from './meta.js';
|
|
3
|
+
export default createRule({
|
|
4
|
+
meta,
|
|
5
|
+
async verify({ document, report, t }) {
|
|
6
|
+
await document.walkOn('Text', text => {
|
|
7
|
+
const raw = text.raw.trim();
|
|
8
|
+
if (/^<\//.test(raw)) {
|
|
9
|
+
report({
|
|
10
|
+
scope: text,
|
|
11
|
+
message: t('{0} detected', t('Orphaned end tag')),
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
},
|
|
16
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@markuplint/rules",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.6.1",
|
|
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.
|
|
29
|
-
"@markuplint/ml-core": "4.
|
|
30
|
-
"@markuplint/ml-spec": "4.
|
|
31
|
-
"@markuplint/selector": "4.
|
|
28
|
+
"@markuplint/html-spec": "4.6.1",
|
|
29
|
+
"@markuplint/ml-core": "4.6.1",
|
|
30
|
+
"@markuplint/ml-spec": "4.4.1",
|
|
31
|
+
"@markuplint/selector": "4.5.1",
|
|
32
32
|
"@markuplint/shared": "4.2.0",
|
|
33
|
-
"@markuplint/types": "4.
|
|
33
|
+
"@markuplint/types": "4.3.0",
|
|
34
34
|
"@types/debug": "4.1.12",
|
|
35
35
|
"@ungap/structured-clone": "1.2.0",
|
|
36
36
|
"ansi-colors": "4.1.3",
|
|
37
37
|
"chrono-node": "2.7.5",
|
|
38
38
|
"debug": "4.3.4",
|
|
39
|
-
"type-fest": "4.
|
|
39
|
+
"type-fest": "4.15.0"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "b029c86a6b3a9ea8189d2e5535e3023aaea753fd"
|
|
42
42
|
}
|
package/schema.json
CHANGED
|
@@ -78,6 +78,9 @@
|
|
|
78
78
|
"no-hard-code-id": {
|
|
79
79
|
"$ref": "https://raw.githubusercontent.com/markuplint/markuplint/main/packages/%40markuplint/rules/src/no-hard-code-id/schema.json"
|
|
80
80
|
},
|
|
81
|
+
"no-orphaned-end-tag": {
|
|
82
|
+
"$ref": "https://raw.githubusercontent.com/markuplint/markuplint/main/packages/%40markuplint/rules/src/no-orphaned-end-tag/schema.json"
|
|
83
|
+
},
|
|
81
84
|
"no-refer-to-non-existent-id": {
|
|
82
85
|
"$ref": "https://raw.githubusercontent.com/markuplint/markuplint/main/packages/%40markuplint/rules/src/no-refer-to-non-existent-id/schema.json"
|
|
83
86
|
},
|