diff --git a/src/validate/js/propValidators/components.ts b/src/validate/js/propValidators/components.ts index 7d46470d0b..943d4b005f 100644 --- a/src/validate/js/propValidators/components.ts +++ b/src/validate/js/propValidators/components.ts @@ -10,7 +10,6 @@ export default function components(validator: Validator, prop: Node) { `The 'components' property must be an object literal`, prop.start ); - return; } checkForDupes(validator, prop.value.properties); diff --git a/src/validate/js/propValidators/computed.ts b/src/validate/js/propValidators/computed.ts index 7456963e90..a54d7856b0 100644 --- a/src/validate/js/propValidators/computed.ts +++ b/src/validate/js/propValidators/computed.ts @@ -14,7 +14,6 @@ export default function computed(validator: Validator, prop: Node) { `The 'computed' property must be an object literal`, prop.start ); - return; } checkForDupes(validator, prop.value.properties); @@ -26,7 +25,6 @@ export default function computed(validator: Validator, prop: Node) { `Computed properties can be function expressions or arrow function expressions`, computation.value.start ); - return; } const params = computation.value.params; @@ -36,7 +34,6 @@ export default function computed(validator: Validator, prop: Node) { `A computed value must depend on at least one property`, computation.value.start ); - return; } params.forEach((param: Node) => { diff --git a/src/validate/js/propValidators/helpers.ts b/src/validate/js/propValidators/helpers.ts index d5d51c99ea..4345257e55 100644 --- a/src/validate/js/propValidators/helpers.ts +++ b/src/validate/js/propValidators/helpers.ts @@ -10,7 +10,6 @@ export default function helpers(validator: Validator, prop: Node) { `The 'helpers' property must be an object literal`, prop.start ); - return; } checkForDupes(validator, prop.value.properties); diff --git a/src/validate/js/propValidators/methods.ts b/src/validate/js/propValidators/methods.ts index 66fd27eea1..c5b9bc220f 100644 --- a/src/validate/js/propValidators/methods.ts +++ b/src/validate/js/propValidators/methods.ts @@ -14,7 +14,6 @@ export default function methods(validator: Validator, prop: Node) { `The 'methods' property must be an object literal`, prop.start ); - return; } checkForAccessors(validator, prop.value.properties, 'Methods'); diff --git a/src/validate/js/propValidators/transitions.ts b/src/validate/js/propValidators/transitions.ts index 6470beee6f..1bd8e677bc 100644 --- a/src/validate/js/propValidators/transitions.ts +++ b/src/validate/js/propValidators/transitions.ts @@ -9,7 +9,6 @@ export default function transitions(validator: Validator, prop: Node) { `The 'transitions' property must be an object literal`, prop.start ); - return; } checkForDupes(validator, prop.value.properties); diff --git a/test/validator/samples/non-object-literal-components/errors.json b/test/validator/samples/non-object-literal-components/errors.json new file mode 100644 index 0000000000..3133a80e5d --- /dev/null +++ b/test/validator/samples/non-object-literal-components/errors.json @@ -0,0 +1,8 @@ +[{ + "message": "The 'components' property must be an object literal", + "loc": { + "line": 3, + "column": 2 + }, + "pos": 29 +}] \ No newline at end of file diff --git a/test/validator/samples/non-object-literal-components/input.html b/test/validator/samples/non-object-literal-components/input.html new file mode 100644 index 0000000000..1b863e97a9 --- /dev/null +++ b/test/validator/samples/non-object-literal-components/input.html @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/test/validator/samples/events-non-object-literal/errors.json b/test/validator/samples/non-object-literal-events/errors.json similarity index 100% rename from test/validator/samples/events-non-object-literal/errors.json rename to test/validator/samples/non-object-literal-events/errors.json diff --git a/test/validator/samples/events-non-object-literal/input.html b/test/validator/samples/non-object-literal-events/input.html similarity index 100% rename from test/validator/samples/events-non-object-literal/input.html rename to test/validator/samples/non-object-literal-events/input.html diff --git a/test/validator/samples/non-object-literal-helpers/errors.json b/test/validator/samples/non-object-literal-helpers/errors.json new file mode 100644 index 0000000000..602f89ff96 --- /dev/null +++ b/test/validator/samples/non-object-literal-helpers/errors.json @@ -0,0 +1,8 @@ +[{ + "message": "The 'helpers' property must be an object literal", + "loc": { + "line": 3, + "column": 2 + }, + "pos": 29 +}] \ No newline at end of file diff --git a/test/validator/samples/non-object-literal-helpers/input.html b/test/validator/samples/non-object-literal-helpers/input.html new file mode 100644 index 0000000000..196ffa2018 --- /dev/null +++ b/test/validator/samples/non-object-literal-helpers/input.html @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/test/validator/samples/non-object-literal-methods/errors.json b/test/validator/samples/non-object-literal-methods/errors.json new file mode 100644 index 0000000000..7a7f107f1e --- /dev/null +++ b/test/validator/samples/non-object-literal-methods/errors.json @@ -0,0 +1,8 @@ +[{ + "message": "The 'methods' property must be an object literal", + "loc": { + "line": 3, + "column": 2 + }, + "pos": 29 +}] \ No newline at end of file diff --git a/test/validator/samples/non-object-literal-methods/input.html b/test/validator/samples/non-object-literal-methods/input.html new file mode 100644 index 0000000000..662dce59ba --- /dev/null +++ b/test/validator/samples/non-object-literal-methods/input.html @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/test/validator/samples/non-object-literal-transitions/errors.json b/test/validator/samples/non-object-literal-transitions/errors.json new file mode 100644 index 0000000000..640706b4ed --- /dev/null +++ b/test/validator/samples/non-object-literal-transitions/errors.json @@ -0,0 +1,8 @@ +[{ + "message": "The 'transitions' property must be an object literal", + "loc": { + "line": 3, + "column": 2 + }, + "pos": 29 +}] \ No newline at end of file diff --git a/test/validator/samples/non-object-literal-transitions/input.html b/test/validator/samples/non-object-literal-transitions/input.html new file mode 100644 index 0000000000..3acd31fc0f --- /dev/null +++ b/test/validator/samples/non-object-literal-transitions/input.html @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/test/validator/samples/tag-invalid/errors.json b/test/validator/samples/tag-invalid/errors.json new file mode 100644 index 0000000000..7ce908daee --- /dev/null +++ b/test/validator/samples/tag-invalid/errors.json @@ -0,0 +1,8 @@ +[{ + "message": "tag name must be two or more words joined by the '-' character", + "loc": { + "line": 3, + "column": 7 + }, + "pos": 34 +}] \ No newline at end of file diff --git a/test/validator/samples/tag-invalid/input.html b/test/validator/samples/tag-invalid/input.html new file mode 100644 index 0000000000..3b6cc30fbe --- /dev/null +++ b/test/validator/samples/tag-invalid/input.html @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/test/validator/samples/tag-non-string/errors.json b/test/validator/samples/tag-non-string/errors.json new file mode 100644 index 0000000000..d617b031ff --- /dev/null +++ b/test/validator/samples/tag-non-string/errors.json @@ -0,0 +1,8 @@ +[{ + "message": "'tag' must be a string literal", + "loc": { + "line": 3, + "column": 7 + }, + "pos": 34 +}] \ No newline at end of file diff --git a/test/validator/samples/tag-non-string/input.html b/test/validator/samples/tag-non-string/input.html new file mode 100644 index 0000000000..bbb14e387c --- /dev/null +++ b/test/validator/samples/tag-non-string/input.html @@ -0,0 +1,5 @@ + \ No newline at end of file