@markuplint/rules 2.0.0-rc.6 → 2.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/README.md +34 -66
- package/lib/attr-check.d.ts +19 -8
- package/lib/attr-duplication/index.d.ts +1 -1
- package/lib/attr-equal-space-after/index.d.ts +1 -1
- package/lib/attr-equal-space-before/index.d.ts +1 -1
- package/lib/attr-spacing/index.d.ts +3 -3
- package/lib/attr-value-quotes/index.d.ts +2 -2
- package/lib/case-sensitive-attr-name/index.d.ts +1 -1
- package/lib/case-sensitive-tag-name/index.d.ts +1 -1
- package/lib/character-reference/index.d.ts +1 -1
- package/lib/class-naming/index.d.ts +1 -1
- package/lib/create-message.d.ts +12 -2
- package/lib/deprecated-attr/index.d.ts +1 -1
- package/lib/deprecated-element/index.d.ts +1 -1
- package/lib/disallowed-element/index.d.ts +1 -1
- package/lib/doctype/index.d.ts +2 -2
- package/lib/end-tag/index.d.ts +1 -1
- package/lib/helpers.d.ts +74 -41
- package/lib/id-duplication/index.d.ts +1 -1
- package/lib/indentation/index.d.ts +3 -3
- package/lib/index.d.ts +147 -61
- package/lib/ineffective-attr/index.d.ts +1 -1
- package/lib/invalid-attr/index.d.ts +16 -12
- package/lib/landmark-roles/index.d.ts +3 -3
- package/lib/no-boolean-attr-value/index.d.ts +1 -1
- package/lib/no-default-value/index.d.ts +1 -1
- package/lib/no-hard-code-id/index.d.ts +1 -1
- package/lib/no-refer-to-non-existent-id/index.d.ts +1 -1
- package/lib/no-use-event-handler-attr/index.d.ts +2 -2
- package/lib/permitted-contents/index.d.ts +2 -2
- package/lib/permitted-contents/permitted-content.spec-to-regexp.d.ts +8 -8
- package/lib/permitted-contents/types.d.ts +6 -6
- package/lib/require-element/index.d.ts +1 -1
- package/lib/required-attr/index.d.ts +3 -3
- package/lib/required-element/index.d.ts +2 -2
- package/lib/required-h1/index.d.ts +3 -3
- package/lib/wai-aria/index.d.ts +7 -7
- package/package.json +7 -7
- package/tsconfig.tsbuildinfo +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -1,64 +1,150 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
2
|
+
'attr-duplication': import('packages/@markuplint/ml-core/lib').RuleSeed<
|
|
3
|
+
import('packages/@markuplint/ml-config/src').RuleConfigValue,
|
|
4
|
+
null
|
|
5
|
+
>;
|
|
6
|
+
'attr-equal-space-after': import('packages/@markuplint/ml-core/lib').RuleSeed<
|
|
7
|
+
'always' | 'never' | 'always-single-line' | 'never-single-line',
|
|
8
|
+
null
|
|
9
|
+
>;
|
|
10
|
+
'attr-equal-space-before': import('packages/@markuplint/ml-core/lib').RuleSeed<
|
|
11
|
+
'always' | 'never' | 'always-single-line' | 'never-single-line',
|
|
12
|
+
null
|
|
13
|
+
>;
|
|
14
|
+
'attr-spacing': import('packages/@markuplint/ml-core/lib').RuleSeed<
|
|
15
|
+
boolean,
|
|
16
|
+
import('./attr-spacing').AttrSpasingOptions
|
|
17
|
+
>;
|
|
18
|
+
'attr-value-quotes': import('packages/@markuplint/ml-core/lib').RuleSeed<import('./attr-value-quotes').Type, null>;
|
|
19
|
+
'case-sensitive-attr-name': import('packages/@markuplint/ml-core/lib').RuleSeed<
|
|
20
|
+
import('./case-sensitive-attr-name').Value | import('./case-sensitive-attr-name').Value_v1,
|
|
21
|
+
null
|
|
22
|
+
>;
|
|
23
|
+
'case-sensitive-tag-name': import('packages/@markuplint/ml-core/lib').RuleSeed<
|
|
24
|
+
import('./case-sensitive-tag-name').Value,
|
|
25
|
+
null
|
|
26
|
+
>;
|
|
27
|
+
'character-reference': import('packages/@markuplint/ml-core/lib').RuleSeed<
|
|
28
|
+
import('packages/@markuplint/ml-config/src').RuleConfigValue,
|
|
29
|
+
null
|
|
30
|
+
>;
|
|
31
|
+
'class-naming': import('packages/@markuplint/ml-core/lib').RuleSeed<import('./class-naming').Value, null>;
|
|
32
|
+
'deprecated-attr': import('packages/@markuplint/ml-core/lib').RuleSeed<
|
|
33
|
+
import('packages/@markuplint/ml-config/src').RuleConfigValue,
|
|
34
|
+
null
|
|
35
|
+
>;
|
|
36
|
+
'deprecated-element': import('packages/@markuplint/ml-core/lib').RuleSeed<
|
|
37
|
+
import('packages/@markuplint/ml-config/src').RuleConfigValue,
|
|
38
|
+
null
|
|
39
|
+
>;
|
|
40
|
+
'disallowed-element': import('packages/@markuplint/ml-core/lib').RuleSeed<string[], null>;
|
|
41
|
+
doctype: import('packages/@markuplint/ml-core/lib').RuleSeed<
|
|
42
|
+
'always',
|
|
43
|
+
{
|
|
44
|
+
denyObsolateType: boolean;
|
|
45
|
+
}
|
|
46
|
+
>;
|
|
47
|
+
'end-tag': import('packages/@markuplint/ml-core/lib').RuleSeed<boolean, null>;
|
|
48
|
+
'id-duplication': import('packages/@markuplint/ml-core/lib').RuleSeed<
|
|
49
|
+
import('packages/@markuplint/ml-config/src').RuleConfigValue,
|
|
50
|
+
null
|
|
51
|
+
>;
|
|
52
|
+
indentation: import('packages/@markuplint/ml-core/lib').RuleSeed<
|
|
53
|
+
import('./indentation').Value,
|
|
54
|
+
import('./indentation').IndentationOptions
|
|
55
|
+
>;
|
|
56
|
+
'ineffective-attr': import('packages/@markuplint/ml-core/lib').RuleSeed<
|
|
57
|
+
import('packages/@markuplint/ml-config/src').RuleConfigValue,
|
|
58
|
+
null
|
|
59
|
+
>;
|
|
60
|
+
'invalid-attr': import('packages/@markuplint/ml-core/lib').RuleSeed<
|
|
61
|
+
boolean,
|
|
62
|
+
{
|
|
63
|
+
attrs?:
|
|
64
|
+
| Record<
|
|
65
|
+
string,
|
|
66
|
+
| {
|
|
67
|
+
enum: [string, ...string[]];
|
|
68
|
+
}
|
|
69
|
+
| {
|
|
70
|
+
pattern: string;
|
|
71
|
+
}
|
|
72
|
+
| {
|
|
73
|
+
type: import('packages/@markuplint/ml-spec/lib').AttributeType;
|
|
74
|
+
}
|
|
75
|
+
| {
|
|
76
|
+
disallowed: true;
|
|
77
|
+
}
|
|
78
|
+
>
|
|
79
|
+
| undefined;
|
|
80
|
+
ignoreAttrNamePrefix?: string | string[] | undefined;
|
|
81
|
+
}
|
|
82
|
+
>;
|
|
83
|
+
'landmark-roles': import('packages/@markuplint/ml-core/lib').RuleSeed<
|
|
84
|
+
boolean,
|
|
85
|
+
{
|
|
86
|
+
ignoreRoles?:
|
|
87
|
+
| (('banner' | 'main' | 'complementary' | 'contentinfo') | 'form' | 'navigation' | 'region')[]
|
|
88
|
+
| undefined;
|
|
89
|
+
labelEachArea?: boolean | undefined;
|
|
90
|
+
}
|
|
91
|
+
>;
|
|
92
|
+
'no-boolean-attr-value': import('packages/@markuplint/ml-core/lib').RuleSeed<
|
|
93
|
+
import('packages/@markuplint/ml-config/src').RuleConfigValue,
|
|
94
|
+
null
|
|
95
|
+
>;
|
|
96
|
+
'no-default-value': import('packages/@markuplint/ml-core/lib').RuleSeed<
|
|
97
|
+
import('packages/@markuplint/ml-config/src').RuleConfigValue,
|
|
98
|
+
null
|
|
99
|
+
>;
|
|
100
|
+
'no-hard-code-id': import('packages/@markuplint/ml-core/lib').RuleSeed<
|
|
101
|
+
import('packages/@markuplint/ml-config/src').RuleConfigValue,
|
|
102
|
+
null
|
|
103
|
+
>;
|
|
104
|
+
'no-refer-to-non-existent-id': import('packages/@markuplint/ml-core/lib').RuleSeed<
|
|
105
|
+
import('packages/@markuplint/ml-config/src').RuleConfigValue,
|
|
106
|
+
null
|
|
107
|
+
>;
|
|
108
|
+
'no-use-event-handler-attr': import('packages/@markuplint/ml-core/lib').RuleSeed<
|
|
109
|
+
boolean,
|
|
110
|
+
{
|
|
111
|
+
ignore?: string | string[] | undefined;
|
|
112
|
+
}
|
|
113
|
+
>;
|
|
114
|
+
'permitted-contents': import('packages/@markuplint/ml-core/lib').RuleSeed<
|
|
115
|
+
import('packages/@markuplint/ml-spec/lib').PermittedStructuresSchema[],
|
|
116
|
+
{
|
|
117
|
+
ignoreHasMutableChildren: boolean;
|
|
118
|
+
}
|
|
119
|
+
>;
|
|
120
|
+
'required-attr': import('packages/@markuplint/ml-core/lib').RuleSeed<
|
|
121
|
+
| string
|
|
122
|
+
| (
|
|
123
|
+
| string
|
|
124
|
+
| {
|
|
125
|
+
name: string;
|
|
126
|
+
value: string | string[];
|
|
127
|
+
}
|
|
128
|
+
)[],
|
|
129
|
+
null
|
|
130
|
+
>;
|
|
131
|
+
'required-element': import('packages/@markuplint/ml-core/lib').RuleSeed<
|
|
132
|
+
string[],
|
|
133
|
+
{
|
|
134
|
+
ignoreHasMutableContents?: boolean | undefined;
|
|
135
|
+
}
|
|
136
|
+
>;
|
|
137
|
+
'required-h1': import('packages/@markuplint/ml-core/lib').RuleSeed<boolean, import('./required-h1').Options>;
|
|
138
|
+
'wai-aria': import('packages/@markuplint/ml-core/lib').RuleSeed<
|
|
139
|
+
boolean,
|
|
140
|
+
{
|
|
141
|
+
checkingValue?: boolean | undefined;
|
|
142
|
+
checkingDeprecatedProps?: boolean | undefined;
|
|
143
|
+
permittedAriaRoles?: boolean | undefined;
|
|
144
|
+
disallowSetImplicitRole?: boolean | undefined;
|
|
145
|
+
disallowSetImplicitProps?: boolean | undefined;
|
|
146
|
+
disallowDefaultValue?: boolean | undefined;
|
|
147
|
+
}
|
|
148
|
+
>;
|
|
63
149
|
};
|
|
64
150
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import(
|
|
1
|
+
declare const _default: import('@markuplint/ml-core').RuleSeed<import('@markuplint/ml-core').RuleConfigValue, null>;
|
|
2
2
|
export default _default;
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
import type { AttributeType } from '@markuplint/ml-spec';
|
|
2
2
|
declare type Option = {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
attrs?: Record<string, Rule>;
|
|
4
|
+
ignoreAttrNamePrefix?: string | string[];
|
|
5
5
|
};
|
|
6
|
-
declare type Rule =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
6
|
+
declare type Rule =
|
|
7
|
+
| {
|
|
8
|
+
enum: [string, ...string[]];
|
|
9
|
+
}
|
|
10
|
+
| {
|
|
11
|
+
pattern: string;
|
|
12
|
+
}
|
|
13
|
+
| {
|
|
14
|
+
type: AttributeType;
|
|
15
|
+
}
|
|
16
|
+
| {
|
|
17
|
+
disallowed: true;
|
|
18
|
+
};
|
|
19
|
+
declare const _default: import('@markuplint/ml-core').RuleSeed<boolean, Option>;
|
|
16
20
|
export default _default;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
declare type Options = {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
ignoreRoles?: Roles[];
|
|
3
|
+
labelEachArea?: boolean;
|
|
4
4
|
};
|
|
5
5
|
declare type TopLevelRoles = 'banner' | 'main' | 'complementary' | 'contentinfo';
|
|
6
6
|
declare type Roles = TopLevelRoles | 'form' | 'navigation' | 'region';
|
|
7
|
-
declare const _default: import(
|
|
7
|
+
declare const _default: import('@markuplint/ml-core').RuleSeed<boolean, Options>;
|
|
8
8
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import(
|
|
1
|
+
declare const _default: import('@markuplint/ml-core').RuleSeed<import('@markuplint/ml-core').RuleConfigValue, null>;
|
|
2
2
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import(
|
|
1
|
+
declare const _default: import('@markuplint/ml-core').RuleSeed<import('@markuplint/ml-core').RuleConfigValue, null>;
|
|
2
2
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import(
|
|
1
|
+
declare const _default: import('@markuplint/ml-core').RuleSeed<import('@markuplint/ml-core').RuleConfigValue, null>;
|
|
2
2
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import(
|
|
1
|
+
declare const _default: import('@markuplint/ml-core').RuleSeed<import('@markuplint/ml-core').RuleConfigValue, null>;
|
|
2
2
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare type Options = {
|
|
2
|
-
|
|
2
|
+
ignore?: string | string[];
|
|
3
3
|
};
|
|
4
|
-
declare const _default: import(
|
|
4
|
+
declare const _default: import('@markuplint/ml-core').RuleSeed<boolean, Options>;
|
|
5
5
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PermittedStructuresSchema } from '@markuplint/ml-spec';
|
|
2
2
|
declare type Options = {
|
|
3
|
-
|
|
3
|
+
ignoreHasMutableChildren: boolean;
|
|
4
4
|
};
|
|
5
|
-
declare const _default: import(
|
|
5
|
+
declare const _default: import('@markuplint/ml-core').RuleSeed<PermittedStructuresSchema[], Options>;
|
|
6
6
|
export default _default;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { PermittedContent } from '@markuplint/ml-spec';
|
|
2
2
|
export default class ExpGenerator {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
private _id;
|
|
4
|
+
private _idCounter;
|
|
5
|
+
constructor(_id: number);
|
|
6
|
+
specToRegExp(contentRule: PermittedContent[] | boolean, parentExp?: RegExp | null, ownNS?: string | null): RegExp;
|
|
7
|
+
private _toPattern;
|
|
8
|
+
private _interleavePattern;
|
|
9
|
+
private _targetTags;
|
|
10
|
+
private _resolveTags;
|
|
11
11
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare type El = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
uuid: string;
|
|
3
|
+
nodeName: string;
|
|
4
|
+
parentNode: El | null;
|
|
5
|
+
isCustomElement?: boolean;
|
|
6
|
+
nameWithNS?: string;
|
|
7
|
+
ns?: string | null;
|
|
8
8
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import(
|
|
1
|
+
declare const _default: import('@markuplint/ml-core').RuleSeed<string[], null>;
|
|
2
2
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
declare type RequiredAttributes = string | (string | Attr)[];
|
|
2
2
|
declare type Attr = {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
name: string;
|
|
4
|
+
value: string | string[];
|
|
5
5
|
};
|
|
6
|
-
declare const _default: import(
|
|
6
|
+
declare const _default: import('@markuplint/ml-core').RuleSeed<RequiredAttributes, null>;
|
|
7
7
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare type Options = {
|
|
2
|
-
|
|
2
|
+
ignoreHasMutableContents?: boolean;
|
|
3
3
|
};
|
|
4
|
-
declare const _default: import(
|
|
4
|
+
declare const _default: import('@markuplint/ml-core').RuleSeed<string[], Options>;
|
|
5
5
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export interface Options {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
'expected-once'?: boolean;
|
|
3
|
+
'in-document-fragment'?: boolean;
|
|
4
4
|
}
|
|
5
|
-
declare const _default: import(
|
|
5
|
+
declare const _default: import('@markuplint/ml-core').RuleSeed<boolean, Options>;
|
|
6
6
|
export default _default;
|
package/lib/wai-aria/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
declare type Options = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
checkingValue?: boolean;
|
|
3
|
+
checkingDeprecatedProps?: boolean;
|
|
4
|
+
permittedAriaRoles?: boolean;
|
|
5
|
+
disallowSetImplicitRole?: boolean;
|
|
6
|
+
disallowSetImplicitProps?: boolean;
|
|
7
|
+
disallowDefaultValue?: boolean;
|
|
8
8
|
};
|
|
9
|
-
declare const _default: import(
|
|
9
|
+
declare const _default: import('@markuplint/ml-core').RuleSeed<boolean, Options>;
|
|
10
10
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@markuplint/rules",
|
|
3
|
-
"version": "2.0.0
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Rules for markuplint",
|
|
5
5
|
"repository": "git@github.com:markuplint/markuplint.git",
|
|
6
6
|
"author": "Yusuke Hirao <yusukehirao@me.com>",
|
|
@@ -17,15 +17,15 @@
|
|
|
17
17
|
"clean": "tsc --build --clean"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@markuplint/html-spec": "2.0.0
|
|
21
|
-
"@markuplint/ml-core": "2.0.0
|
|
22
|
-
"@markuplint/ml-spec": "2.0.0
|
|
23
|
-
"@markuplint/types": "2.0.0
|
|
24
|
-
"debug": "^4.3.
|
|
20
|
+
"@markuplint/html-spec": "2.0.0",
|
|
21
|
+
"@markuplint/ml-core": "2.0.0",
|
|
22
|
+
"@markuplint/ml-spec": "2.0.0",
|
|
23
|
+
"@markuplint/types": "2.0.0",
|
|
24
|
+
"debug": "^4.3.3",
|
|
25
25
|
"tslib": "^2.3.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/debug": "^4.1.7"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "de81fc514acdf472f87184e3499e9364258f9b66"
|
|
31
31
|
}
|