From 5f99ae76ce4ad1b1be2a08a19a93a44178720523 Mon Sep 17 00:00:00 2001 From: Yuichiro Yamashita Date: Mon, 27 Feb 2023 19:40:24 +0900 Subject: [PATCH] chore: Reduce number of lines of expected files (#8325) - removes character and pos from the expected output to reduce noise - adds a test that pos/character are correct --- test/validator/index.ts | 77 ++++++-- .../samples/a11y-alt-text/warnings.json | 39 ++-- .../a11y-anchor-has-content/warnings.json | 11 +- .../a11y-anchor-in-svg-is-valid/warnings.json | 27 +-- .../a11y-anchor-is-valid/warnings.json | 54 ++---- .../a11y-aria-activedescendant/warnings.json | 3 - .../samples/a11y-aria-props/warnings.json | 19 +- .../a11y-aria-proptypes-boolean/warnings.json | 20 +- .../a11y-aria-proptypes-integer/warnings.json | 29 +-- .../a11y-aria-proptypes-number/warnings.json | 83 ++++---- .../a11y-aria-proptypes-string/warnings.json | 29 ++- .../a11y-aria-proptypes-token/warnings.json | 38 ++-- .../warnings.json | 47 ++--- .../warnings.json | 20 +- .../samples/a11y-aria-role/warnings.json | 18 +- .../warnings.json | 19 +- .../warnings.json | 63 +++---- .../errors.json | 9 +- .../a11y-figcaption-wrong-place/warnings.json | 18 +- .../a11y-heading-has-content/warnings.json | 19 +- .../samples/a11y-html-has-lang/warnings.json | 9 +- .../a11y-iframe-has-title/warnings.json | 9 +- .../a11y-img-redundant-alt/warnings.json | 17 +- .../warnings.json | 6 - .../a11y-media-has-caption/warnings.json | 12 -- .../input.svelte | 2 +- .../warnings.json | 14 +- .../a11y-no-abstract-roles/warnings.json | 36 ---- .../samples/a11y-no-access-key/warnings.json | 11 +- .../samples/a11y-no-autofocus/warnings.json | 11 +- .../warnings.json | 19 +- .../warnings.json | 177 ------------------ .../warnings.json | 12 -- .../a11y-no-redundant-roles/warnings.json | 126 ------------- .../a11y-not-on-components/warnings.json | 9 +- .../warnings.json | 32 +--- .../samples/a11y-scope/warnings.json | 9 +- .../a11y-tabindex-no-positive/warnings.json | 9 +- .../samples/action-invalid/warnings.json | 9 +- .../samples/action-object/input.svelte | 4 +- .../samples/action-object/warnings.json | 3 - .../samples/action-on-component/errors.json | 9 +- .../samples/animation-duplicate/errors.json | 11 +- .../samples/animation-missing/warnings.json | 11 +- .../samples/animation-not-in-each/errors.json | 9 +- .../animation-not-in-keyed-each/errors.json | 9 +- .../samples/animation-siblings/errors.json | 9 +- .../samples/assignment-to-const-2/errors.json | 11 +- .../samples/assignment-to-const-3/errors.json | 11 +- .../samples/assignment-to-const-4/errors.json | 11 +- .../samples/assignment-to-const/errors.json | 11 +- .../attribute-expected-equals/errors.json | 9 +- .../attribute-invalid-name-2/errors.json | 9 +- .../attribute-invalid-name-3/errors.json | 9 +- .../attribute-invalid-name-4/errors.json | 9 +- .../attribute-invalid-name-5/errors.json | 9 +- .../attribute-invalid-name/errors.json | 9 +- .../samples/binding-await-catch/errors.json | 5 +- .../samples/binding-await-then-2/errors.json | 5 +- .../samples/binding-await-then/errors.json | 5 +- .../samples/binding-const/errors.json | 9 +- .../binding-dimensions-svg-child/errors.json | 9 +- .../binding-dimensions-svg/errors.json | 9 +- .../binding-dimensions-void/errors.json | 9 +- .../samples/binding-input-checked/errors.json | 11 +- .../binding-input-type-boolean/errors.json | 11 +- .../binding-input-type-dynamic/errors.json | 11 +- .../errors.json | 7 +- .../binding-invalid-on-element/errors.json | 9 +- .../binding-invalid-value-global/errors.json | 7 +- .../samples/binding-invalid-value/errors.json | 9 +- .../samples/binding-invalid/errors.json | 9 +- .../validator/samples/binding-let/errors.json | 9 +- .../errors.json | 11 +- .../samples/component-dynamic/warnings.json | 9 - .../errors.json | 9 +- .../errors.json | 5 +- .../component-name-lowercase/warnings.json | 3 - .../errors.json | 5 +- .../errors.json | 11 +- .../errors.json | 11 +- .../component-slot-dynamic/errors.json | 11 +- .../errors.json | 5 +- .../errors.json | 5 +- .../component-slotted-each-block/errors.json | 11 +- .../component-slotted-if-block/errors.json | 11 +- .../samples/const-tag-conflict-1/errors.json | 5 +- .../samples/const-tag-conflict-2/errors.json | 5 +- .../samples/const-tag-cyclical/errors.json | 5 +- .../const-tag-out-of-scope/warnings.json | 3 - .../samples/const-tag-placement-1/errors.json | 5 +- .../samples/const-tag-placement-2/errors.json | 5 +- .../samples/const-tag-readonly-1/errors.json | 5 +- .../samples/const-tag-readonly-2/errors.json | 5 +- .../contenteditable-dynamic/errors.json | 11 +- .../contenteditable-missing/errors.json | 11 +- .../errors.json | 5 +- .../errors.json | 5 +- .../errors.json | 5 +- .../errors.json | 5 +- .../errors.json | 9 +- .../errors.json | 9 +- .../css-invalid-global-placement/errors.json | 11 +- .../css-invalid-global-selector-2/errors.json | 9 +- .../css-invalid-global-selector-3/errors.json | 9 +- .../css-invalid-global-selector-4/errors.json | 9 +- .../css-invalid-global-selector-5/errors.json | 9 +- .../css-invalid-global-selector-6/errors.json | 9 +- .../css-invalid-global-selector/errors.json | 9 +- .../samples/debug-invalid-args/errors.json | 11 +- .../errors.json | 7 +- .../errors.json | 7 +- .../samples/default-export/errors.json | 7 +- .../directive-non-expression/errors.json | 9 +- .../errors.json | 9 +- .../errors.json | 9 +- .../dollar-global-in-markup/errors.json | 9 +- .../dollar-global-in-script/errors.json | 9 +- .../dynamic-element-invalid-tag/errors.json | 9 +- .../dynamic-element-missing-tag/errors.json | 9 +- .../samples/dynamic-element-this/errors.json | 9 +- .../errors.json | 7 +- .../errors.json | 9 +- .../errors.json | 11 +- .../each-block-invalid-context/errors.json | 11 +- .../samples/empty-block/warnings.json | 20 +- .../samples/error-mode-warn/warnings.json | 15 +- .../errors.json | 9 +- .../errors.json | 9 +- .../event-modifiers-invalid/errors.json | 9 +- .../event-modifiers-legacy/errors.json | 9 +- .../event-modifiers-redundant/warnings.json | 18 +- .../html-block-in-attribute/errors.json | 5 +- .../html-block-in-textarea/errors.json | 5 +- .../samples/ignore-warning/warnings.json | 8 +- .../ignore-warnings-cumulative/warnings.json | 5 +- .../ignore-warnings-newline/warnings.json | 5 +- .../ignore-warnings-stacked/warnings.json | 5 +- .../samples/ignore-warnings/warnings.json | 5 +- .../illegal-variable-declaration/errors.json | 9 +- .../invalid-empty-css-declaration/errors.json | 12 +- .../logic-block-in-attribute/errors.json | 5 +- .../logic-block-in-textarea/errors.json | 5 +- .../missing-component-global/warnings.json | 11 +- .../samples/missing-component/warnings.json | 11 +- .../warnings.json | 3 - .../warnings.json | 5 +- .../errors.json | 9 +- .../errors.json | 9 +- .../namespace-invalid-unguessable/errors.json | 7 +- .../samples/namespace-invalid/errors.json | 7 +- .../samples/namespace-non-literal/errors.json | 7 +- .../reactive-declaration-cyclical/errors.json | 5 +- .../warnings.json | 5 +- .../reactive-module-variable/warnings.json | 3 - .../ref-not-supported-in-css/errors.json | 9 +- .../samples/ref-not-supported/errors.json | 9 +- .../rest-eachblock-binding-2/warnings.json | 5 +- .../rest-eachblock-binding-3/warnings.json | 5 +- .../rest-eachblock-binding/warnings.json | 5 +- .../script-invalid-context/errors.json | 9 +- .../warnings.json | 54 ------ .../slot-attribute-invalid/errors.json | 9 +- .../samples/slot-warning/warnings.json | 5 +- .../samples/slot-warning2/warnings.json | 5 +- .../errors.json | 9 +- .../svelte-fragment-placement-2/errors.json | 5 +- .../svelte-fragment-placement/errors.json | 5 +- .../warnings.json | 27 ++- .../validator/samples/tag-invalid/errors.json | 9 +- .../samples/tag-non-string/errors.json | 9 +- .../textarea-value-children/errors.json | 11 +- .../samples/title-no-attributes/errors.json | 11 +- .../samples/title-no-children/errors.json | 11 +- .../errors.json | 11 +- .../transition-duplicate-in/errors.json | 11 +- .../errors.json | 11 +- .../transition-duplicate-out/errors.json | 11 +- .../errors.json | 11 +- .../errors.json | 11 +- .../errors.json | 11 +- .../samples/transition-missing/warnings.json | 11 +- .../transition-on-component/errors.json | 11 +- .../undefined-value-global/warnings.json | 7 +- .../samples/undefined-value/warnings.json | 9 +- .../unreferenced-variables-each/warnings.json | 6 - .../unreferenced-variables/warnings.json | 15 -- .../samples/use-the-platform/warnings.json | 6 - .../errors.json | 11 +- .../window-binding-invalid-value/errors.json | 11 +- .../window-binding-invalid-width/errors.json | 11 +- .../window-binding-invalid/errors.json | 11 +- 192 files changed, 743 insertions(+), 1775 deletions(-) diff --git a/test/validator/index.ts b/test/validator/index.ts index e58be87a3a..fce5ed7065 100644 --- a/test/validator/index.ts +++ b/test/validator/index.ts @@ -33,13 +33,15 @@ describe('validate', () => { ...options }); - assert.deepEqual(warnings.map(w => ({ - code: w.code, - message: w.message, - pos: w.pos, - start: w.start, - end: w.end - })), expected_warnings); + assert.deepEqual( + warnings.map((w) => ({ + code: w.code, + message: w.message, + start: { line: w.start.line, column: w.start.column }, + end: { line: w.end.line, column: w.end.column } + })), + expected_warnings + ); } catch (e) { error = e; } @@ -56,13 +58,17 @@ describe('validate', () => { } try { - assert.equal(error.code, expected.code); - assert.equal(error.message, expected.message); - assert.deepEqual(error.start, expected.start); - assert.deepEqual(error.end, expected.end); - assert.equal(error.pos, expected.pos); + assert.deepEqual( + { + code: error.code, + message: error.message, + start: { line: error.start.line, column: error.start.column }, + end: { line: error.end.line, column: error.end.column } + }, + expected + ); } catch (e) { - console.error(error); // eslint-disable-line no-console + console.error(error); throw e; } } @@ -78,6 +84,51 @@ describe('validate', () => { }, /options\.name must be a valid identifier/); }); + it('check warning position', () => { + const { warnings } = svelte.compile('\n \n', { + generate: false + }); + + assert.deepEqual( + warnings.map((w) => { + return { + code: w.code, + frame: w.frame, + message: w.message, + start: { + character: w.start.character, + column: w.start.column, + line: w.start.line + }, + end: { + character: w.end.character, + column: w.end.column, + line: w.end.line + }, + pos: w.pos + }; + }), + [ + { + code: 'a11y-missing-attribute', + frame: '1: \n2: \n4: ', + message: 'A11y: element should have an alt attribute', + start: { + character: 3, + column: 2, + line: 2 + }, + end: { + character: 24, + column: 15, + line: 3 + }, + pos: 3 + } + ] + ); + }); + it('warns if options.name is not capitalised', () => { const { warnings } = svelte.compile('
', { name: 'lowercase', diff --git a/test/validator/samples/a11y-alt-text/warnings.json b/test/validator/samples/a11y-alt-text/warnings.json index 7ce5fb2d8f..904288c45c 100644 --- a/test/validator/samples/a11y-alt-text/warnings.json +++ b/test/validator/samples/a11y-alt-text/warnings.json @@ -4,62 +4,47 @@ "message": "A11y: element should have an alt attribute", "start": { "line": 1, - "column": 0, - "character": 0 + "column": 0 }, "end": { "line": 1, - "column": 19, - "character": 19 - }, - "pos": 0 + "column": 19 + } }, - { "code": "a11y-missing-attribute", "message": "A11y: element should have an alt, aria-label or aria-labelledby attribute", "start": { "line": 4, - "column": 1, - "character": 28 + "column": 1 }, "end": { "line": 4, - "column": 7, - "character": 34 - }, - "pos": 28 + "column": 7 + } }, - { "code": "a11y-missing-attribute", "message": "A11y: element should have a title, aria-label or aria-labelledby attribute", "start": { "line": 7, - "column": 0, - "character": 43 + "column": 0 }, "end": { "line": 7, - "column": 17, - "character": 60 - }, - "pos": 43 + "column": 17 + } }, - { "code": "a11y-missing-attribute", "message": "A11y: element should have an alt, aria-label or aria-labelledby attribute", "start": { "line": 9, - "column": 0, - "character": 62 + "column": 0 }, "end": { "line": 9, - "column": 20, - "character": 82 - }, - "pos": 62 + "column": 20 + } } ] diff --git a/test/validator/samples/a11y-anchor-has-content/warnings.json b/test/validator/samples/a11y-anchor-has-content/warnings.json index 8708311f3c..e5e0a5a48c 100644 --- a/test/validator/samples/a11y-anchor-has-content/warnings.json +++ b/test/validator/samples/a11y-anchor-has-content/warnings.json @@ -3,13 +3,10 @@ "message": "A11y: element should have child content", "start": { "line": 1, - "column": 0, - "character": 0 + "column": 0 }, "end": { "line": 1, - "column": 19, - "character": 19 - }, - "pos": 0 -}] \ No newline at end of file + "column": 19 + } +}] diff --git a/test/validator/samples/a11y-anchor-in-svg-is-valid/warnings.json b/test/validator/samples/a11y-anchor-in-svg-is-valid/warnings.json index eb62ce8db6..0ca16767d7 100644 --- a/test/validator/samples/a11y-anchor-in-svg-is-valid/warnings.json +++ b/test/validator/samples/a11y-anchor-in-svg-is-valid/warnings.json @@ -4,44 +4,35 @@ "message": "A11y: element should have an href attribute", "start": { "line": 1, - "column": 11, - "character": 11 + "column": 11 }, "end": { "line": 1, - "column": 37, - "character": 37 - }, - "pos": 11 + "column": 37 + } }, { "code": "a11y-invalid-attribute", "message": "A11y: '' is not a valid xlink:href attribute", "start": { "line": 2, - "column": 14, - "character": 65 + "column": 14 }, "end": { "line": 2, - "column": 27, - "character": 78 - }, - "pos": 65 + "column": 27 + } }, { "code": "a11y-invalid-attribute", "message": "A11y: '#' is not a valid xlink:href attribute", "start": { "line": 3, - "column": 14, - "character": 130 + "column": 14 }, "end": { "line": 3, - "column": 28, - "character": 144 - }, - "pos": 130 + "column": 28 + } } ] diff --git a/test/validator/samples/a11y-anchor-is-valid/warnings.json b/test/validator/samples/a11y-anchor-is-valid/warnings.json index f04c6f1593..50d19ae630 100644 --- a/test/validator/samples/a11y-anchor-is-valid/warnings.json +++ b/test/validator/samples/a11y-anchor-is-valid/warnings.json @@ -4,89 +4,71 @@ "message": "A11y: element should have an href attribute", "start": { "line": 1, - "column": 0, - "character": 0 + "column": 0 }, "end": { "line": 1, - "column": 26, - "character": 26 - }, - "pos": 0 + "column": 26 + } }, { "code": "a11y-invalid-attribute", "message": "A11y: '' is not a valid href attribute", "start": { "line": 2, - "column": 3, - "character": 30 + "column": 3 }, "end": { "line": 2, - "column": 10, - "character": 37 - }, - "pos": 30 + "column": 10 + } }, { "code": "a11y-invalid-attribute", "message": "A11y: '#' is not a valid href attribute", "start": { "line": 3, - "column": 3, - "character": 53 + "column": 3 }, "end": { "line": 3, - "column": 11, - "character": 61 - }, - "pos": 53 + "column": 11 + } }, { "code": "a11y-invalid-attribute", "message": "A11y: 'javascript:void(0)' is not a valid href attribute", "start": { "line": 4, - "column": 3, - "character": 77 + "column": 3 }, "end": { "line": 4, - "column": 28, - "character": 102 - }, - "pos": 77 + "column": 28 + } }, { "code": "a11y-missing-attribute", "message": "A11y: element should have an href attribute", "start": { "line": 5, - "column": 0, - "character": 115 + "column": 0 }, "end": { "line": 5, - "column": 22, - "character": 137 - }, - "pos": 115 + "column": 22 + } }, { "code": "a11y-missing-attribute", "message": "A11y: element should have an href attribute", "start": { "line": 6, - "column": 0, - "character": 138 + "column": 0 }, "end": { "line": 6, - "column": 20, - "character": 158 - }, - "pos": 138 + "column": 20 + } } ] diff --git a/test/validator/samples/a11y-aria-activedescendant/warnings.json b/test/validator/samples/a11y-aria-activedescendant/warnings.json index 8749c1c125..57288f188f 100644 --- a/test/validator/samples/a11y-aria-activedescendant/warnings.json +++ b/test/validator/samples/a11y-aria-activedescendant/warnings.json @@ -2,14 +2,11 @@ { "code": "a11y-aria-activedescendant-has-tabindex", "end": { - "character": 568, "column": 36, "line": 16 }, "message": "A11y: Elements with attribute aria-activedescendant should have tabindex value", - "pos": 537, "start": { - "character": 537, "column": 5, "line": 16 } diff --git a/test/validator/samples/a11y-aria-props/warnings.json b/test/validator/samples/a11y-aria-props/warnings.json index 73d34fc589..f357429f62 100644 --- a/test/validator/samples/a11y-aria-props/warnings.json +++ b/test/validator/samples/a11y-aria-props/warnings.json @@ -4,30 +4,23 @@ "message": "A11y: Unknown aria attribute 'aria-labeledby' (did you mean 'labelledby'?)", "start": { "line": 1, - "column": 20, - "character": 20 + "column": 20 }, "end": { "line": 1, - "column": 40, - "character": 40 - }, - "pos": 20 + "column": 40 + } }, - { "code": "a11y-missing-attribute", "message": "A11y: element should have an alt, aria-label or aria-labelledby attribute", "start": { "column": 0, - "line": 1, - "character": 0 + "line": 1 }, "end": { "line": 1, - "column": 41, - "character": 41 - }, - "pos": 0 + "column": 41 + } } ] diff --git a/test/validator/samples/a11y-aria-proptypes-boolean/warnings.json b/test/validator/samples/a11y-aria-proptypes-boolean/warnings.json index b43697b64d..eadd4314bb 100644 --- a/test/validator/samples/a11y-aria-proptypes-boolean/warnings.json +++ b/test/validator/samples/a11y-aria-proptypes-boolean/warnings.json @@ -4,29 +4,23 @@ "message": "A11y: The value of 'aria-disabled' must be exactly one of true or false", "start": { "line": 5, - "column": 8, - "character": 51 + "column": 8 }, "end": { "line": 5, - "column": 27, - "character": 70 - }, - "pos": 51 + "column": 27 + } }, { "code": "a11y-incorrect-aria-attribute-type", "message": "A11y: The value of 'aria-disabled' must be exactly one of true or false", "start": { "line": 6, - "column": 8, - "character": 81 + "column": 8 }, "end": { "line": 6, - "column": 26, - "character": 99 - }, - "pos": 81 + "column": 26 + } } -] \ No newline at end of file +] diff --git a/test/validator/samples/a11y-aria-proptypes-integer/warnings.json b/test/validator/samples/a11y-aria-proptypes-integer/warnings.json index e4c37df493..f894174368 100644 --- a/test/validator/samples/a11y-aria-proptypes-integer/warnings.json +++ b/test/validator/samples/a11y-aria-proptypes-integer/warnings.json @@ -4,44 +4,35 @@ "message": "A11y: The value of 'aria-level' must be of type integer", "start": { "line": 1, - "column": 5, - "character": 5 + "column": 5 }, "end": { "line": 1, - "column": 21, - "character": 21 - }, - "pos": 5 + "column": 21 + } }, { "code": "a11y-incorrect-aria-attribute-type", "message": "A11y: The value of 'aria-level' must be of type integer", "start": { "line": 2, - "column": 5, - "character": 30 + "column": 5 }, "end": { "line": 2, - "column": 20, - "character": 45 - }, - "pos": 30 + "column": 20 + } }, { "code": "a11y-incorrect-aria-attribute-type", "message": "A11y: The value of 'aria-level' must be of type integer", "start": { "line": 5, - "column": 5, - "character": 107 + "column": 5 }, "end": { "line": 5, - "column": 15, - "character": 117 - }, - "pos": 107 + "column": 15 + } } -] \ No newline at end of file +] diff --git a/test/validator/samples/a11y-aria-proptypes-number/warnings.json b/test/validator/samples/a11y-aria-proptypes-number/warnings.json index 93c64cb97b..e28a43df37 100644 --- a/test/validator/samples/a11y-aria-proptypes-number/warnings.json +++ b/test/validator/samples/a11y-aria-proptypes-number/warnings.json @@ -1,47 +1,38 @@ [ - { - "code": "a11y-incorrect-aria-attribute-type", - "message": "A11y: The value of 'aria-valuemax' must be of type number", - "start": { - "line": 1, - "column": 5, - "character": 5 - }, - "end": { - "line": 1, - "column": 24, - "character": 24 - }, - "pos": 5 - }, - { - "code": "a11y-incorrect-aria-attribute-type", - "message": "A11y: The value of 'aria-valuemax' must be of type number", - "start": { - "line": 2, - "column": 5, - "character": 33 - }, - "end": { - "line": 2, - "column": 23, - "character": 51 - }, - "pos": 33 - }, - { - "code": "a11y-incorrect-aria-attribute-type", - "message": "A11y: The value of 'aria-valuemax' must be of type number", - "start": { - "line": 5, - "column": 5, - "character": 119 - }, - "end": { - "line": 5, - "column": 18, - "character": 132 - }, - "pos": 119 - } -] \ No newline at end of file + { + "code": "a11y-incorrect-aria-attribute-type", + "message": "A11y: The value of 'aria-valuemax' must be of type number", + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 24 + } + }, + { + "code": "a11y-incorrect-aria-attribute-type", + "message": "A11y: The value of 'aria-valuemax' must be of type number", + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 23 + } + }, + { + "code": "a11y-incorrect-aria-attribute-type", + "message": "A11y: The value of 'aria-valuemax' must be of type number", + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 18 + } + } +] diff --git a/test/validator/samples/a11y-aria-proptypes-string/warnings.json b/test/validator/samples/a11y-aria-proptypes-string/warnings.json index f83eb895a4..2dd8f2509f 100644 --- a/test/validator/samples/a11y-aria-proptypes-string/warnings.json +++ b/test/validator/samples/a11y-aria-proptypes-string/warnings.json @@ -1,17 +1,14 @@ [ - { - "code": "a11y-incorrect-aria-attribute-type", - "message": "A11y: The value of 'aria-label' must be of type string", - "start": { - "line": 1, - "column": 5, - "character": 5 - }, - "end": { - "line": 1, - "column": 15, - "character": 15 - }, - "pos": 5 - } -] \ No newline at end of file + { + "code": "a11y-incorrect-aria-attribute-type", + "message": "A11y: The value of 'aria-label' must be of type string", + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 15 + } + } +] diff --git a/test/validator/samples/a11y-aria-proptypes-token/warnings.json b/test/validator/samples/a11y-aria-proptypes-token/warnings.json index 168fc70434..b07838dde4 100644 --- a/test/validator/samples/a11y-aria-proptypes-token/warnings.json +++ b/test/validator/samples/a11y-aria-proptypes-token/warnings.json @@ -4,59 +4,47 @@ "message": "A11y: The value of 'aria-sort' must be exactly one of ascending, descending, none, other", "start": { "line": 1, - "column": 5, - "character": 5 + "column": 5 }, "end": { "line": 1, - "column": 17, - "character": 17 - }, - "pos": 5 + "column": 17 + } }, { "code": "a11y-incorrect-aria-attribute-type", "message": "A11y: The value of 'aria-sort' must be exactly one of ascending, descending, none, other", "start": { "line": 2, - "column": 5, - "character": 26 + "column": 5 }, "end": { "line": 2, - "column": 26, - "character": 47 - }, - "pos": 26 + "column": 26 + } }, { "code": "a11y-incorrect-aria-attribute-type", "message": "A11y: The value of 'aria-sort' must be exactly one of ascending, descending, none, other", "start": { "line": 3, - "column": 5, - "character": 56 + "column": 5 }, "end": { "line": 3, - "column": 14, - "character": 65 - }, - "pos": 56 + "column": 14 + } }, { "code": "a11y-incorrect-aria-attribute-type", "message": "A11y: The value of 'aria-sort' must be exactly one of ascending, descending, none, other", "start": { "line": 6, - "column": 5, - "character": 127 + "column": 5 }, "end": { "line": 6, - "column": 37, - "character": 159 - }, - "pos": 127 + "column": 37 + } } -] \ No newline at end of file +] diff --git a/test/validator/samples/a11y-aria-proptypes-tokenlist/warnings.json b/test/validator/samples/a11y-aria-proptypes-tokenlist/warnings.json index 959f1821a5..43159dafcd 100644 --- a/test/validator/samples/a11y-aria-proptypes-tokenlist/warnings.json +++ b/test/validator/samples/a11y-aria-proptypes-tokenlist/warnings.json @@ -4,74 +4,59 @@ "message": "A11y: The value of 'aria-relevant' must be a space-separated list of one or more of additions, all, removals, text", "start": { "line": 1, - "column": 5, - "character": 5 + "column": 5 }, "end": { "line": 1, - "column": 21, - "character": 21 - }, - "pos": 5 + "column": 21 + } }, { "code": "a11y-incorrect-aria-attribute-type", "message": "A11y: The value of 'aria-relevant' must be a space-separated list of one or more of additions, all, removals, text", "start": { "line": 2, - "column": 5, - "character": 30 + "column": 5 }, "end": { "line": 2, - "column": 27, - "character": 52 - }, - "pos": 30 + "column": 27 + } }, { "code": "a11y-incorrect-aria-attribute-type", "message": "A11y: The value of 'aria-relevant' must be a space-separated list of one or more of additions, all, removals, text", "start": { "line": 3, - "column": 5, - "character": 61 + "column": 5 }, "end": { "line": 3, - "column": 18, - "character": 74 - }, - "pos": 61 + "column": 18 + } }, { "code": "a11y-incorrect-aria-attribute-type", "message": "A11y: The value of 'aria-relevant' must be a space-separated list of one or more of additions, all, removals, text", "start": { "line": 6, - "column": 5, - "character": 144 + "column": 5 }, "end": { "line": 6, - "column": 40, - "character": 179 - }, - "pos": 144 + "column": 40 + } }, { "code": "a11y-incorrect-aria-attribute-type", "message": "A11y: The value of 'aria-relevant' must be a space-separated list of one or more of additions, all, removals, text", "start": { "line": 7, - "column": 5, - "character": 188 + "column": 5 }, "end": { "line": 7, - "column": 41, - "character": 224 - }, - "pos": 188 + "column": 41 + } } -] \ No newline at end of file +] diff --git a/test/validator/samples/a11y-aria-proptypes-tristate/warnings.json b/test/validator/samples/a11y-aria-proptypes-tristate/warnings.json index a8ff8fd3a1..3711efa22b 100644 --- a/test/validator/samples/a11y-aria-proptypes-tristate/warnings.json +++ b/test/validator/samples/a11y-aria-proptypes-tristate/warnings.json @@ -4,29 +4,23 @@ "message": "A11y: The value of 'aria-checked' must be exactly one of true, false, or mixed", "start": { "line": 5, - "column": 5, - "character": 48 + "column": 5 }, "end": { "line": 5, - "column": 23, - "character": 66 - }, - "pos": 48 + "column": 23 + } }, { "code": "a11y-incorrect-aria-attribute-type", "message": "A11y: The value of 'aria-checked' must be exactly one of true, false, or mixed", "start": { "line": 6, - "column": 5, - "character": 75 + "column": 5 }, "end": { "line": 6, - "column": 22, - "character": 92 - }, - "pos": 75 + "column": 22 + } } -] \ No newline at end of file +] diff --git a/test/validator/samples/a11y-aria-role/warnings.json b/test/validator/samples/a11y-aria-role/warnings.json index 2943f232f8..49581ac003 100644 --- a/test/validator/samples/a11y-aria-role/warnings.json +++ b/test/validator/samples/a11y-aria-role/warnings.json @@ -4,29 +4,23 @@ "message": "A11y: Unknown role 'toooltip' (did you mean 'tooltip'?)", "start": { "line": 6, - "column": 5, - "character": 101 + "column": 5 }, "end": { "line": 6, - "column": 20, - "character": 116 - }, - "pos": 101 + "column": 20 + } }, { "code": "a11y-unknown-role", "message": "A11y: Unknown role 'toooltip' (did you mean 'tooltip'?)", "start": { "line": 7, - "column": 5, - "character": 129 + "column": 5 }, "end": { "line": 7, - "column": 27, - "character": 151 - }, - "pos": 129 + "column": 27 + } } ] diff --git a/test/validator/samples/a11y-aria-unsupported-element/warnings.json b/test/validator/samples/a11y-aria-unsupported-element/warnings.json index 4597e3e868..04891378b0 100644 --- a/test/validator/samples/a11y-aria-unsupported-element/warnings.json +++ b/test/validator/samples/a11y-aria-unsupported-element/warnings.json @@ -4,30 +4,23 @@ "message": "A11y: should not have aria-* attributes", "start": { "line": 1, - "column": 6, - "character": 6 + "column": 6 }, "end": { "line": 1, - "column": 25, - "character": 25 - }, - "pos": 6 + "column": 25 + } }, - { "code": "a11y-misplaced-role", "message": "A11y: should not have role attribute", "start": { "line": 2, - "column": 6, - "character": 33 + "column": 6 }, "end": { "line": 2, - "column": 20, - "character": 47 - }, - "pos": 33 + "column": 20 + } } ] diff --git a/test/validator/samples/a11y-click-events-have-key-events/warnings.json b/test/validator/samples/a11y-click-events-have-key-events/warnings.json index 220f8377a3..904c733a99 100644 --- a/test/validator/samples/a11y-click-events-have-key-events/warnings.json +++ b/test/validator/samples/a11y-click-events-have-key-events/warnings.json @@ -4,104 +4,83 @@ "message": "A11y: visible, non-interactive elements with an on:click event must be accompanied by an on:keydown, on:keyup, or on:keypress event.", "start": { "line": 12, - "column": 0, - "character": 190 + "column": 0 }, "end": { "line": 12, - "column": 23, - "character": 213 - }, - "pos": 190 + "column": 23 + } }, { "code": "a11y-click-events-have-key-events", "message": "A11y: visible, non-interactive elements with an on:click event must be accompanied by an on:keydown, on:keyup, or on:keypress event.", "start": { "line": 13, - "column": 0, - "character": 214 + "column": 0 }, "end": { "line": 13, - "column": 43, - "character": 257 - }, - "pos": 214 + "column": 43 + } }, { "code": "a11y-click-events-have-key-events", "message": "A11y: visible, non-interactive elements with an on:click event must be accompanied by an on:keydown, on:keyup, or on:keypress event.", "start": { "line": 15, - "column": 0, - "character": 259 + "column": 0 }, "end": { "line": 15, - "column": 27, - "character": 286 - }, - "pos": 259 + "column": 27 + } }, { "code": "a11y-click-events-have-key-events", "message": "A11y: visible, non-interactive elements with an on:click event must be accompanied by an on:keydown, on:keyup, or on:keypress event.", "start": { "line": 16, - "column": 0, - "character": 287 + "column": 0 }, "end": { "line": 16, - "column": 24, - "character": 311 - }, - "pos": 287 + "column": 24 + } }, { "code": "a11y-click-events-have-key-events", "message": "A11y: visible, non-interactive elements with an on:click event must be accompanied by an on:keydown, on:keyup, or on:keypress event.", "start": { "line": 17, - "column": 0, - "character": 312 + "column": 0 }, "end": { "line": 17, - "column": 27, - "character": 339 - }, - "pos": 312 + "column": 27 + } }, { "code": "a11y-click-events-have-key-events", "message": "A11y: visible, non-interactive elements with an on:click event must be accompanied by an on:keydown, on:keyup, or on:keypress event.", "start": { "line": 18, - "column": 0, - "character": 340 + "column": 0 }, "end": { "line": 18, - "column": 26, - "character": 366 - }, - "pos": 340 + "column": 26 + } }, { "code": "a11y-click-events-have-key-events", "message": "A11y: visible, non-interactive elements with an on:click event must be accompanied by an on:keydown, on:keyup, or on:keypress event.", "start": { "line": 19, - "column": 0, - "character": 367 + "column": 0 }, "end": { "line": 19, - "column": 26, - "character": 393 - }, - "pos": 367 + "column": 26 + } } ] diff --git a/test/validator/samples/a11y-contenteditable-element-without-child/errors.json b/test/validator/samples/a11y-contenteditable-element-without-child/errors.json index dd2a915b9d..b4bd522c40 100644 --- a/test/validator/samples/a11y-contenteditable-element-without-child/errors.json +++ b/test/validator/samples/a11y-contenteditable-element-without-child/errors.json @@ -4,14 +4,11 @@ "message": "'contenteditable' attribute is required for textContent and innerHTML two-way bindings", "start": { "line": 6, - "column": 3, - "character": 157 + "column": 3 }, "end": { "line": 6, - "column": 24, - "character": 178 - }, - "pos": 157 + "column": 24 + } } ] diff --git a/test/validator/samples/a11y-figcaption-wrong-place/warnings.json b/test/validator/samples/a11y-figcaption-wrong-place/warnings.json index eba5b6f31e..c9cac1daf9 100644 --- a/test/validator/samples/a11y-figcaption-wrong-place/warnings.json +++ b/test/validator/samples/a11y-figcaption-wrong-place/warnings.json @@ -4,29 +4,23 @@ "message": "A11y:
must be first or last child of
", "start": { "line": 4, - "column": 1, - "character": 44 + "column": 1 }, "end": { "line": 6, - "column": 14, - "character": 102 - }, - "pos": 44 + "column": 14 + } }, { "code": "a11y-structure", "message": "A11y:
must be an immediate child of
", "start": { "line": 15, - "column": 2, - "character": 226 + "column": 2 }, "end": { "line": 17, - "column": 15, - "character": 302 - }, - "pos": 226 + "column": 15 + } } ] diff --git a/test/validator/samples/a11y-heading-has-content/warnings.json b/test/validator/samples/a11y-heading-has-content/warnings.json index 9cb77adc02..ad5f5d4033 100644 --- a/test/validator/samples/a11y-heading-has-content/warnings.json +++ b/test/validator/samples/a11y-heading-has-content/warnings.json @@ -4,30 +4,23 @@ "message": "A11y:

element should have child content", "start": { "line": 1, - "column": 0, - "character": 0 + "column": 0 }, "end": { "line": 1, - "column": 9, - "character": 9 - }, - "pos": 0 + "column": 9 + } }, - { "code": "a11y-hidden", "message": "A11y:

element should not be hidden", "start": { "line": 2, - "column": 4, - "character": 14 + "column": 4 }, "end": { "line": 2, - "column": 15, - "character": 25 - }, - "pos": 14 + "column": 15 + } } ] diff --git a/test/validator/samples/a11y-html-has-lang/warnings.json b/test/validator/samples/a11y-html-has-lang/warnings.json index 2ac8a2e5e0..097e8e88bd 100644 --- a/test/validator/samples/a11y-html-has-lang/warnings.json +++ b/test/validator/samples/a11y-html-has-lang/warnings.json @@ -4,14 +4,11 @@ "message": "A11y: element should have a lang attribute", "start": { "column": 0, - "line": 9, - "character": 124 + "line": 9 }, "end": { "line": 9, - "column": 13, - "character": 137 - }, - "pos": 124 + "column": 13 + } } ] diff --git a/test/validator/samples/a11y-iframe-has-title/warnings.json b/test/validator/samples/a11y-iframe-has-title/warnings.json index cc80cceaa2..e78523931e 100644 --- a/test/validator/samples/a11y-iframe-has-title/warnings.json +++ b/test/validator/samples/a11y-iframe-has-title/warnings.json @@ -4,14 +4,11 @@ "message": "A11y: