fix some tests

pull/11294/head
Rich Harris 2 years ago
parent 689ba3085c
commit 21eaa08017

@ -44,7 +44,7 @@ Invalid selector
## invalid_css_identifier
TODO
Expected a valid CSS identifier
## invalid_nesting_selector
@ -52,4 +52,4 @@ Nesting selectors can only be used inside a rule
## invalid_css_declaration
TODO
TODO

@ -1,6 +1,6 @@
## unclosed_element
%name% was left open
`<%name%>` was left open
## unclosed_block

@ -56,11 +56,11 @@ Cannot export derived state from a module. To expose the current derived value,
## invalid_assignment
Cannot assign to `%thing%`
Cannot assign to %thing%
## invalid_binding
Cannot bind to `%thing%`
Cannot bind to %thing%
## invalid_rune_args

@ -418,7 +418,7 @@ export function invalid_css_selector(node) {
* @returns {never}
*/
export function invalid_css_identifier(node) {
e(node, "invalid_css_identifier", "TODO");
e(node, "invalid_css_identifier", "Expected a valid CSS identifier");
}
/**
@ -518,7 +518,7 @@ export function cyclical_reactive_declaration(node, cycle) {
* @returns {never}
*/
export function unclosed_element(node, name) {
e(node, "unclosed_element", `${name} was left open`);
e(node, "unclosed_element", `\`<${name}>\` was left open`);
}
/**
@ -981,7 +981,7 @@ export function invalid_host_location(node) {
* @returns {never}
*/
export function invalid_assignment(node, thing) {
e(node, "invalid_assignment", `Cannot assign to \`${thing}\``);
e(node, "invalid_assignment", `Cannot assign to ${thing}`);
}
/**
@ -990,7 +990,7 @@ export function invalid_assignment(node, thing) {
* @returns {never}
*/
export function invalid_binding(node, thing) {
e(node, "invalid_binding", `Cannot bind to \`${thing}\``);
e(node, "invalid_binding", `Cannot bind to ${thing}`);
}
/**

@ -92,7 +92,7 @@ export class Parser {
if (current.type === 'RegularElement') {
current.end = current.start + 1;
e.unclosed_element(current, `<${current.name}>`);
e.unclosed_element(current, current.name);
} else {
current.end = current.start + 1;
e.unclosed_block(current);

@ -677,7 +677,7 @@ function read_attribute_value(parser) {
'in attribute value'
);
} catch (/** @type {any} */ error) {
if (error.code === 'js-parse-error') {
if (error.code === 'js_parse_error') {
// if the attribute value didn't close + self-closing tag
// eg: `<Component test={{a:1} />`
// acorn may throw a `Unterminated regular expression` because of `/>`
@ -687,7 +687,7 @@ function read_attribute_value(parser) {
e.unclosed_attribute_value(pos, quote_mark || '}');
}
}
throw e;
throw error;
}
if (value.length === 0 && !quote_mark) {

@ -1023,10 +1023,13 @@ function validate_no_const_assignment(node, argument, scope, is_binding) {
// (binding.kind !== 'normal' || !binding.initial)
// );
// TODO have a more specific error message for assignments to things like `{:then foo}`
const thing = 'constant';
if (is_binding) {
e.invalid_binding(node, 'TODO');
e.invalid_binding(node, thing);
} else {
e.invalid_assignment(node, 'TODO');
e.invalid_assignment(node, thing);
}
}
}

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'missing-attribute-value',
code: 'missing_attribute_value',
message: 'Expected attribute value',
position: [12, 12]
}

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-sequence-expression',
code: 'invalid_sequence_expression',
message:
'Sequence expressions are not allowed as attribute/directive values in runes mode, unless wrapped in parentheses',
position: [124, 131]

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-sequence-expression',
code: 'invalid_sequence_expression',
message:
'Sequence expressions are not allowed as attribute/directive values in runes mode, unless wrapped in parentheses',
position: [163, 170]

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'duplicate-attribute',
code: 'duplicate_attribute',
message: 'Attributes need to be unique',
position: [17, 17]
}

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'duplicate-attribute',
code: 'duplicate_attribute',
message: 'Attributes need to be unique',
position: [17, 17]
}

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'duplicate-attribute',
code: 'duplicate_attribute',
message: 'Attributes need to be unique',
position: [17, 17]
}

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'expected-token',
code: 'expected_token',
message: 'Expected token {:else}',
position: [35, 35]
}

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-continuing-block-placement',
code: 'invalid_continuing_block_placement',
message:
'{:...} block is invalid at this position (did you forget to close the preceeding element or block?)',
position: [1, 1]

