eslint-config-cityssm 32.2.2 → 32.3.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/eslint.config.js +16 -0
- package/eslint.config.ts +19 -0
- package/package.json +1 -1
package/eslint.config.js
CHANGED
|
@@ -282,6 +282,15 @@ export const configWebApp = defineConfig(config, {
|
|
|
282
282
|
rules: {
|
|
283
283
|
'html/attrs-newline': ['warn', { ifAttrsMoreThan: 3 }],
|
|
284
284
|
'html/indent': ['warn', 2],
|
|
285
|
+
'html/no-extra-spacing-attrs': [
|
|
286
|
+
'error',
|
|
287
|
+
{
|
|
288
|
+
disallowInAssignment: true,
|
|
289
|
+
disallowMissing: true,
|
|
290
|
+
disallowTabs: true,
|
|
291
|
+
enforceBeforeSelfClose: true
|
|
292
|
+
}
|
|
293
|
+
],
|
|
285
294
|
'html/require-closing-tags': [
|
|
286
295
|
'error',
|
|
287
296
|
{
|
|
@@ -293,10 +302,12 @@ export const configWebApp = defineConfig(config, {
|
|
|
293
302
|
{
|
|
294
303
|
// https://codeguide.co/#html-attribute-order
|
|
295
304
|
priority: [
|
|
305
|
+
// Identification
|
|
296
306
|
'class',
|
|
297
307
|
'id',
|
|
298
308
|
'name',
|
|
299
309
|
{ pattern: 'data-.*' },
|
|
310
|
+
// Unique to specific elements
|
|
300
311
|
'src',
|
|
301
312
|
'for',
|
|
302
313
|
'type',
|
|
@@ -305,11 +316,16 @@ export const configWebApp = defineConfig(config, {
|
|
|
305
316
|
'min',
|
|
306
317
|
'max',
|
|
307
318
|
'step',
|
|
319
|
+
'minlength',
|
|
320
|
+
'maxlength',
|
|
321
|
+
// Accessibility
|
|
308
322
|
'title',
|
|
309
323
|
'alt',
|
|
310
324
|
'role',
|
|
311
325
|
{ pattern: 'aria-.*' },
|
|
312
326
|
'tabindex',
|
|
327
|
+
// Style
|
|
328
|
+
'rows',
|
|
313
329
|
'style',
|
|
314
330
|
{ pattern: 'on.*' }
|
|
315
331
|
]
|
package/eslint.config.ts
CHANGED
|
@@ -334,6 +334,15 @@ export const configWebApp: ConfigObject[] = defineConfig(
|
|
|
334
334
|
rules: {
|
|
335
335
|
'html/attrs-newline': ['warn', { ifAttrsMoreThan: 3 }],
|
|
336
336
|
'html/indent': ['warn', 2],
|
|
337
|
+
'html/no-extra-spacing-attrs': [
|
|
338
|
+
'error',
|
|
339
|
+
{
|
|
340
|
+
disallowInAssignment: true,
|
|
341
|
+
disallowMissing: true,
|
|
342
|
+
disallowTabs: true,
|
|
343
|
+
enforceBeforeSelfClose: true
|
|
344
|
+
}
|
|
345
|
+
],
|
|
337
346
|
'html/require-closing-tags': [
|
|
338
347
|
'error',
|
|
339
348
|
{
|
|
@@ -345,10 +354,13 @@ export const configWebApp: ConfigObject[] = defineConfig(
|
|
|
345
354
|
{
|
|
346
355
|
// https://codeguide.co/#html-attribute-order
|
|
347
356
|
priority: [
|
|
357
|
+
// Identification
|
|
348
358
|
'class',
|
|
349
359
|
'id',
|
|
350
360
|
'name',
|
|
351
361
|
{ pattern: 'data-.*' },
|
|
362
|
+
|
|
363
|
+
// Unique to specific elements
|
|
352
364
|
'src',
|
|
353
365
|
'for',
|
|
354
366
|
'type',
|
|
@@ -357,11 +369,18 @@ export const configWebApp: ConfigObject[] = defineConfig(
|
|
|
357
369
|
'min',
|
|
358
370
|
'max',
|
|
359
371
|
'step',
|
|
372
|
+
'minlength',
|
|
373
|
+
'maxlength',
|
|
374
|
+
|
|
375
|
+
// Accessibility
|
|
360
376
|
'title',
|
|
361
377
|
'alt',
|
|
362
378
|
'role',
|
|
363
379
|
{ pattern: 'aria-.*' },
|
|
364
380
|
'tabindex',
|
|
381
|
+
|
|
382
|
+
// Style
|
|
383
|
+
'rows',
|
|
365
384
|
'style',
|
|
366
385
|
{ pattern: 'on.*' }
|
|
367
386
|
]
|