From 1663bd181697ec04518f43e481506faaa51f6214 Mon Sep 17 00:00:00 2001 From: David Mosher Date: Sun, 9 May 2021 21:37:02 -0400 Subject: [PATCH] final refactor to shuffle buckets --- test/validator/index.ts | 2 +- .../a11y-aria-proptypes-global/input.svelte | 12 - .../a11y-aria-proptypes-global/warnings.json | 276 +++--------------- 3 files changed, 43 insertions(+), 247 deletions(-) diff --git a/test/validator/index.ts b/test/validator/index.ts index ee8636c783dc..e58be87a3ac2 100644 --- a/test/validator/index.ts +++ b/test/validator/index.ts @@ -2,7 +2,7 @@ import * as fs from 'fs'; import * as assert from 'assert'; import { svelte, loadConfig, tryToLoadJson } from '../helpers'; -describe.only('validate', () => { +describe('validate', () => { fs.readdirSync(`${__dirname}/samples`).forEach(dir => { if (dir[0] === '.') return; diff --git a/test/validator/samples/a11y-aria-proptypes-global/input.svelte b/test/validator/samples/a11y-aria-proptypes-global/input.svelte index 1994312c42bd..0df9a37ba710 100644 --- a/test/validator/samples/a11y-aria-proptypes-global/input.svelte +++ b/test/validator/samples/a11y-aria-proptypes-global/input.svelte @@ -1,21 +1,9 @@ foo -foo -foo -foo foo -foo foo foo -foo -foo -foo -foo foo foo foo foo -foo -foo -foo -foo foo \ No newline at end of file diff --git a/test/validator/samples/a11y-aria-proptypes-global/warnings.json b/test/validator/samples/a11y-aria-proptypes-global/warnings.json index 849aee40d3b0..29f054308045 100644 --- a/test/validator/samples/a11y-aria-proptypes-global/warnings.json +++ b/test/validator/samples/a11y-aria-proptypes-global/warnings.json @@ -17,321 +17,129 @@ { "code": "a11y-invalid-aria-attribute-value", - "message": "A11y: The value for the aria attribute 'aria-atomic' must be exactly one of true or false", - "start": { - "line": 2, - "column": 6, - "character": 41 - }, "end": { - "line": 2, - "column": 23, - "character": 58 - }, - "pos": 41 - }, - - { - "code": "a11y-invalid-aria-attribute-value", - "message": "A11y: The value for the aria attribute 'aria-busy' must be exactly one of true or false", - "start": { - "line": 3, - "column": 6, - "character": 76 - }, - "end": { - "line": 3, - "column": 21, - "character": 91 - }, - "pos": 76 - }, - - { - "code": "a11y-invalid-aria-attribute-value", - "message": "A11y: The value for the aria attribute 'aria-controls' must be a space-separated list of strings that represent DOM element IDs", - "start": { - "line": 4, - "column": 6, - "character": 109 - }, - "end": { - "line": 4, - "column": 19, - "character": 122 - }, - "pos": 109 - }, - - { - "code": "a11y-invalid-aria-attribute-value", - "message": "A11y: The value for the aria attribute 'aria-current' must be exactly one of page, step, location, date, time, true, false", - "start": { - "line": 5, - "column": 6, - "character": 140 - }, - "end": { - "line": 5, + "character": 73, "column": 38, - "character": 172 + "line": 2 }, - "pos": 140 - }, - - { - "code": "a11y-invalid-aria-attribute-value", - "message": "A11y: The value for the aria attribute 'aria-describedby' must be a space-separated list of strings that represent DOM element IDs", + "message": "A11y: The value for the aria attribute 'aria-current' must be exactly one of page, step, location, date, time, true, false", + "pos": 41, "start": { - "line": 6, + "character": 41, "column": 6, - "character": 190 - }, - "end": { - "line": 6, - "column": 22, - "character": 206 - }, - "pos": 190 + "line": 2 + } }, { "code": "a11y-invalid-aria-attribute-value", "message": "A11y: The value for the aria attribute 'aria-details' must be a string that represents a DOM element ID", "start": { - "line": 7, + "line": 3, "column": 6, - "character": 224 + "character": 91 }, "end": { - "line": 7, + "line": 3, "column": 18, - "character": 236 + "character": 103 }, - "pos": 224 + "pos": 91 }, { "code": "a11y-invalid-aria-attribute-value", "end": { - "character": 273, + "character": 140, "column": 25, - "line": 8 + "line": 4 }, "message": "A11y: The value for the aria attribute 'aria-disabled' must be exactly one of true or false", - "pos": 254, - "start": { - "character": 254, - "column": 6, - "line": 8 - } - }, - - { - "code": "a11y-invalid-aria-attribute-value", - "end": { - "character": 330, - "column": 45, - "line": 9 - }, - "message": "A11y: The value for the aria attribute 'aria-dropeffect' must be a space-separated list of one or more of copy, execute, link, move, none, popup", - "pos": 291, + "pos": 121, "start": { - "character": 291, + "character": 121, "column": 6, - "line": 9 + "line": 4 } }, { "code": "a11y-invalid-aria-attribute-value", "end": { - "character": 365, - "column": 23, - "line": 10 - }, - "message": "A11y: The value for the aria attribute 'aria-errormessage' must be a string that represents a DOM element ID", - "pos": 348, - "start": { - "character": 348, - "column": 6, - "line": 10 - } - }, - - { - "code": "a11y-invalid-aria-attribute-value", - "end": { - "character": 394, - "column": 17, - "line": 11 - }, - "message": "A11y: The value for the aria attribute 'aria-flowto' must be a space-separated list of strings that represent DOM element IDs", - "pos": 383, - "start": { - "character": 383, - "column": 6, - "line": 11 - } - }, - - { - "code": "a11y-invalid-aria-attribute-value", - "end": { - "character": 430, - "column": 24, - "line": 12 - }, - "message": "A11y: The value for the aria attribute 'aria-grabbed' must be exactly one of true, false, or undefined", - "pos": 412, - "start": { - "character": 412, - "column": 6, - "line": 12 - } - }, - - { - "code": "a11y-invalid-aria-attribute-value", - "end": { - "character": 476, + "character": 186, "column": 34, - "line": 13 + "line": 5 }, "message": "A11y: The value for the aria attribute 'aria-haspopup' must be exactly one of false, true, menu, listbox, tree, grid, dialog", - "pos": 448, + "pos": 158, "start": { - "character": 448, + "character": 158, "column": 6, - "line": 13 + "line": 5 } }, { "code": "a11y-invalid-aria-attribute-value", "end": { - "character": 525, + "character": 235, "column": 37, - "line": 14 + "line": 6 }, "message": "A11y: The value for the aria attribute 'aria-invalid' must be exactly one of grammar, false, spelling, true", - "pos": 494, + "pos": 204, "start": { - "character": 494, + "character": 204, "column": 6, - "line": 14 + "line": 6 } }, { "code": "a11y-invalid-aria-attribute-value", "end": { - "character": 560, + "character": 270, "column": 23, - "line": 15 + "line": 7 }, "message": "A11y: The value for the aria attribute 'aria-keyshortcuts' must be of type string", - "pos": 543, + "pos": 253, "start": { - "character": 543, + "character": 253, "column": 6, - "line": 15 + "line": 7 } }, { "code": "a11y-invalid-aria-attribute-value", "end": { - "character": 588, + "character": 298, "column": 16, - "line": 16 + "line": 8 }, "message": "A11y: The value for the aria attribute 'aria-label' must be of type string", - "pos": 578, - "start": { - "character": 578, - "column": 6, - "line": 16 - } - }, - - { - "code": "a11y-invalid-aria-attribute-value", - "end": { - "character": 621, - "column": 21, - "line": 17 - }, - "message": "A11y: The value for the aria attribute 'aria-labelledby' must be a space-separated list of strings that represent DOM element IDs", - "pos": 606, - "start": { - "character": 606, - "column": 6, - "line": 17 - } - }, - - { - "code": "a11y-invalid-aria-attribute-value", - "end": { - "character": 667, - "column": 34, - "line": 18 - }, - "message": "A11y: The value for the aria attribute 'aria-live' must be exactly one of assertive, off, polite", - "pos": 639, - "start": { - "character": 639, - "column": 6, - "line": 18 - } - }, - - { - "code": "a11y-invalid-aria-attribute-value", - "end": { - "character": 694, - "column": 15, - "line": 19 - }, - "message": "A11y: The value for the aria attribute 'aria-owns' must be a space-separated list of strings that represent DOM element IDs", - "pos": 685, - "start": { - "character": 685, - "column": 6, - "line": 19 - } - }, - - { - "code": "a11y-invalid-aria-attribute-value", - "end": { - "character": 755, - "column": 49, - "line": 20 - }, - "message": "A11y: The value for the aria attribute 'aria-relevant' must be a space-separated list of one or more of additions, all, removals, text", - "pos": 712, + "pos": 288, "start": { - "character": 712, + "character": 288, "column": 6, - "line": 20 + "line": 8 } }, { "code": "a11y-invalid-aria-attribute-value", "end": { - "character": 793, + "character": 336, "column": 26, - "line": 21 + "line": 9 }, "message": "A11y: The value for the aria attribute 'aria-roledescription' must be of type string", - "pos": 773, + "pos": 316, "start": { - "character": 773, + "character": 316, "column": 6, - "line": 21 + "line": 9 } } ] \ No newline at end of file