@ -2,8 +2,9 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-state-location',
message: '$state(...) can only be used as a variable declaration initializer or a class field',
code: 'invalid_state_location',
message:
'`$state(...)` can only be used as a variable declaration initializer or a class field',
position: [33, 41]
}
});

@ -2,8 +2,8 @@ import { test } from '../../test';
export default test({
error: {
code: 'unexpected-eof',
message: 'Unexpected end of input (expected -->)',
code: 'expected_token',
message: 'Expected token -->',
position: [24, 24]
}
});

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'duplicate-slot-name',
code: 'duplicate_slot_name',
message: "Duplicate slot name 'foo' in <Nested>"
}
});

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'duplicate-slot-name',
code: 'duplicate_slot_name',
message: "Duplicate slot name 'foo' in <Nested>"
}
});

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-default-slot-content',
code: 'invalid_default_slot_content',
message: 'Found default slot content alongside an explicit slot="default"'
}
});

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'duplicate-slot-name',
code: 'duplicate_slot_name',
message: "Duplicate slot name 'foo' in <Nested>"
}
});

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'duplicate-slot-name',
code: 'duplicate_slot_name',
message: "Duplicate slot name 'foo' in <Nested>"
}
});

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'duplicate-slot-name',
code: 'duplicate_slot_name',
message: "Duplicate slot name 'foo' in <Nested>"
}
});

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-slot-placement',
code: 'invalid_slot_placement',
message:
"Element with a slot='...' attribute must be a child of a component or a descendant of a custom element"
}

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-slot-placement',
code: 'invalid_slot_placement',
message:
"Element with a slot='...' attribute must be a child of a component or a descendant of a custom element"
}

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-slot-placement',
code: 'invalid_slot_placement',
message:
"Element with a slot='...' attribute must be a child of a component or a descendant of a custom element"
}

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-css-global-block-combinator',
code: 'invalid_css_global_block_combinator',
message: 'A :global {...} block cannot follow a > combinator',
position: [12, 21]
}

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-css-global-block-declaration',
code: 'invalid_css_global_block_declaration',
message: 'A :global {...} block can only contain rules, not declarations',
position: [24, 34]
}

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-css-global-block-modifier',
code: 'invalid_css_global_block_modifier',
message: 'A :global {...} block cannot modify an existing selector',
position: [14, 21]
}

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-css-global-block-list',
code: 'invalid_css_global_block_list',
message: 'A :global {...} block cannot be part of a selector list with more than one item',
position: [9, 31]
}

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-css-identifier',
code: 'invalid_css_identifier',
message: 'Expected a valid CSS identifier',
position: [25, 25]
}

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-dollar-binding',
code: 'invalid_dollar_binding',
message: 'The $ name is reserved, and cannot be used for variables and imports'
}
});

@ -2,8 +2,8 @@ import { test } from '../../test';
export default test({
error: {
code: 'illegal-global',
code: 'illegal_global',
message:
'$ is an illegal variable name. To reference a global variable called $, use globalThis.$'
'`$` is an illegal variable name. To reference a global variable called `$`, use `globalThis.$`'
}
});

