update errors

pull/14290/head
Rich Harris 2 years ago
parent 28e05ed058
commit b423b5c695

@ -442,6 +442,12 @@ Expected whitespace
Imports of `svelte/internal/*` are forbidden. It contains private runtime code which is subject to change without notice. If you're importing from `svelte/internal/*` to work around a limitation of Svelte, please open an issue at https://github.com/sveltejs/svelte and explain your use case Imports of `svelte/internal/*` are forbidden. It contains private runtime code which is subject to change without notice. If you're importing from `svelte/internal/*` to work around a limitation of Svelte, please open an issue at https://github.com/sveltejs/svelte and explain your use case
``` ```
### inspect_trace_invalid_placement
```
`$inspect.trace(...)` must be the first statement of a function body
```
### invalid_arguments_usage ### invalid_arguments_usage
``` ```
@ -970,18 +976,6 @@ A `<textarea>` can have either a value attribute or (equivalently) child content
`<title>` can only contain text and {tags} `<title>` can only contain text and {tags}
``` ```
### trace_rune_invalid_argument
```
`$inspect.trace` requires a string argument for the trace name
```
### trace_rune_invalid_location
```
`$inspect.trace(...)` must be the first statement of a function body
```
### transition_conflict ### transition_conflict
``` ```

@ -54,6 +54,10 @@
> Imports of `svelte/internal/*` are forbidden. It contains private runtime code which is subject to change without notice. If you're importing from `svelte/internal/*` to work around a limitation of Svelte, please open an issue at https://github.com/sveltejs/svelte and explain your use case > Imports of `svelte/internal/*` are forbidden. It contains private runtime code which is subject to change without notice. If you're importing from `svelte/internal/*` to work around a limitation of Svelte, please open an issue at https://github.com/sveltejs/svelte and explain your use case
## inspect_trace_invalid_placement
> `$inspect.trace(...)` must be the first statement of a function body
## invalid_arguments_usage ## invalid_arguments_usage
> The arguments keyword cannot be used within the template or at the top level of a component > The arguments keyword cannot be used within the template or at the top level of a component
@ -186,14 +190,6 @@ It's possible to export a snippet from a `<script module>` block, but only if it
Using a `$` prefix to refer to the value of a store is only possible inside `.svelte` files, where Svelte can automatically create subscriptions when a component is mounted and unsubscribe when the component is unmounted. Consider migrating to runes instead. Using a `$` prefix to refer to the value of a store is only possible inside `.svelte` files, where Svelte can automatically create subscriptions when a component is mounted and unsubscribe when the component is unmounted. Consider migrating to runes instead.
## trace_rune_invalid_argument
> `$inspect.trace` requires a string argument for the trace name
## trace_rune_invalid_location
> `$inspect.trace(...)` must be the first statement of a function body
## typescript_invalid_feature ## typescript_invalid_feature
> TypeScript language features like %feature% are not natively supported, and their use is generally discouraged. Outside of `<script>` tags, these features are not supported. For use within `<script>` tags, you will need to use a preprocessor to convert it to JavaScript before it gets passed to the Svelte compiler. If you are using `vitePreprocess`, make sure to specifically enable preprocessing script tags (`vitePreprocess({ script: true })`) > TypeScript language features like %feature% are not natively supported, and their use is generally discouraged. Outside of `<script>` tags, these features are not supported. For use within `<script>` tags, you will need to use a preprocessor to convert it to JavaScript before it gets passed to the Svelte compiler. If you are using `vitePreprocess`, make sure to specifically enable preprocessing script tags (`vitePreprocess({ script: true })`)

@ -469,22 +469,13 @@ export function store_invalid_subscription_module(node) {
e(node, "store_invalid_subscription_module", `Cannot reference store value outside a \`.svelte\` file\nhttps://svelte.dev/e/store_invalid_subscription_module`); e(node, "store_invalid_subscription_module", `Cannot reference store value outside a \`.svelte\` file\nhttps://svelte.dev/e/store_invalid_subscription_module`);
} }
/**
* `$inspect.trace` requires a string argument for the trace name
* @param {null | number | NodeLike} node
* @returns {never}
*/
export function trace_rune_invalid_argument(node) {
e(node, "trace_rune_invalid_argument", `\`$inspect.trace\` requires a string argument for the trace name\nhttps://svelte.dev/e/trace_rune_invalid_argument`);
}
/** /**
* `$inspect.trace(...)` must be the first statement of a function body * `$inspect.trace(...)` must be the first statement of a function body
* @param {null | number | NodeLike} node * @param {null | number | NodeLike} node
* @returns {never} * @returns {never}
*/ */
export function trace_rune_invalid_location(node) { export function inspect_trace_invalid_placement(node) {
e(node, "trace_rune_invalid_location", `\`$inspect.trace(...)\` must be the first statement of a function body\nhttps://svelte.dev/e/trace_rune_invalid_location`); e(node, "inspect_trace_invalid_placement", `\`$inspect.trace(...)\` must be the first statement of a function body\nhttps://svelte.dev/e/inspect_trace_invalid_placement`);
} }
/** /**

@ -155,7 +155,7 @@ export function CallExpression(node, context) {
) || ) ||
grand_parent.body[0] !== parent grand_parent.body[0] !== parent
) { ) {
e.trace_rune_invalid_location(node); e.inspect_trace_invalid_placement(node);
} }
if (dev) { if (dev) {

Loading…
Cancel
Save