@db-ux/core-eslint-plugin 4.4.2-eslint-plugin-28ea614 → 4.5.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 +7 -1
- package/README.md +94 -4
- package/build/index.d.ts +314 -55
- package/build/index.js +20 -16
- package/build/rules/accordion/accordion-item-headline-required.d.ts +15 -0
- package/build/rules/accordion/accordion-item-headline-required.js +63 -0
- package/build/rules/accordion/no-nested-accordion.d.ts +13 -3
- package/build/rules/accordion/no-nested-accordion.js +44 -23
- package/build/rules/badge/badge-corner-placement-rules.d.ts +15 -3
- package/build/rules/badge/badge-corner-placement-rules.js +99 -58
- package/build/rules/badge/badge-no-inline-in-interactive.d.ts +14 -3
- package/build/rules/badge/badge-no-inline-in-interactive.js +105 -40
- package/build/rules/button/button-no-text-requires-tooltip.d.ts +15 -3
- package/build/rules/button/button-no-text-requires-tooltip.js +90 -35
- package/build/rules/button/button-single-icon-attribute.d.ts +13 -3
- package/build/rules/button/button-single-icon-attribute.js +37 -23
- package/build/rules/button/button-type-required.d.ts +14 -3
- package/build/rules/button/button-type-required.js +47 -32
- package/build/rules/close-button/close-button-text-required.d.ts +13 -3
- package/build/rules/close-button/close-button-text-required.js +43 -23
- package/build/rules/content/text-or-children-required.d.ts +13 -3
- package/build/rules/content/text-or-children-required.js +50 -28
- package/build/rules/form/form-label-required.d.ts +13 -3
- package/build/rules/form/form-label-required.js +49 -25
- package/build/rules/form/form-validation-message-required.d.ts +13 -3
- package/build/rules/form/form-validation-message-required.js +155 -67
- package/build/rules/header/header-burger-menu-label-required.d.ts +13 -3
- package/build/rules/header/header-burger-menu-label-required.js +31 -20
- package/build/rules/icon/prefer-icon-attribute.d.ts +14 -3
- package/build/rules/icon/prefer-icon-attribute.js +73 -33
- package/build/rules/input/input-file-type-validation.d.ts +15 -3
- package/build/rules/input/input-file-type-validation.js +69 -38
- package/build/rules/input/input-type-required.d.ts +14 -3
- package/build/rules/input/input-type-required.js +41 -27
- package/build/rules/link/link-external-security.d.ts +16 -3
- package/build/rules/link/link-external-security.js +148 -32
- package/build/rules/navigation/navigation-item-back-button-text-required.d.ts +13 -3
- package/build/rules/navigation/navigation-item-back-button-text-required.js +31 -20
- package/build/rules/select/custom-select-tags-remove-text-required.d.ts +13 -3
- package/build/rules/select/custom-select-tags-remove-text-required.js +37 -23
- package/build/rules/select/select-requires-options.d.ts +13 -3
- package/build/rules/select/select-requires-options.js +37 -22
- package/build/rules/tag/tag-removable-remove-button-required.d.ts +13 -3
- package/build/rules/tag/tag-removable-remove-button-required.js +37 -23
- package/build/rules/tooltip/no-interactive-tooltip-content.d.ts +13 -3
- package/build/rules/tooltip/no-interactive-tooltip-content.js +44 -27
- package/build/rules/tooltip/tooltip-requires-interactive-parent.d.ts +13 -3
- package/build/rules/tooltip/tooltip-requires-interactive-parent.js +57 -30
- package/build/shared/constants.d.ts +62 -0
- package/build/shared/constants.js +102 -0
- package/build/shared/utils.d.ts +53 -4
- package/build/shared/utils.js +145 -28
- package/package.json +9 -3
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -1,11 +1,29 @@
|
|
|
1
|
-
# @db-ux/eslint-plugin
|
|
1
|
+
# @db-ux/core-eslint-plugin
|
|
2
2
|
|
|
3
3
|
ESLint plugin to validate correct usage of DB UX Design System components across React, Vue, and Angular.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
```shell
|
|
8
|
-
npm install eslint @db-ux/eslint-plugin --save-dev
|
|
8
|
+
npm install eslint @db-ux/core-eslint-plugin --save-dev
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
**For Vue projects**, also install `vue-eslint-parser`:
|
|
12
|
+
|
|
13
|
+
```shell
|
|
14
|
+
npm install vue-eslint-parser --save-dev
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
**For Angular projects**, also install `@angular-eslint/template-parser`:
|
|
18
|
+
|
|
19
|
+
```shell
|
|
20
|
+
npm install @angular-eslint/template-parser --save-dev
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**For React/TypeScript projects**, also install `@typescript-eslint/parser`:
|
|
24
|
+
|
|
25
|
+
```shell
|
|
26
|
+
npm install @typescript-eslint/parser --save-dev
|
|
9
27
|
```
|
|
10
28
|
|
|
11
29
|
## Usage
|
|
@@ -15,10 +33,57 @@ Add to your ESLint config:
|
|
|
15
33
|
**ESLint 9+ (flat config):**
|
|
16
34
|
|
|
17
35
|
```js
|
|
18
|
-
|
|
36
|
+
// eslint.config.js
|
|
37
|
+
import dbUx from "@db-ux/core-eslint-plugin";
|
|
38
|
+
|
|
39
|
+
export default [
|
|
40
|
+
{
|
|
41
|
+
plugins: {
|
|
42
|
+
"db-ux": dbUx
|
|
43
|
+
},
|
|
44
|
+
rules: dbUx.configs.recommended.rules
|
|
45
|
+
}
|
|
46
|
+
];
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**For Vue projects**, configure the Vue parser:
|
|
50
|
+
|
|
51
|
+
```js
|
|
52
|
+
import dbUx from "@db-ux/core-eslint-plugin";
|
|
53
|
+
import vueParser from "vue-eslint-parser";
|
|
54
|
+
import tsParser from "@typescript-eslint/parser";
|
|
55
|
+
|
|
56
|
+
export default [
|
|
57
|
+
{
|
|
58
|
+
files: ["**/*.vue"],
|
|
59
|
+
languageOptions: {
|
|
60
|
+
parser: vueParser,
|
|
61
|
+
parserOptions: {
|
|
62
|
+
parser: tsParser,
|
|
63
|
+
ecmaVersion: "latest",
|
|
64
|
+
sourceType: "module"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
plugins: {
|
|
68
|
+
"db-ux": dbUx
|
|
69
|
+
},
|
|
70
|
+
rules: dbUx.configs.recommended.rules
|
|
71
|
+
}
|
|
72
|
+
];
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
**For Angular projects**, configure the Angular template parser:
|
|
76
|
+
|
|
77
|
+
```js
|
|
78
|
+
import dbUx from "@db-ux/core-eslint-plugin";
|
|
79
|
+
import angularTemplateParser from "@angular-eslint/template-parser";
|
|
19
80
|
|
|
20
81
|
export default [
|
|
21
82
|
{
|
|
83
|
+
files: ["**/*.html"],
|
|
84
|
+
languageOptions: {
|
|
85
|
+
parser: angularTemplateParser
|
|
86
|
+
},
|
|
22
87
|
plugins: {
|
|
23
88
|
"db-ux": dbUx
|
|
24
89
|
},
|
|
@@ -30,7 +95,7 @@ export default [
|
|
|
30
95
|
**Or enable rules individually:**
|
|
31
96
|
|
|
32
97
|
```js
|
|
33
|
-
import dbUx from "@db-ux/eslint-plugin";
|
|
98
|
+
import dbUx from "@db-ux/core-eslint-plugin";
|
|
34
99
|
|
|
35
100
|
export default [
|
|
36
101
|
{
|
|
@@ -44,6 +109,31 @@ export default [
|
|
|
44
109
|
];
|
|
45
110
|
```
|
|
46
111
|
|
|
112
|
+
**For React/TypeScript projects**, configure the TypeScript parser:
|
|
113
|
+
|
|
114
|
+
```js
|
|
115
|
+
import dbUx from "@db-ux/core-eslint-plugin";
|
|
116
|
+
import tsParser from "@typescript-eslint/parser";
|
|
117
|
+
|
|
118
|
+
export default [
|
|
119
|
+
{
|
|
120
|
+
files: ["**/*.ts", "**/*.tsx"],
|
|
121
|
+
languageOptions: {
|
|
122
|
+
parser: tsParser,
|
|
123
|
+
parserOptions: {
|
|
124
|
+
ecmaVersion: "latest",
|
|
125
|
+
sourceType: "module",
|
|
126
|
+
ecmaFeatures: { jsx: true }
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
plugins: {
|
|
130
|
+
"db-ux": dbUx
|
|
131
|
+
},
|
|
132
|
+
rules: dbUx.configs.recommended.rules
|
|
133
|
+
}
|
|
134
|
+
];
|
|
135
|
+
```
|
|
136
|
+
|
|
47
137
|
## Rules
|
|
48
138
|
|
|
49
139
|
### `button-no-text-requires-tooltip`
|
package/build/index.d.ts
CHANGED
|
@@ -4,94 +4,353 @@ declare const plugin: {
|
|
|
4
4
|
version: string;
|
|
5
5
|
};
|
|
6
6
|
rules: {
|
|
7
|
-
'button-no-text-requires-tooltip':
|
|
8
|
-
|
|
7
|
+
'button-no-text-requires-tooltip': {
|
|
8
|
+
meta: {
|
|
9
|
+
type: "problem";
|
|
10
|
+
docs: {
|
|
11
|
+
description: string;
|
|
12
|
+
url: string;
|
|
13
|
+
};
|
|
14
|
+
fixable: "code";
|
|
15
|
+
messages: {
|
|
16
|
+
missingIcon: string;
|
|
17
|
+
missingTooltip: string;
|
|
18
|
+
};
|
|
19
|
+
schema: never[];
|
|
20
|
+
};
|
|
21
|
+
create(context: any): any;
|
|
9
22
|
};
|
|
10
|
-
'button-type-required':
|
|
11
|
-
|
|
23
|
+
'button-type-required': {
|
|
24
|
+
meta: {
|
|
25
|
+
type: "problem";
|
|
26
|
+
docs: {
|
|
27
|
+
description: string;
|
|
28
|
+
url: string;
|
|
29
|
+
};
|
|
30
|
+
fixable: "code";
|
|
31
|
+
messages: {
|
|
32
|
+
missingType: string;
|
|
33
|
+
};
|
|
34
|
+
schema: never[];
|
|
35
|
+
};
|
|
36
|
+
create(context: any): any;
|
|
12
37
|
};
|
|
13
|
-
'button-single-icon-attribute':
|
|
14
|
-
|
|
38
|
+
'button-single-icon-attribute': {
|
|
39
|
+
meta: {
|
|
40
|
+
type: "problem";
|
|
41
|
+
docs: {
|
|
42
|
+
description: string;
|
|
43
|
+
url: string;
|
|
44
|
+
};
|
|
45
|
+
messages: {
|
|
46
|
+
multipleIcons: string;
|
|
47
|
+
};
|
|
48
|
+
schema: never[];
|
|
49
|
+
};
|
|
50
|
+
create(context: any): any;
|
|
15
51
|
};
|
|
16
|
-
'form-label-required':
|
|
17
|
-
|
|
52
|
+
'form-label-required': {
|
|
53
|
+
meta: {
|
|
54
|
+
type: "problem";
|
|
55
|
+
docs: {
|
|
56
|
+
description: string;
|
|
57
|
+
url: string;
|
|
58
|
+
};
|
|
59
|
+
messages: {
|
|
60
|
+
missingLabel: string;
|
|
61
|
+
};
|
|
62
|
+
schema: never[];
|
|
63
|
+
};
|
|
64
|
+
create(context: any): any;
|
|
18
65
|
};
|
|
19
|
-
'form-validation-message-required':
|
|
20
|
-
|
|
66
|
+
'form-validation-message-required': {
|
|
67
|
+
meta: {
|
|
68
|
+
type: "suggestion";
|
|
69
|
+
docs: {
|
|
70
|
+
description: string;
|
|
71
|
+
url: string;
|
|
72
|
+
};
|
|
73
|
+
messages: {
|
|
74
|
+
missingInvalidMessage: string;
|
|
75
|
+
};
|
|
76
|
+
schema: never[];
|
|
77
|
+
};
|
|
78
|
+
create(context: any): any;
|
|
21
79
|
};
|
|
22
|
-
'prefer-icon-attribute':
|
|
23
|
-
|
|
80
|
+
'prefer-icon-attribute': {
|
|
81
|
+
meta: {
|
|
82
|
+
type: "suggestion";
|
|
83
|
+
docs: {
|
|
84
|
+
description: string;
|
|
85
|
+
url: string;
|
|
86
|
+
};
|
|
87
|
+
fixable: "code";
|
|
88
|
+
messages: {
|
|
89
|
+
preferAttribute: string;
|
|
90
|
+
};
|
|
91
|
+
schema: never[];
|
|
92
|
+
};
|
|
93
|
+
create(context: any): any;
|
|
24
94
|
};
|
|
25
|
-
'text-or-children-required':
|
|
26
|
-
|
|
95
|
+
'text-or-children-required': {
|
|
96
|
+
meta: {
|
|
97
|
+
type: "problem";
|
|
98
|
+
docs: {
|
|
99
|
+
description: string;
|
|
100
|
+
url: string;
|
|
101
|
+
};
|
|
102
|
+
messages: {
|
|
103
|
+
missingContent: string;
|
|
104
|
+
};
|
|
105
|
+
schema: never[];
|
|
106
|
+
};
|
|
107
|
+
create(context: any): any;
|
|
27
108
|
};
|
|
28
|
-
'no-interactive-tooltip-content':
|
|
29
|
-
|
|
109
|
+
'no-interactive-tooltip-content': {
|
|
110
|
+
meta: {
|
|
111
|
+
type: "problem";
|
|
112
|
+
docs: {
|
|
113
|
+
description: string;
|
|
114
|
+
url: string;
|
|
115
|
+
};
|
|
116
|
+
messages: {
|
|
117
|
+
noInteractive: string;
|
|
118
|
+
};
|
|
119
|
+
schema: never[];
|
|
120
|
+
};
|
|
121
|
+
create(context: any): any;
|
|
30
122
|
};
|
|
31
|
-
'tooltip-requires-interactive-parent':
|
|
32
|
-
|
|
123
|
+
'tooltip-requires-interactive-parent': {
|
|
124
|
+
meta: {
|
|
125
|
+
type: "problem";
|
|
126
|
+
docs: {
|
|
127
|
+
description: string;
|
|
128
|
+
url: string;
|
|
129
|
+
};
|
|
130
|
+
messages: {
|
|
131
|
+
requiresInteractive: string;
|
|
132
|
+
};
|
|
133
|
+
schema: never[];
|
|
134
|
+
};
|
|
135
|
+
create(context: any): any;
|
|
33
136
|
};
|
|
34
|
-
'no-nested-accordion':
|
|
35
|
-
|
|
137
|
+
'no-nested-accordion': {
|
|
138
|
+
meta: {
|
|
139
|
+
type: "problem";
|
|
140
|
+
docs: {
|
|
141
|
+
description: string;
|
|
142
|
+
url: string;
|
|
143
|
+
};
|
|
144
|
+
messages: {
|
|
145
|
+
noNested: string;
|
|
146
|
+
};
|
|
147
|
+
schema: never[];
|
|
148
|
+
};
|
|
149
|
+
create(context: any): any;
|
|
36
150
|
};
|
|
37
|
-
'
|
|
38
|
-
|
|
151
|
+
'accordion-item-headline-required': {
|
|
152
|
+
meta: {
|
|
153
|
+
type: "problem";
|
|
154
|
+
docs: {
|
|
155
|
+
description: string;
|
|
156
|
+
url: string;
|
|
157
|
+
};
|
|
158
|
+
messages: {
|
|
159
|
+
headlineRequired: string;
|
|
160
|
+
};
|
|
161
|
+
schema: never[];
|
|
162
|
+
};
|
|
163
|
+
create(context: any): any;
|
|
39
164
|
};
|
|
40
|
-
'badge-
|
|
41
|
-
|
|
165
|
+
'badge-corner-placement-rules': {
|
|
166
|
+
meta: {
|
|
167
|
+
type: "problem";
|
|
168
|
+
docs: {
|
|
169
|
+
description: string;
|
|
170
|
+
url: string;
|
|
171
|
+
};
|
|
172
|
+
fixable: "code";
|
|
173
|
+
messages: {
|
|
174
|
+
textTooLong: string;
|
|
175
|
+
missingLabel: string;
|
|
176
|
+
};
|
|
177
|
+
schema: never[];
|
|
178
|
+
};
|
|
179
|
+
create(context: any): any;
|
|
42
180
|
};
|
|
43
|
-
'
|
|
44
|
-
|
|
181
|
+
'badge-no-inline-in-interactive': {
|
|
182
|
+
meta: {
|
|
183
|
+
type: "problem";
|
|
184
|
+
docs: {
|
|
185
|
+
description: string;
|
|
186
|
+
url: string;
|
|
187
|
+
};
|
|
188
|
+
fixable: "code";
|
|
189
|
+
messages: {
|
|
190
|
+
noInline: string;
|
|
191
|
+
};
|
|
192
|
+
schema: never[];
|
|
193
|
+
};
|
|
194
|
+
create(context: any): any;
|
|
45
195
|
};
|
|
46
|
-
'
|
|
47
|
-
|
|
196
|
+
'link-external-security': {
|
|
197
|
+
meta: {
|
|
198
|
+
type: "problem";
|
|
199
|
+
docs: {
|
|
200
|
+
description: string;
|
|
201
|
+
url: string;
|
|
202
|
+
};
|
|
203
|
+
fixable: "code";
|
|
204
|
+
messages: {
|
|
205
|
+
missingTargetBlank: string;
|
|
206
|
+
missingReferrerPolicy: string;
|
|
207
|
+
missingContentExternal: string;
|
|
208
|
+
};
|
|
209
|
+
schema: never[];
|
|
210
|
+
};
|
|
211
|
+
create(context: any): any;
|
|
212
|
+
};
|
|
213
|
+
'select-requires-options': {
|
|
214
|
+
meta: {
|
|
215
|
+
type: "problem";
|
|
216
|
+
docs: {
|
|
217
|
+
description: string;
|
|
218
|
+
url: string;
|
|
219
|
+
};
|
|
220
|
+
messages: {
|
|
221
|
+
missingOptions: string;
|
|
222
|
+
};
|
|
223
|
+
schema: never[];
|
|
224
|
+
};
|
|
225
|
+
create(context: any): any;
|
|
48
226
|
};
|
|
49
|
-
'custom-select-tags-remove-text-required':
|
|
50
|
-
|
|
227
|
+
'custom-select-tags-remove-text-required': {
|
|
228
|
+
meta: {
|
|
229
|
+
type: "problem";
|
|
230
|
+
docs: {
|
|
231
|
+
description: string;
|
|
232
|
+
url: string;
|
|
233
|
+
};
|
|
234
|
+
messages: {
|
|
235
|
+
missingRemoveTagsTexts: string;
|
|
236
|
+
};
|
|
237
|
+
schema: never[];
|
|
238
|
+
};
|
|
239
|
+
create(context: any): any;
|
|
51
240
|
};
|
|
52
|
-
'close-button-text-required':
|
|
53
|
-
|
|
241
|
+
'close-button-text-required': {
|
|
242
|
+
meta: {
|
|
243
|
+
type: "problem";
|
|
244
|
+
docs: {
|
|
245
|
+
description: string;
|
|
246
|
+
url: string;
|
|
247
|
+
};
|
|
248
|
+
messages: {
|
|
249
|
+
missingCloseButtonText: string;
|
|
250
|
+
};
|
|
251
|
+
schema: never[];
|
|
252
|
+
};
|
|
253
|
+
create(context: any): any;
|
|
54
254
|
};
|
|
55
|
-
'header-burger-menu-label-required':
|
|
56
|
-
|
|
255
|
+
'header-burger-menu-label-required': {
|
|
256
|
+
meta: {
|
|
257
|
+
type: "problem";
|
|
258
|
+
docs: {
|
|
259
|
+
description: string;
|
|
260
|
+
url: string;
|
|
261
|
+
};
|
|
262
|
+
messages: {
|
|
263
|
+
missingBurgerMenuLabel: string;
|
|
264
|
+
};
|
|
265
|
+
schema: never[];
|
|
266
|
+
};
|
|
267
|
+
create(context: any): any;
|
|
57
268
|
};
|
|
58
|
-
'navigation-item-back-button-text-required':
|
|
59
|
-
|
|
269
|
+
'navigation-item-back-button-text-required': {
|
|
270
|
+
meta: {
|
|
271
|
+
type: "problem";
|
|
272
|
+
docs: {
|
|
273
|
+
description: string;
|
|
274
|
+
url: string;
|
|
275
|
+
};
|
|
276
|
+
messages: {
|
|
277
|
+
missingBackButtonText: string;
|
|
278
|
+
};
|
|
279
|
+
schema: never[];
|
|
280
|
+
};
|
|
281
|
+
create(context: any): any;
|
|
60
282
|
};
|
|
61
|
-
'tag-removable-remove-button-required':
|
|
62
|
-
|
|
283
|
+
'tag-removable-remove-button-required': {
|
|
284
|
+
meta: {
|
|
285
|
+
type: "problem";
|
|
286
|
+
docs: {
|
|
287
|
+
description: string;
|
|
288
|
+
url: string;
|
|
289
|
+
};
|
|
290
|
+
messages: {
|
|
291
|
+
missingRemoveButton: string;
|
|
292
|
+
};
|
|
293
|
+
schema: never[];
|
|
294
|
+
};
|
|
295
|
+
create(context: any): any;
|
|
63
296
|
};
|
|
64
|
-
'input-type-required':
|
|
65
|
-
|
|
297
|
+
'input-type-required': {
|
|
298
|
+
meta: {
|
|
299
|
+
type: "suggestion";
|
|
300
|
+
docs: {
|
|
301
|
+
description: string;
|
|
302
|
+
url: string;
|
|
303
|
+
};
|
|
304
|
+
fixable: "code";
|
|
305
|
+
messages: {
|
|
306
|
+
missingType: string;
|
|
307
|
+
};
|
|
308
|
+
schema: never[];
|
|
309
|
+
};
|
|
310
|
+
create(context: any): any;
|
|
66
311
|
};
|
|
67
|
-
'input-file-type-validation':
|
|
68
|
-
|
|
312
|
+
'input-file-type-validation': {
|
|
313
|
+
meta: {
|
|
314
|
+
type: "problem";
|
|
315
|
+
docs: {
|
|
316
|
+
description: string;
|
|
317
|
+
url: string;
|
|
318
|
+
};
|
|
319
|
+
messages: {
|
|
320
|
+
missingAccept: string;
|
|
321
|
+
invalidMultiple: string;
|
|
322
|
+
invalidAccept: string;
|
|
323
|
+
};
|
|
324
|
+
schema: never[];
|
|
325
|
+
};
|
|
326
|
+
create(context: any): any;
|
|
69
327
|
};
|
|
70
328
|
};
|
|
71
329
|
configs: {
|
|
72
330
|
recommended: {
|
|
73
331
|
rules: {
|
|
332
|
+
'db-ux/accordion-item-headline-required': string;
|
|
333
|
+
'db-ux/badge-corner-placement-rules': string;
|
|
334
|
+
'db-ux/badge-no-inline-in-interactive': string;
|
|
74
335
|
'db-ux/button-no-text-requires-tooltip': string;
|
|
75
|
-
'db-ux/button-type-required': string;
|
|
76
336
|
'db-ux/button-single-icon-attribute': string;
|
|
337
|
+
'db-ux/button-type-required': string;
|
|
338
|
+
'db-ux/close-button-text-required': string;
|
|
339
|
+
'db-ux/custom-select-tags-remove-text-required': string;
|
|
77
340
|
'db-ux/form-label-required': string;
|
|
78
341
|
'db-ux/form-validation-message-required': string;
|
|
79
|
-
'db-ux/
|
|
80
|
-
'db-ux/
|
|
342
|
+
'db-ux/header-burger-menu-label-required': string;
|
|
343
|
+
'db-ux/input-file-type-validation': string;
|
|
344
|
+
'db-ux/input-type-required': string;
|
|
345
|
+
'db-ux/link-external-security': string;
|
|
346
|
+
'db-ux/navigation-item-back-button-text-required': string;
|
|
81
347
|
'db-ux/no-interactive-tooltip-content': string;
|
|
82
|
-
'db-ux/tooltip-requires-interactive-parent': string;
|
|
83
348
|
'db-ux/no-nested-accordion': string;
|
|
84
|
-
'db-ux/
|
|
85
|
-
'db-ux/badge-no-inline-in-interactive': string;
|
|
86
|
-
'db-ux/link-external-security': string;
|
|
349
|
+
'db-ux/prefer-icon-attribute': string;
|
|
87
350
|
'db-ux/select-requires-options': string;
|
|
88
|
-
'db-ux/custom-select-tags-remove-text-required': string;
|
|
89
|
-
'db-ux/close-button-text-required': string;
|
|
90
|
-
'db-ux/header-burger-menu-label-required': string;
|
|
91
|
-
'db-ux/navigation-item-back-button-text-required': string;
|
|
92
351
|
'db-ux/tag-removable-remove-button-required': string;
|
|
93
|
-
'db-ux/
|
|
94
|
-
'db-ux/
|
|
352
|
+
'db-ux/text-or-children-required': string;
|
|
353
|
+
'db-ux/tooltip-requires-interactive-parent': string;
|
|
95
354
|
};
|
|
96
355
|
};
|
|
97
356
|
};
|
package/build/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import packageJson from '../package.json' with { type: 'json' };
|
|
2
|
+
import accordionItemHeadlineRequired from './rules/accordion/accordion-item-headline-required.js';
|
|
1
3
|
import noNestedAccordion from './rules/accordion/no-nested-accordion.js';
|
|
2
4
|
import badgeCornerPlacementRules from './rules/badge/badge-corner-placement-rules.js';
|
|
3
5
|
import badgeNoInlineInInteractive from './rules/badge/badge-no-inline-in-interactive.js';
|
|
@@ -21,33 +23,34 @@ import noInteractiveTooltipContent from './rules/tooltip/no-interactive-tooltip-
|
|
|
21
23
|
import tooltipRequiresInteractiveParent from './rules/tooltip/tooltip-requires-interactive-parent.js';
|
|
22
24
|
const recommended = {
|
|
23
25
|
rules: {
|
|
26
|
+
'db-ux/accordion-item-headline-required': 'error',
|
|
27
|
+
'db-ux/badge-corner-placement-rules': 'error',
|
|
28
|
+
'db-ux/badge-no-inline-in-interactive': 'error',
|
|
24
29
|
'db-ux/button-no-text-requires-tooltip': 'error',
|
|
25
|
-
'db-ux/button-type-required': 'error',
|
|
26
30
|
'db-ux/button-single-icon-attribute': 'error',
|
|
31
|
+
'db-ux/button-type-required': 'error',
|
|
32
|
+
'db-ux/close-button-text-required': 'error',
|
|
33
|
+
'db-ux/custom-select-tags-remove-text-required': 'error',
|
|
27
34
|
'db-ux/form-label-required': 'error',
|
|
28
|
-
'db-ux/form-validation-message-required': '
|
|
29
|
-
'db-ux/
|
|
30
|
-
'db-ux/
|
|
35
|
+
'db-ux/form-validation-message-required': 'warn',
|
|
36
|
+
'db-ux/header-burger-menu-label-required': 'error',
|
|
37
|
+
'db-ux/input-file-type-validation': 'error',
|
|
38
|
+
'db-ux/input-type-required': 'warn',
|
|
39
|
+
'db-ux/link-external-security': 'warn',
|
|
40
|
+
'db-ux/navigation-item-back-button-text-required': 'error',
|
|
31
41
|
'db-ux/no-interactive-tooltip-content': 'error',
|
|
32
|
-
'db-ux/tooltip-requires-interactive-parent': 'error',
|
|
33
42
|
'db-ux/no-nested-accordion': 'error',
|
|
34
|
-
'db-ux/
|
|
35
|
-
'db-ux/badge-no-inline-in-interactive': 'error',
|
|
36
|
-
'db-ux/link-external-security': 'warn',
|
|
43
|
+
'db-ux/prefer-icon-attribute': 'warn',
|
|
37
44
|
'db-ux/select-requires-options': 'error',
|
|
38
|
-
'db-ux/custom-select-tags-remove-text-required': 'error',
|
|
39
|
-
'db-ux/close-button-text-required': 'error',
|
|
40
|
-
'db-ux/header-burger-menu-label-required': 'error',
|
|
41
|
-
'db-ux/navigation-item-back-button-text-required': 'error',
|
|
42
45
|
'db-ux/tag-removable-remove-button-required': 'error',
|
|
43
|
-
'db-ux/
|
|
44
|
-
'db-ux/
|
|
46
|
+
'db-ux/text-or-children-required': 'error',
|
|
47
|
+
'db-ux/tooltip-requires-interactive-parent': 'error'
|
|
45
48
|
}
|
|
46
49
|
};
|
|
47
50
|
const plugin = {
|
|
48
51
|
meta: {
|
|
49
|
-
name: '@db-ux/eslint-plugin',
|
|
50
|
-
version:
|
|
52
|
+
name: '@db-ux/core-eslint-plugin',
|
|
53
|
+
version: packageJson.version
|
|
51
54
|
},
|
|
52
55
|
rules: {
|
|
53
56
|
'button-no-text-requires-tooltip': buttonNoTextRequiresTooltip,
|
|
@@ -60,6 +63,7 @@ const plugin = {
|
|
|
60
63
|
'no-interactive-tooltip-content': noInteractiveTooltipContent,
|
|
61
64
|
'tooltip-requires-interactive-parent': tooltipRequiresInteractiveParent,
|
|
62
65
|
'no-nested-accordion': noNestedAccordion,
|
|
66
|
+
'accordion-item-headline-required': accordionItemHeadlineRequired,
|
|
63
67
|
'badge-corner-placement-rules': badgeCornerPlacementRules,
|
|
64
68
|
'badge-no-inline-in-interactive': badgeNoInlineInInteractive,
|
|
65
69
|
'link-external-security': linkExternalSecurity,
|