@ -2,8 +2,8 @@ import { test } from '../../test';
export default test({
error: {
code: 'illegal-global',
code: 'illegal_global',
message:
'$ is an illegal variable name. To reference a global variable called $, use globalThis.$'
'`$` is an illegal variable name. To reference a global variable called `$`, use `globalThis.$`'
}
});

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-dollar-binding',
code: 'invalid_dollar_binding',
message: 'The $ name is reserved, and cannot be used for variables and imports'
}
});

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-binding',
message: "'value' binding can only be used with <input>, <textarea>, <select>"
code: 'bind_invalid_target',
message: '`bind:value` can only be used with <input>, <textarea>, <select>'
}
});

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'expected-token',
code: 'expected_token',
message: 'Expected token {:then ...} or {:catch ...}',
position: [24, 24]
}

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-continuing-block-placement',
code: 'invalid_continuing_block_placement',
message:
'{:...} block is invalid at this position (did you forget to close the preceeding element or block?)',
position: [6, 6]

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-continuing-block-placement',
code: 'invalid_continuing_block_placement',
message:
'{:...} block is invalid at this position (did you forget to close the preceeding element or block?)',
position: [18, 18]

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-continuing-block-placement',
code: 'invalid_continuing_block_placement',
message:
'{:...} block is invalid at this position (did you forget to close the preceeding element or block?)',
position: [17, 17]

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'expected-token',
code: 'expected_token',
message: 'Expected token {:then ...} or {:catch ...}',
position: [26, 26]
}

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'expected-token',
code: 'expected_token',
message: 'Expected token {:then ...} or {:catch ...}',
position: [27, 27]
}

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'empty-attribute-shorthand',
code: 'empty_attribute_shorthand',
message: 'Attribute shorthand cannot be empty',
position: [6, 6]
}

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'empty-directive-name',
code: 'empty_directive_name',
message: 'ClassDirective name cannot be empty',
position: [10, 10]
}

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'empty-directive-name',
code: 'empty_directive_name',
message: 'UseDirective name cannot be empty',
position: [8, 8]
}

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-derived-export',
code: 'invalid_derived_export',
message:
'Cannot export derived state from a module. To expose the current derived value, export a function returning its value',
position: [24, 66]

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-state-export',
code: 'invalid_state_export',
message:
"Cannot export state from a module if it is reassigned. Either export a function returning the state value or only mutate the state value's properties",
position: [76, 114]

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-state-export',
code: 'invalid_state_export',
message:
"Cannot export state from a module if it is reassigned. Either export a function returning the state value or only mutate the state value's properties",
position: [46, 86]

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'js-parse-error',
code: 'js_parse_error',
message: 'Assigning to rvalue',
position: [1, 1]
}

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-snippet-assignment',
code: 'invalid_snippet_assignment',
message: 'Cannot reassign or bind to snippet parameter'
}
});

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-snippet-assignment',
code: 'invalid_snippet_assignment',
message: 'Cannot reassign or bind to snippet parameter'
}
});

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-const-assignment',
message: 'Invalid assignment to const variable'
code: 'invalid_assignment',
message: 'Cannot assign to constant'
}
});

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-const-assignment',
message: 'Invalid assignment to const variable'
code: 'invalid_assignment',
message: 'Cannot assign to constant'
}
});

@ -2,8 +2,8 @@ import { test } from '../../test';
export default test({
error: {
code: 'duplicate-style-element',
message: 'A component can have a single top-level <style> element',
code: 'duplicate_style_element',
message: 'A component can have a single top-level `<style>` element',
position: [58, 58]
}
});

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-element-content',
code: 'invalid_element_content',
message: '<svelte:options> cannot have children',
position: [16, 16]
}

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'missing-whitespace',
code: 'missing_whitespace',
message: 'Expected whitespace',
position: [6, 6]
}

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-render-call',
code: 'invalid_render_call',
message: 'Calling a snippet function using apply, bind or call is not allowed'
}
});

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-runes-mode-import',
code: 'invalid_runes_mode_import',
message: 'beforeUpdate cannot be used in runes mode'
}
});

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'duplicate-props-rune',
message: 'Cannot use $props() more than once'
code: 'duplicate_props_rune',
message: 'Cannot use `$props()` more than once'
}
});

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-legacy-export',
code: 'invalid_legacy_export',
message: 'Cannot use `export let` in runes mode — use $props instead'
}
});

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-state-export',
code: 'invalid_state_export',
message:
"Cannot export state from a module if it is reassigned. Either export a function returning the state value or only mutate the state value's properties",
position: [28, 53]

