@citolab/qti-components 6.9.1-beta.9 → 7.0.2

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.
@@ -0,0 +1,337 @@
1
+ import customElement from "eslint-plugin-custom-element";
2
+ import html from "@html-eslint/eslint-plugin";
3
+ import htmlParser from "@html-eslint/parser";
4
+
5
+ export const rules = {
6
+ "custom-element/required-attrs": ["error"],
7
+
8
+ "custom-element/no-deprecated-attrs": [
9
+ "warn",
10
+ {
11
+ tag: "qti-choice-interaction",
12
+ attr: "orientation",
13
+ },
14
+ ],
15
+
16
+ "custom-element/constrained-attrs": ["error"],
17
+
18
+ "custom-element/no-deprecated-tags": ["warn"],
19
+
20
+ "custom-element/no-boolean-attr-values": [
21
+ "error",
22
+ {
23
+ tag: "undefined",
24
+ attr: "disabled",
25
+ },
26
+ {
27
+ tag: "undefined",
28
+ attr: "readonly",
29
+ },
30
+ {
31
+ tag: "qti-assessment-item",
32
+ attr: "disabled",
33
+ },
34
+ {
35
+ tag: "qti-assessment-item",
36
+ attr: "readonly",
37
+ },
38
+ {
39
+ tag: "qti-extended-text-interaction",
40
+ attr: "disabled",
41
+ },
42
+ {
43
+ tag: "qti-extended-text-interaction",
44
+ attr: "readonly",
45
+ },
46
+ {
47
+ tag: "qti-text-entry-interaction",
48
+ attr: "disabled",
49
+ },
50
+ {
51
+ tag: "qti-text-entry-interaction",
52
+ attr: "readonly",
53
+ },
54
+ {
55
+ tag: "qti-hottext-interaction",
56
+ attr: "disabled",
57
+ },
58
+ {
59
+ tag: "qti-hottext-interaction",
60
+ attr: "readonly",
61
+ },
62
+ {
63
+ tag: "qti-inline-choice-interaction",
64
+ attr: "disabled",
65
+ },
66
+ {
67
+ tag: "qti-inline-choice-interaction",
68
+ attr: "readonly",
69
+ },
70
+ {
71
+ tag: "qti-simple-choice",
72
+ attr: "aria-disabled",
73
+ },
74
+ {
75
+ tag: "qti-simple-choice",
76
+ attr: "aria-readonly",
77
+ },
78
+ {
79
+ tag: "qti-choice-interaction",
80
+ attr: "disabled",
81
+ },
82
+ {
83
+ tag: "qti-choice-interaction",
84
+ attr: "readonly",
85
+ },
86
+ {
87
+ tag: "qti-portable-custom-interaction",
88
+ attr: "disabled",
89
+ },
90
+ {
91
+ tag: "qti-portable-custom-interaction",
92
+ attr: "readonly",
93
+ },
94
+ {
95
+ tag: "qti-simple-associable-choice",
96
+ attr: "fixed",
97
+ },
98
+ {
99
+ tag: "qti-simple-associable-choice",
100
+ attr: "aria-disabled",
101
+ },
102
+ {
103
+ tag: "qti-simple-associable-choice",
104
+ attr: "aria-readonly",
105
+ },
106
+ {
107
+ tag: "qti-associate-interaction",
108
+ attr: "disabled",
109
+ },
110
+ {
111
+ tag: "qti-associate-interaction",
112
+ attr: "readonly",
113
+ },
114
+ {
115
+ tag: "qti-custom-interaction",
116
+ attr: "disabled",
117
+ },
118
+ {
119
+ tag: "qti-custom-interaction",
120
+ attr: "readonly",
121
+ },
122
+ {
123
+ tag: "qti-end-attempt-interaction",
124
+ attr: "disabled",
125
+ },
126
+ {
127
+ tag: "qti-end-attempt-interaction",
128
+ attr: "readonly",
129
+ },
130
+ {
131
+ tag: "qti-gap-match-interaction",
132
+ attr: "disabled",
133
+ },
134
+ {
135
+ tag: "qti-gap-match-interaction",
136
+ attr: "readonly",
137
+ },
138
+ {
139
+ tag: "qti-hotspot-choice",
140
+ attr: "aria-disabled",
141
+ },
142
+ {
143
+ tag: "qti-hotspot-choice",
144
+ attr: "aria-readonly",
145
+ },
146
+ {
147
+ tag: "qti-graphic-associate-interaction",
148
+ attr: "disabled",
149
+ },
150
+ {
151
+ tag: "qti-graphic-associate-interaction",
152
+ attr: "readonly",
153
+ },
154
+ {
155
+ tag: "qti-graphic-gap-match-interaction",
156
+ attr: "disabled",
157
+ },
158
+ {
159
+ tag: "qti-graphic-gap-match-interaction",
160
+ attr: "readonly",
161
+ },
162
+ {
163
+ tag: "qti-graphic-order-interaction",
164
+ attr: "disabled",
165
+ },
166
+ {
167
+ tag: "qti-graphic-order-interaction",
168
+ attr: "readonly",
169
+ },
170
+ {
171
+ tag: "qti-hotspot-interaction",
172
+ attr: "disabled",
173
+ },
174
+ {
175
+ tag: "qti-hotspot-interaction",
176
+ attr: "readonly",
177
+ },
178
+ {
179
+ tag: "qti-match-interaction",
180
+ attr: "disabled",
181
+ },
182
+ {
183
+ tag: "qti-match-interaction",
184
+ attr: "readonly",
185
+ },
186
+ {
187
+ tag: "qti-media-interaction",
188
+ attr: "disabled",
189
+ },
190
+ {
191
+ tag: "qti-media-interaction",
192
+ attr: "readonly",
193
+ },
194
+ {
195
+ tag: "qti-order-interaction",
196
+ attr: "disabled",
197
+ },
198
+ {
199
+ tag: "qti-order-interaction",
200
+ attr: "readonly",
201
+ },
202
+ {
203
+ tag: "qti-select-point-interaction",
204
+ attr: "disabled",
205
+ },
206
+ {
207
+ tag: "qti-select-point-interaction",
208
+ attr: "readonly",
209
+ },
210
+ {
211
+ tag: "qti-slider-interaction",
212
+ attr: "step-label",
213
+ },
214
+ {
215
+ tag: "qti-slider-interaction",
216
+ attr: "reverse",
217
+ },
218
+ {
219
+ tag: "qti-slider-interaction",
220
+ attr: "disabled",
221
+ },
222
+ {
223
+ tag: "qti-slider-interaction",
224
+ attr: "readonly",
225
+ },
226
+ {
227
+ tag: "qti-gap-text",
228
+ attr: "aria-disabled",
229
+ },
230
+ {
231
+ tag: "qti-gap-text",
232
+ attr: "aria-readonly",
233
+ },
234
+ {
235
+ tag: "qti-hottext",
236
+ attr: "aria-disabled",
237
+ },
238
+ {
239
+ tag: "qti-hottext",
240
+ attr: "aria-readonly",
241
+ },
242
+ {
243
+ tag: "test-element",
244
+ attr: "disabled",
245
+ },
246
+ {
247
+ tag: "test-element",
248
+ attr: "readonly",
249
+ },
250
+ {
251
+ tag: "test-element",
252
+ attr: "disabled",
253
+ },
254
+ {
255
+ tag: "test-element",
256
+ attr: "readonly",
257
+ },
258
+ {
259
+ tag: "test-element",
260
+ attr: "disabled",
261
+ },
262
+ {
263
+ tag: "test-element",
264
+ attr: "readonly",
265
+ },
266
+ {
267
+ tag: "qti-assessment-item-ref",
268
+ attr: "required",
269
+ },
270
+ {
271
+ tag: "qti-assessment-item-ref",
272
+ attr: "fixed",
273
+ },
274
+ {
275
+ tag: "qti-assessment-section",
276
+ attr: "fixed",
277
+ },
278
+ {
279
+ tag: "qti-assessment-section",
280
+ attr: "visible",
281
+ },
282
+ {
283
+ tag: "qti-assessment-section",
284
+ attr: "keep-together",
285
+ },
286
+ ],
287
+
288
+ "@html-eslint/no-duplicate-attrs": "off",
289
+ "@html-eslint/no-duplicate-id": "off",
290
+ "@html-eslint/no-inline-styles": "off",
291
+ "@html-eslint/no-obsolete-tags": "off",
292
+ "@html-eslint/no-restricted-attr-values": "off",
293
+ "@html-eslint/no-restricted-attrs": "off",
294
+ "@html-eslint/no-script-style-type": "off",
295
+ "@html-eslint/no-target-blank": "off",
296
+ "@html-eslint/require-attrs": "off",
297
+ "@html-eslint/require-button-type": "off",
298
+ "@html-eslint/require-closing-tags": "off",
299
+ "@html-eslint/require-doctype": "off",
300
+ "@html-eslint/require-li-container": "off",
301
+ "@html-eslint/require-meta-charset": "off",
302
+ "@html-eslint/no-multiple-h1": "off",
303
+ "@html-eslint/require-lang": "off",
304
+ "@html-eslint/require-meta-description": "off",
305
+ "@html-eslint/require-open-graph-protocol": "off",
306
+ "@html-eslint/require-title": "off",
307
+ "@html-eslint/no-abstract-roles": "off",
308
+ "@html-eslint/no-accesskey-attrs": "off",
309
+ "@html-eslint/no-aria-hidden-body": "off",
310
+ "@html-eslint/no-non-scalable-viewport": "off",
311
+ "@html-eslint/no-positive-tabindex": "off",
312
+ "@html-eslint/no-skip-heading-levels": "off",
313
+ "@html-eslint/require-frame-title": "off",
314
+ "@html-eslint/require-img-alt": "off",
315
+ "@html-eslint/require-meta-viewport": "off",
316
+ "@html-eslint/element-newline": "off",
317
+ "@html-eslint/id-naming-convention": "off",
318
+ "@html-eslint/indent": "off",
319
+ "@html-eslint/lowercase": "off",
320
+ "@html-eslint/no-extra-spacing-attrs": "off",
321
+ "@html-eslint/no-multiple-empty-lines": "off",
322
+ "@html-eslint/no-trailing-spaces": "off",
323
+ "@html-eslint/quotes": "off",
324
+ "@html-eslint/sort-attrs": "off",
325
+ };
326
+
327
+ export default {
328
+ rules,
329
+ recommendedConfig: {
330
+ files: ["**/*.html"],
331
+ languageOptions: {
332
+ parser: htmlParser,
333
+ },
334
+ plugins: { html, "custom-element": customElement },
335
+ rules,
336
+ },
337
+ };