diff --git a/src/validate/html/a11y.ts b/src/validate/html/a11y.ts
index 1e07c0b4d4..8f24565071 100644
--- a/src/validate/html/a11y.ts
+++ b/src/validate/html/a11y.ts
@@ -33,7 +33,7 @@ export default function a11y(
if (name.startsWith('aria-')) {
if (invisibleElements.has(node.name)) {
// aria-unsupported-elements
- validator.warn(`A11y: <${node.name}> should not have aria-* attributes`, attribute.start);
+ validator.warn(`A11y: <${node.name}> should not have aria-* attributes`, { start: attribute.start, end: attribute.end });
}
const type = name.slice(5);
@@ -42,7 +42,7 @@ export default function a11y(
let message = `A11y: Unknown aria attribute 'aria-${type}'`;
if (match) message += ` (did you mean '${match}'?)`;
- validator.warn(message, attribute.start);
+ validator.warn(message, { start: attribute.start, end: attribute.end });
}
}
@@ -50,7 +50,7 @@ export default function a11y(
if (name === 'role') {
if (invisibleElements.has(node.name)) {
// aria-unsupported-elements
- validator.warn(`A11y: <${node.name}> should not have role attribute`, attribute.start);
+ validator.warn(`A11y: <${node.name}> should not have role attribute`, { start: attribute.start, end: attribute.end });
}
const value = getStaticAttributeValue(node, 'role');
@@ -59,30 +59,30 @@ export default function a11y(
let message = `A11y: Unknown role '${value}'`;
if (match) message += ` (did you mean '${match}'?)`;
- validator.warn(message, attribute.start);
+ validator.warn(message, { start: attribute.start, end: attribute.end });
}
}
// no-access-key
if (name === 'accesskey') {
- validator.warn(`A11y: Avoid using accesskey`, attribute.start);
+ validator.warn(`A11y: Avoid using accesskey`, { start: attribute.start, end: attribute.end });
}
// no-autofocus
if (name === 'autofocus') {
- validator.warn(`A11y: Avoid using autofocus`, attribute.start);
+ validator.warn(`A11y: Avoid using autofocus`, { start: attribute.start, end: attribute.end });
}
// scope
if (name === 'scope' && node.name !== 'th') {
- validator.warn(`A11y: The scope attribute should only be used with
elements`, attribute.start);
+ validator.warn(`A11y: The scope attribute should only be used with | elements`, { start: attribute.start, end: attribute.end });
}
// tabindex-no-positive
if (name === 'tabindex') {
const value = getStaticAttributeValue(node, 'tabindex');
if (!isNaN(value) && +value > 0) {
- validator.warn(`A11y: avoid tabindex values above zero`, attribute.start);
+ validator.warn(`A11y: avoid tabindex values above zero`, { start: attribute.start, end: attribute.end });
}
}
@@ -96,13 +96,13 @@ export default function a11y(
attributes.slice(0, -1).join(', ') + ` or ${attributes[attributes.length - 1]}` :
attributes[0];
- validator.warn(`A11y: <${name}> element should have ${article} ${sequence} attribute`, node.start);
+ validator.warn(`A11y: <${name}> element should have ${article} ${sequence} attribute`, { start: node.start, end: node.end });
}
}
function shouldHaveContent() {
if (node.children.length === 0) {
- validator.warn(`A11y: <${node.name}> element should have child content`, node.start);
+ validator.warn(`A11y: <${node.name}> element should have child content`, { start: node.start, end: node.end });
}
}
@@ -110,7 +110,7 @@ export default function a11y(
const href = attributeMap.get(attribute);
const value = getStaticAttributeValue(node, attribute);
if (value === '' || value === '#') {
- validator.warn(`A11y: '${value}' is not a valid ${attribute} attribute`, href.start);
+ validator.warn(`A11y: '${value}' is not a valid ${attribute} attribute`, { start: href.start, end: href.end });
}
}
@@ -122,7 +122,7 @@ export default function a11y(
// anchor-in-svg-is-valid
shouldHaveValidHref('xlink:href')
} else {
- validator.warn(`A11y: element should have an href attribute`, node.start);
+ validator.warn(`A11y: element should have an href attribute`, { start: node.start, end: node.end });
}
// anchor-has-content
@@ -141,7 +141,8 @@ export default function a11y(
shouldHaveContent();
if (attributeMap.has('aria-hidden')) {
- validator.warn(`A11y: <${node.name}> element should not be hidden`, attributeMap.get('aria-hidden').start);
+ const attr = attributeMap.get('aria-hidden');
+ validator.warn(`A11y: <${node.name}> element should not be hidden`, { start: attr.start, end: attr.end });
}
}
@@ -157,14 +158,14 @@ export default function a11y(
// no-distracting-elements
if (node.name === 'marquee' || node.name === 'blink') {
- validator.warn(`A11y: Avoid <${node.name}> elements`, node.start);
+ validator.warn(`A11y: Avoid <${node.name}> elements`, { start: node.start, end: node.end });
}
if (node.name === 'figcaption') {
const parent = elementStack[elementStack.length - 1];
if (parent) {
if (parent.name !== 'figure') {
- validator.warn(`A11y: must be an immediate child of `, node.start);
+ validator.warn(`A11y: must be an immediate child of `, { start: node.start, end: node.end });
} else {
const children = parent.children.filter(node => {
if (node.type === 'Comment') return false;
@@ -175,7 +176,7 @@ export default function a11y(
const index = children.indexOf(node);
if (index !== 0 && index !== children.length - 1) {
- validator.warn(`A11y: must be first or last child of `, node.start);
+ validator.warn(`A11y: must be first or last child of `, { start: node.start, end: node.end });
}
}
}
diff --git a/src/validate/html/index.ts b/src/validate/html/index.ts
index 680b8b729b..36f09853d9 100644
--- a/src/validate/html/index.ts
+++ b/src/validate/html/index.ts
@@ -52,7 +52,7 @@ export default function validateHtml(validator: Validator, html: Node) {
else if (node.type === 'EachBlock') {
if (validator.helpers.has(node.context)) {
- let c = node.expression.end;
+ let c: number = node.expression.end;
// find start of context
while (/\s/.test(validator.source[c])) c += 1;
@@ -61,13 +61,13 @@ export default function validateHtml(validator: Validator, html: Node) {
validator.warn(
`Context clashes with a helper. Rename one or the other to eliminate any ambiguity`,
- c
+ { start: c, end: c + node.context.length }
);
}
}
if (validator.options.dev && isEmptyBlock(node)) {
- validator.warn('Empty block', node.start);
+ validator.warn('Empty block', { start: node.start, end: node.end });
}
if (node.children) {
diff --git a/src/validate/html/validateElement.ts b/src/validate/html/validateElement.ts
index 550f8d2ae7..2ca24cff69 100644
--- a/src/validate/html/validateElement.ts
+++ b/src/validate/html/validateElement.ts
@@ -20,13 +20,13 @@ export default function validateElement(
if (!isComponent && /^[A-Z]/.test(node.name[0])) {
// TODO upgrade to validator.error in v2
- validator.warn(`${node.name} component is not defined`, node.start);
+ validator.warn(`${node.name} component is not defined`, { start: node.start, end: node.end });
}
if (elementStack.length === 0 && validator.namespace !== namespaces.svg && svg.test(node.name)) {
validator.warn(
`<${node.name}> is an SVG element – did you forget to add { namespace: 'svg' } ?`,
- node.start
+ { start: node.start, end: node.end }
);
}
diff --git a/src/validate/html/validateEventHandler.ts b/src/validate/html/validateEventHandler.ts
index 8e8a6122b3..aa000d2b9c 100644
--- a/src/validate/html/validateEventHandler.ts
+++ b/src/validate/html/validateEventHandler.ts
@@ -30,7 +30,10 @@ export default function validateEventHandlerCallee(
if (name === 'store' && attribute.expression.callee.type === 'MemberExpression') {
if (!validator.options.store) {
- validator.warn('compile with `store: true` in order to call store methods', attribute.expression.start);
+ validator.warn(
+ 'compile with `store: true` in order to call store methods',
+ { start: attribute.expression.start, end: attribute.expression.end }
+ );
}
return;
}
@@ -56,5 +59,5 @@ export default function validateEventHandlerCallee(
message += `. '${callee.name}' exists on 'helpers', did you put it in the wrong place?`;
}
- validator.warn(message, start);
+ validator.warn(message, { start: attribute.expression.start, end: attribute.expression.end });
}
diff --git a/src/validate/index.ts b/src/validate/index.ts
index f79cb1a55c..15f1795457 100644
--- a/src/validate/index.ts
+++ b/src/validate/index.ts
@@ -70,19 +70,21 @@ export class Validator {
throw new ValidationError(message, this.source, pos, this.filename);
}
- warn(message: string, pos: number) {
+ warn(message: string, pos: { start: number, end: number }) {
if (!this.locator) this.locator = getLocator(this.source);
- const { line, column } = this.locator(pos);
+ const start = this.locator(pos.start);
+ const end = this.locator(pos.end);
- const frame = getCodeFrame(this.source, line, column);
+ const frame = getCodeFrame(this.source, start.line, start.column);
this.onwarn({
message,
frame,
- loc: { line: line + 1, column },
- pos,
+ loc: { line: start.line + 1, column: start.column },
+ end: { line: end.line + 1, column: end.column },
+ pos: pos.start,
filename: this.filename,
- toString: () => `${message} (${line + 1}:${column})\n${frame}`,
+ toString: () => `${message} (${start.line + 1}:${start.column})\n${frame}`,
});
}
}
@@ -148,7 +150,7 @@ export default function validate(
if (!validator.used[category].has(name)) {
validator.warn(
`The '${name}' ${categories[category]} is unused`,
- prop.start
+ { start: prop.start, end: prop.end }
);
}
});
diff --git a/src/validate/js/propValidators/components.ts b/src/validate/js/propValidators/components.ts
index 943d4b005f..8c775a504f 100644
--- a/src/validate/js/propValidators/components.ts
+++ b/src/validate/js/propValidators/components.ts
@@ -26,7 +26,7 @@ export default function components(validator: Validator, prop: Node) {
}
if (!/^[A-Z]/.test(name)) {
- validator.warn(`Component names should be capitalised`, component.start);
+ validator.warn(`Component names should be capitalised`, { start: component.start, end: component.end });
}
});
}
diff --git a/src/validate/js/propValidators/helpers.ts b/src/validate/js/propValidators/helpers.ts
index 7c0cc4dcc1..2af7850a5e 100644
--- a/src/validate/js/propValidators/helpers.ts
+++ b/src/validate/js/propValidators/helpers.ts
@@ -43,7 +43,7 @@ export default function helpers(validator: Validator, prop: Node) {
if (prop.value.params.length === 0 && !usesArguments) {
validator.warn(
`Helpers should be pure functions, with at least one argument`,
- prop.start
+ { start: prop.start, end: prop.end }
);
}
});
diff --git a/src/validate/js/propValidators/onrender.ts b/src/validate/js/propValidators/onrender.ts
index fd6751a373..84446f4102 100644
--- a/src/validate/js/propValidators/onrender.ts
+++ b/src/validate/js/propValidators/onrender.ts
@@ -5,7 +5,7 @@ import { Node } from '../../../interfaces';
export default function onrender(validator: Validator, prop: Node) {
validator.warn(
`'onrender' has been deprecated in favour of 'oncreate', and will cause an error in Svelte 2.x`,
- prop.start
+ { start: prop.start, end: prop.end }
);
oncreate(validator, prop);
}
diff --git a/src/validate/js/propValidators/onteardown.ts b/src/validate/js/propValidators/onteardown.ts
index cca770909c..bddc2ff023 100644
--- a/src/validate/js/propValidators/onteardown.ts
+++ b/src/validate/js/propValidators/onteardown.ts
@@ -5,7 +5,7 @@ import { Node } from '../../../interfaces';
export default function onteardown(validator: Validator, prop: Node) {
validator.warn(
`'onteardown' has been deprecated in favour of 'ondestroy', and will cause an error in Svelte 2.x`,
- prop.start
+ { start: prop.start, end: prop.end }
);
ondestroy(validator, prop);
}
diff --git a/test/validator/index.js b/test/validator/index.js
index 6fa792dbde..25f3989cd5 100644
--- a/test/validator/index.js
+++ b/test/validator/index.js
@@ -31,7 +31,8 @@ describe("validate", () => {
warnings.push({
message: warning.message,
pos: warning.pos,
- loc: warning.loc
+ loc: warning.loc,
+ end: warning.end,
});
},
dev: config.dev
diff --git a/test/validator/samples/a11y-alt-text/warnings.json b/test/validator/samples/a11y-alt-text/warnings.json
index 7bddf9730b..dd5d319884 100644
--- a/test/validator/samples/a11y-alt-text/warnings.json
+++ b/test/validator/samples/a11y-alt-text/warnings.json
@@ -5,6 +5,10 @@
"line": 1,
"column": 0
},
+ "end": {
+ "line": 1,
+ "column": 19
+ },
"pos": 0
},
@@ -14,6 +18,10 @@
"line": 4,
"column": 1
},
+ "end": {
+ "line": 4,
+ "column": 7
+ },
"pos": 28
},
@@ -23,6 +31,10 @@
"line": 7,
"column": 0
},
+ "end": {
+ "line": 7,
+ "column": 17
+ },
"pos": 43
},
@@ -32,6 +44,10 @@
"line": 9,
"column": 0
},
+ "end": {
+ "line": 9,
+ "column": 20
+ },
"pos": 62
}
]
diff --git a/test/validator/samples/a11y-anchor-has-content/warnings.json b/test/validator/samples/a11y-anchor-has-content/warnings.json
index 157bec1f9b..ed8f6ad454 100644
--- a/test/validator/samples/a11y-anchor-has-content/warnings.json
+++ b/test/validator/samples/a11y-anchor-has-content/warnings.json
@@ -4,5 +4,9 @@
"line": 1,
"column": 0
},
+ "end": {
+ "line": 1,
+ "column": 19
+ },
"pos": 0
}]
\ No newline at end of file
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 1e65bc4986..fac62f3e13 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
@@ -5,6 +5,10 @@
"line": 1,
"column": 11
},
+ "end": {
+ "line": 1,
+ "column": 37
+ },
"pos": 11
},
{
@@ -13,6 +17,10 @@
"line": 2,
"column": 14
},
+ "end": {
+ "line": 2,
+ "column": 27
+ },
"pos": 65
},
{
@@ -21,6 +29,10 @@
"line": 3,
"column": 14
},
+ "end": {
+ "line": 3,
+ "column": 28
+ },
"pos": 130
}
]
diff --git a/test/validator/samples/a11y-anchor-is-valid/warnings.json b/test/validator/samples/a11y-anchor-is-valid/warnings.json
index c63418f1bf..86135b84c9 100644
--- a/test/validator/samples/a11y-anchor-is-valid/warnings.json
+++ b/test/validator/samples/a11y-anchor-is-valid/warnings.json
@@ -5,6 +5,10 @@
"line": 1,
"column": 0
},
+ "end": {
+ "line": 1,
+ "column": 26
+ },
"pos": 0
},
{
@@ -13,6 +17,10 @@
"line": 2,
"column": 3
},
+ "end": {
+ "line": 2,
+ "column": 10
+ },
"pos": 30
},
{
@@ -21,6 +29,10 @@
"line": 3,
"column": 3
},
+ "end": {
+ "line": 3,
+ "column": 11
+ },
"pos": 53
}
]
diff --git a/test/validator/samples/a11y-aria-props/warnings.json b/test/validator/samples/a11y-aria-props/warnings.json
index 5c0ce2c49e..7f2880dc34 100644
--- a/test/validator/samples/a11y-aria-props/warnings.json
+++ b/test/validator/samples/a11y-aria-props/warnings.json
@@ -5,6 +5,10 @@
"line": 1,
"column": 20
},
+ "end": {
+ "line": 1,
+ "column": 40
+ },
"pos": 20
},
@@ -14,6 +18,10 @@
"column": 0,
"line": 1
},
+ "end": {
+ "line": 1,
+ "column": 41
+ },
"pos": 0
}
]
diff --git a/test/validator/samples/a11y-aria-role/warnings.json b/test/validator/samples/a11y-aria-role/warnings.json
index 152a27daa8..903381b295 100644
--- a/test/validator/samples/a11y-aria-role/warnings.json
+++ b/test/validator/samples/a11y-aria-role/warnings.json
@@ -5,6 +5,10 @@
"line": 1,
"column": 5
},
+ "end": {
+ "line": 1,
+ "column": 20
+ },
"pos": 5
}
]
diff --git a/test/validator/samples/a11y-aria-unsupported-element/warnings.json b/test/validator/samples/a11y-aria-unsupported-element/warnings.json
index 5e2c358271..369b81278c 100644
--- a/test/validator/samples/a11y-aria-unsupported-element/warnings.json
+++ b/test/validator/samples/a11y-aria-unsupported-element/warnings.json
@@ -5,6 +5,10 @@
"line": 1,
"column": 6
},
+ "end": {
+ "line": 1,
+ "column": 25
+ },
"pos": 6
},
@@ -14,6 +18,10 @@
"line": 2,
"column": 6
},
+ "end": {
+ "line": 2,
+ "column": 20
+ },
"pos": 33
}
]
diff --git a/test/validator/samples/a11y-figcaption-wrong-place/warnings.json b/test/validator/samples/a11y-figcaption-wrong-place/warnings.json
index 0e5e1a1976..ed1edb3f8c 100644
--- a/test/validator/samples/a11y-figcaption-wrong-place/warnings.json
+++ b/test/validator/samples/a11y-figcaption-wrong-place/warnings.json
@@ -5,6 +5,10 @@
"line": 4,
"column": 1
},
+ "end": {
+ "line": 6,
+ "column": 14
+ },
"pos": 57
},
{
@@ -13,6 +17,10 @@
"line": 15,
"column": 2
},
+ "end": {
+ "line": 17,
+ "column": 15
+ },
"pos": 252
}
]
diff --git a/test/validator/samples/a11y-heading-has-content/warnings.json b/test/validator/samples/a11y-heading-has-content/warnings.json
index 15bb3a162a..c269dd9e4b 100644
--- a/test/validator/samples/a11y-heading-has-content/warnings.json
+++ b/test/validator/samples/a11y-heading-has-content/warnings.json
@@ -5,6 +5,10 @@
"line": 1,
"column": 0
},
+ "end": {
+ "line": 1,
+ "column": 9
+ },
"pos": 0
},
@@ -14,6 +18,10 @@
"line": 2,
"column": 4
},
+ "end": {
+ "line": 2,
+ "column": 15
+ },
"pos": 14
}
]
diff --git a/test/validator/samples/a11y-html-has-lang/warnings.json b/test/validator/samples/a11y-html-has-lang/warnings.json
index f64964bf6a..26afa41fa9 100644
--- a/test/validator/samples/a11y-html-has-lang/warnings.json
+++ b/test/validator/samples/a11y-html-has-lang/warnings.json
@@ -4,6 +4,10 @@
"column": 0,
"line": 5
},
+ "end": {
+ "line": 5,
+ "column": 13
+ },
"message": "A11y: element should have a lang attribute",
"pos": 84
}
diff --git a/test/validator/samples/a11y-iframe-has-title/warnings.json b/test/validator/samples/a11y-iframe-has-title/warnings.json
index 8f69f14415..3d38672b76 100644
--- a/test/validator/samples/a11y-iframe-has-title/warnings.json
+++ b/test/validator/samples/a11y-iframe-has-title/warnings.json
@@ -5,6 +5,10 @@
"line": 1,
"column": 0
},
+ "end": {
+ "line": 1,
+ "column": 31
+ },
"pos": 0
}
]
diff --git a/test/validator/samples/a11y-no-access-key/warnings.json b/test/validator/samples/a11y-no-access-key/warnings.json
index 40a8381aed..4d9e1a3eec 100644
--- a/test/validator/samples/a11y-no-access-key/warnings.json
+++ b/test/validator/samples/a11y-no-access-key/warnings.json
@@ -4,5 +4,9 @@
"line": 1,
"column": 5
},
+ "end": {
+ "line": 1,
+ "column": 18
+ },
"pos": 5
}]
\ No newline at end of file
diff --git a/test/validator/samples/a11y-no-autofocus/warnings.json b/test/validator/samples/a11y-no-autofocus/warnings.json
index 26544e9afc..9d820ea234 100644
--- a/test/validator/samples/a11y-no-autofocus/warnings.json
+++ b/test/validator/samples/a11y-no-autofocus/warnings.json
@@ -4,5 +4,9 @@
"line": 1,
"column": 5
},
+ "end": {
+ "line": 1,
+ "column": 14
+ },
"pos": 5
}]
\ No newline at end of file
diff --git a/test/validator/samples/a11y-no-distracting-elements/warnings.json b/test/validator/samples/a11y-no-distracting-elements/warnings.json
index 3b54de094f..fa2bae30fa 100644
--- a/test/validator/samples/a11y-no-distracting-elements/warnings.json
+++ b/test/validator/samples/a11y-no-distracting-elements/warnings.json
@@ -5,6 +5,10 @@
"line": 1,
"column": 0
},
+ "end": {
+ "line": 1,
+ "column": 10
+ },
"pos": 0
},
@@ -14,6 +18,10 @@
"line": 2,
"column": 0
},
+ "end": {
+ "line": 2,
+ "column": 8
+ },
"pos": 11
}
]
diff --git a/test/validator/samples/a11y-not-on-components/warnings.json b/test/validator/samples/a11y-not-on-components/warnings.json
index 319a2aef81..3f48bddc27 100644
--- a/test/validator/samples/a11y-not-on-components/warnings.json
+++ b/test/validator/samples/a11y-not-on-components/warnings.json
@@ -5,6 +5,10 @@
"column": 8,
"line": 2
},
+ "end": {
+ "line": 2,
+ "column": 17
+ },
"pos": 29
}
]
diff --git a/test/validator/samples/a11y-scope/warnings.json b/test/validator/samples/a11y-scope/warnings.json
index 684a75dad6..2b82756ede 100644
--- a/test/validator/samples/a11y-scope/warnings.json
+++ b/test/validator/samples/a11y-scope/warnings.json
@@ -5,6 +5,10 @@
"line": 1,
"column": 5
},
+ "end": {
+ "line": 1,
+ "column": 10
+ },
"pos": 5
}
]
diff --git a/test/validator/samples/a11y-tabindex-no-positive/warnings.json b/test/validator/samples/a11y-tabindex-no-positive/warnings.json
index 6c163a8834..9b72a6a15b 100644
--- a/test/validator/samples/a11y-tabindex-no-positive/warnings.json
+++ b/test/validator/samples/a11y-tabindex-no-positive/warnings.json
@@ -5,6 +5,10 @@
"line": 3,
"column": 5
},
+ "end": {
+ "line": 3,
+ "column": 17
+ },
"pos": 46
}
]
diff --git a/test/validator/samples/empty-block-dev/warnings.json b/test/validator/samples/empty-block-dev/warnings.json
index 54584bf135..158bb7aac7 100644
--- a/test/validator/samples/empty-block-dev/warnings.json
+++ b/test/validator/samples/empty-block-dev/warnings.json
@@ -5,6 +5,10 @@
"line": 1,
"column": 0
},
+ "end": {
+ "line": 3,
+ "column": 9
+ },
"pos": 0
},
{
@@ -13,6 +17,10 @@
"line": 5,
"column": 0
},
+ "end": {
+ "line": 5,
+ "column": 34
+ },
"pos": 38
}
]
\ No newline at end of file
diff --git a/test/validator/samples/helper-clash-context/warnings.json b/test/validator/samples/helper-clash-context/warnings.json
index e71b4edb59..8e3c3d045a 100644
--- a/test/validator/samples/helper-clash-context/warnings.json
+++ b/test/validator/samples/helper-clash-context/warnings.json
@@ -4,5 +4,9 @@
"line": 1,
"column": 18
},
+ "end": {
+ "line": 1,
+ "column": 23
+ },
"pos": 18
}]
\ No newline at end of file
diff --git a/test/validator/samples/helper-purity-check-needs-arguments/warnings.json b/test/validator/samples/helper-purity-check-needs-arguments/warnings.json
index 85abc4df92..16c9f8e947 100644
--- a/test/validator/samples/helper-purity-check-needs-arguments/warnings.json
+++ b/test/validator/samples/helper-purity-check-needs-arguments/warnings.json
@@ -4,5 +4,9 @@
"loc": {
"line": 6,
"column": 3
+ },
+ "end": {
+ "line": 8,
+ "column": 4
}
}]
\ No newline at end of file
diff --git a/test/validator/samples/method-nonexistent-helper/warnings.json b/test/validator/samples/method-nonexistent-helper/warnings.json
index 88a5b7e03c..b5f49032f5 100644
--- a/test/validator/samples/method-nonexistent-helper/warnings.json
+++ b/test/validator/samples/method-nonexistent-helper/warnings.json
@@ -4,5 +4,9 @@
"loc": {
"line": 1,
"column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 23
}
}]
diff --git a/test/validator/samples/method-nonexistent/warnings.json b/test/validator/samples/method-nonexistent/warnings.json
index c5117ae98c..ba10766dcb 100644
--- a/test/validator/samples/method-nonexistent/warnings.json
+++ b/test/validator/samples/method-nonexistent/warnings.json
@@ -4,5 +4,9 @@
"loc": {
"line": 1,
"column": 18
+ },
+ "end": {
+ "line": 1,
+ "column": 23
}
}]
diff --git a/test/validator/samples/missing-component/warnings.json b/test/validator/samples/missing-component/warnings.json
index c3a3be4d02..21e6f8674b 100644
--- a/test/validator/samples/missing-component/warnings.json
+++ b/test/validator/samples/missing-component/warnings.json
@@ -4,5 +4,9 @@
"line": 2,
"column": 1
},
+ "end": {
+ "line": 2,
+ "column": 10
+ },
"pos": 7
}]
\ No newline at end of file
diff --git a/test/validator/samples/properties-components-should-be-capitalised/warnings.json b/test/validator/samples/properties-components-should-be-capitalised/warnings.json
index 8be7714b33..46ec8c85c4 100644
--- a/test/validator/samples/properties-components-should-be-capitalised/warnings.json
+++ b/test/validator/samples/properties-components-should-be-capitalised/warnings.json
@@ -4,5 +4,9 @@
"line": 6,
"column": 3
},
+ "end": {
+ "line": 6,
+ "column": 6
+ },
"pos": 59
}]
diff --git a/test/validator/samples/store-unexpected/warnings.json b/test/validator/samples/store-unexpected/warnings.json
index bac2841dc9..6c4d57beb1 100644
--- a/test/validator/samples/store-unexpected/warnings.json
+++ b/test/validator/samples/store-unexpected/warnings.json
@@ -4,5 +4,9 @@
"line": 1,
"column": 18
},
+ "end": {
+ "line": 1,
+ "column": 29
+ },
"pos": 18
}]
\ No newline at end of file
diff --git a/test/validator/samples/svg-child-component-undeclared-namespace/warnings.json b/test/validator/samples/svg-child-component-undeclared-namespace/warnings.json
index d17aa5c53d..316fbd767f 100644
--- a/test/validator/samples/svg-child-component-undeclared-namespace/warnings.json
+++ b/test/validator/samples/svg-child-component-undeclared-namespace/warnings.json
@@ -4,6 +4,10 @@
"line": 1,
"column": 0
},
+ "end": {
+ "line": 1,
+ "column": 65
+ },
"pos": 0
},
{
@@ -12,6 +16,10 @@
"column": 1,
"line": 5
},
+ "end": {
+ "line": 5,
+ "column": 66
+ },
"pos": 90
},
{
@@ -20,6 +28,10 @@
"column": 2,
"line": 10
},
+ "end": {
+ "line": 10,
+ "column": 67
+ },
"pos": 191
},
{
@@ -28,6 +40,10 @@
"column": 2,
"line": 20
},
+ "end": {
+ "line": 20,
+ "column": 67
+ },
"pos": 333
},
{
@@ -36,5 +52,9 @@
"column": 2,
"line": 26
},
+ "end": {
+ "line": 26,
+ "column": 67
+ },
"pos": 445
}]
diff --git a/test/validator/samples/unused-components/warnings.json b/test/validator/samples/unused-components/warnings.json
index 48e3d80bc9..a71c8ca4e1 100644
--- a/test/validator/samples/unused-components/warnings.json
+++ b/test/validator/samples/unused-components/warnings.json
@@ -5,6 +5,10 @@
"line": 7,
"column": 3
},
+ "end": {
+ "line": 7,
+ "column": 6
+ },
"pos": 109
},
{
@@ -13,6 +17,10 @@
"line": 8,
"column": 3
},
+ "end": {
+ "line": 8,
+ "column": 6
+ },
"pos": 117
}
]
diff --git a/test/validator/samples/unused-event/warnings.json b/test/validator/samples/unused-event/warnings.json
index 88a47fbf86..e0e8c65b9d 100644
--- a/test/validator/samples/unused-event/warnings.json
+++ b/test/validator/samples/unused-event/warnings.json
@@ -4,5 +4,9 @@
"line": 4,
"column": 3
},
+ "end": {
+ "line": 6,
+ "column": 4
+ },
"pos": 42
}]
diff --git a/test/validator/samples/unused-transition/warnings.json b/test/validator/samples/unused-transition/warnings.json
index da1952b060..f35ee39fc1 100644
--- a/test/validator/samples/unused-transition/warnings.json
+++ b/test/validator/samples/unused-transition/warnings.json
@@ -4,5 +4,9 @@
"line": 4,
"column": 3
},
+ "end": {
+ "line": 6,
+ "column": 4
+ },
"pos": 47
}]
diff --git a/test/validator/samples/window-event-invalid/warnings.json b/test/validator/samples/window-event-invalid/warnings.json
index 5dca33bf5c..a5287ecfa2 100644
--- a/test/validator/samples/window-event-invalid/warnings.json
+++ b/test/validator/samples/window-event-invalid/warnings.json
@@ -4,5 +4,9 @@
"line": 1,
"column": 20
},
+ "end": {
+ "line": 1,
+ "column": 28
+ },
"pos": 20
}]
|