@ -2,8 +2,8 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-each-assignment',
code: 'invalid_each_assignment',
message:
"Cannot reassign or bind to each block argument in runes mode. Use the array and index variables instead (e.g. 'array[i] = value' instead of 'entry = value')"
'Cannot reassign or bind to each block argument in runes mode. Use the array and index variables instead (e.g. `array[i] = value` instead of `entry = value`)'
}
});

@ -2,8 +2,8 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-each-assignment',
code: 'invalid_each_assignment',
message:
"Cannot reassign or bind to each block argument in runes mode. Use the array and index variables instead (e.g. 'array[i] = value' instead of 'entry = value')"
'Cannot reassign or bind to each block argument in runes mode. Use the array and index variables instead (e.g. `array[i] = value` instead of `entry = value`)'
}
});

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-const-assignment',
message: 'Invalid assignment to const variable'
code: 'invalid_assignment',
message: 'Cannot assign to constant'
}
});

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-const-assignment',
message: 'Invalid assignment to const variable'
code: 'invalid_assignment',
message: 'Cannot assign to constant'
}
});

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-derived-assignment',
message: 'Invalid assignment to derived state'
code: 'invalid_assignment',
message: 'Cannot assign to derived state'
}
});

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-derived-binding',
message: 'Invalid binding to derived state'
code: 'invalid_binding',
message: 'Cannot bind to derived state'
}
});

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-derived-assignment',
message: 'Invalid assignment to derived state'
code: 'invalid_assignment',
message: 'Cannot assign to derived state'
}
});

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-derived-assignment',
message: 'Invalid assignment to derived state'
code: 'invalid_assignment',
message: 'Cannot assign to derived state'
}
});

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-derived-assignment',
message: 'Invalid assignment to derived state'
code: 'invalid_assignment',
message: 'Cannot assign to derived state'
}
});

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-state-location',
message: '$state(...) can only be used as a variable declaration initializer or a class field'
code: 'invalid_state_location',
message: '`$state(...)` can only be used as a variable declaration initializer or a class field'
}
});

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'conflicting-property-name',
code: 'conflicting_property_name',
message: 'Cannot have a property and a component export with the same name'
}
});

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-rune-args-length',
message: '$bindable can only be called with 0 or 1 arguments'
code: 'invalid_rune_args_length',
message: '`$bindable` must be called with zero or one arguments'
}
});

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-bindable-location',
message: '$bindable() can only be used inside a $props() declaration'
code: 'invalid_bindable_location',
message: '`$bindable()` can only be used inside a `$props()` declaration'
}
});

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-rune-args-length',
message: '$derived can only be called with 1 argument'
code: 'invalid_rune_args_length',
message: '`$derived` must be called with exactly one argument'
}
});

@ -2,7 +2,8 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-state-location',
message: '$derived(...) can only be used as a variable declaration initializer or a class field'
code: 'invalid_state_location',
message:
'`$derived(...)` can only be used as a variable declaration initializer or a class field'
}
});

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-rune-args-length',
message: '$effect can only be called with 1 argument'
code: 'invalid_rune_args_length',
message: '`$effect` must be called with exactly one argument'
}
});

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-effect-location',
message: '$effect() can only be used as an expression statement'
code: 'invalid_effect_location',
message: '`$effect()` can only be used as an expression statement'
}
});

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-host-location',
message: '$host() can only be used inside custom element component instances'
code: 'invalid_host_location',
message: '`$host()` can only be used inside custom element component instances'
}
});

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-rune-args-length',
message: '$props can only be called with 0 arguments'
code: 'invalid_rune_args',
message: '`$props` cannot be called with arguments'
}
});

@ -2,8 +2,8 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-props-location',
code: 'invalid_props_location',
message:
'$props() can only be used at the top level of components as a variable declaration initializer'
'`$props()` can only be used at the top level of components as a variable declaration initializer'
}
});

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-rune-args-length',
message: '$state can only be called with 0 or 1 arguments'
code: 'invalid_rune_args_length',
message: '`$state` must be called with zero or one arguments'
}
});

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-state-location',
message: '$state(...) can only be used as a variable declaration initializer or a class field'
code: 'invalid_state_location',
message: '`$state(...)` can only be used as a variable declaration initializer or a class field'
}
});

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-rune-args-length',
message: '$state.snapshot can only be called with 1 argument'
code: 'invalid_rune_args_length',
message: '`$state.snapshot` must be called with exactly one argument'
}
});

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'unexpected-eof',
code: 'unexpected_eof',
message: 'Unexpected end of input',
position: [32, 32]
}

@ -2,8 +2,8 @@ import { test } from '../../test';
export default test({
error: {
code: 'unclosed-element',
message: '<script> was left open',
code: 'unclosed_element',
message: '`<script>` was left open',
position: [32, 32]
}
});

@ -2,9 +2,9 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-self-placement',
code: 'invalid_self_placement',
message:
'<svelte:self> components can only exist inside {#if} blocks, {#each} blocks, {#snippet} blocks or slots passed to components',
'`<svelte:self>` components can only exist inside {#if} blocks, {#each} blocks, {#snippet} blocks or slots passed to components',
position: [1, 1]
}
});

@ -2,9 +2,9 @@ import { test } from '../../test';
export default test({
error: {
code: 'conflicting-slot-usage',
code: 'conflicting_slot_usage',
message:
'Cannot use <slot> syntax and {@render ...} tags in the same component. Migrate towards {@render ...} tags completely.',
'Cannot use `<slot>` syntax and `{@render ...}` tags in the same component. Migrate towards `{@render ...}` tags completely.',
position: [71, 84]
}
});

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'conflicting-children-snippet',
code: 'conflicting_children_snippet',
message:
'Cannot use explicit children snippet at the same time as implicit children content. Remove either the non-whitespace content or the children snippet block',
position: [320, 353]

@ -2,8 +2,8 @@ import { test } from '../../test';
export default test({
error: {
code: 'illegal-subscription',
message: 'Cannot reference store value inside <script context="module">',
code: 'illegal_subscription',
message: 'Cannot reference store value inside `<script context="module">`',
position: [164, 168]
}
});

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'illegal-store-subscription',
code: 'illegal_store_subscription',
message: 'Cannot subscribe to stores that are not declared at the top level of the component'
}
});

@ -2,8 +2,8 @@ import { test } from '../../test';
export default test({
error: {
code: 'illegal-global',
code: 'illegal_global',
message:
'$foo is an illegal variable name. To reference a global variable called $foo, use globalThis.$foo'
'`$foo` is an illegal variable name. To reference a global variable called `$foo`, use `globalThis.$foo`'
}
});

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-dollar-prefix',
code: 'invalid_dollar_prefix',
message: 'The $ prefix is reserved, and cannot be used for variables and imports'
}
});

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'illegal-store-subscription',
code: 'illegal_store_subscription',
message: 'Cannot subscribe to stores that are not declared at the top level of the component',
position: [142, 147]
}

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'illegal-store-subscription',
code: 'illegal_store_subscription',
message: 'Cannot subscribe to stores that are not declared at the top level of the component',
position: [167, 172]
}

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'illegal-store-subscription',
code: 'illegal_store_subscription',
message: 'Cannot subscribe to stores that are not declared at the top level of the component'
}
});

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'illegal-store-subscription',
code: 'illegal_store_subscription',
message: 'Cannot subscribe to stores that are not declared at the top level of the component'
}
});

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'expected-token',
code: 'expected_token',
message: 'Expected token </style',
position: [31, 31]
}

@ -2,7 +2,7 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-css-identifier',
code: 'invalid_css_identifier',
message: 'Expected a valid CSS identifier',
position: [9, 9]
}

@ -2,9 +2,9 @@ import { test } from '../../test';
export default test({
error: {
code: 'invalid-svelte-tag',
code: 'invalid_svelte_tag',
message:
'Valid <svelte:...> tag names are svelte:head, svelte:options, svelte:window, svelte:document, svelte:body, svelte:element, svelte:component, svelte:self or svelte:fragment',
'Valid `<svelte:...>` tag names are svelte:head, svelte:options, svelte:window, svelte:document, svelte:body, svelte:element, svelte:component, svelte:self or svelte:fragment',
position: [10, 10]
}
});

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save