Skip to content

Commit 0e9eca3

Browse files
committed
lint
1 parent e319add commit 0e9eca3

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

documentation/docs/98-reference/.generated/compile-errors.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -751,11 +751,9 @@ Cannot export state from a module if it is reassigned. Either export a function
751751
### state_invalid_opaque_declaration
752752

753753
```
754-
`$state.opaque(...)` must be declared with an destructured array pattern and the state expression and invalidation expression must be an identifier.
754+
`$state.opaque(...)` must be declared with an destructured array pattern and the state expression and invalidate expression must be an identifier (e.g. `let [state, invalidate] = $state.opaque(data);`)
755755
```
756756

757-
For example: `let [state, invalidate] = $state.opaque(data);`
758-
759757
### state_invalid_placement
760758

761759
```

packages/svelte/messages/compile-errors/script.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,7 @@ It's possible to export a snippet from a `<script module>` block, but only if it
170170
171171
## state_invalid_opaque_declaration
172172

173-
> `$state.opaque(...)` must be declared with an destructured array pattern and the state expression and invalidation expression must be an identifier.
174-
175-
For example: `let [state, invalidate] = $state.opaque(data);`
173+
> `$state.opaque(...)` must be declared with an destructured array pattern and the state expression and invalidate expression must be an identifier (e.g. `let [state, invalidate] = $state.opaque(data);`)
176174
177175
## state_invalid_placement
178176

packages/svelte/src/compiler/errors.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,12 +433,12 @@ export function state_invalid_export(node) {
433433
}
434434

435435
/**
436-
* `$state.opaque(...)` must be declared with an destructured array pattern and the state expression and invalidation expression must be an identifier.
436+
* `$state.opaque(...)` must be declared with an destructured array pattern and the state expression and invalidate expression must be an identifier (e.g. `let [state, invalidate] = $state.opaque(data);`)
437437
* @param {null | number | NodeLike} node
438438
* @returns {never}
439439
*/
440440
export function state_invalid_opaque_declaration(node) {
441-
e(node, "state_invalid_opaque_declaration", "`$state.opaque(...)` must be declared with an destructured array pattern and the state expression and invalidation expression must be an identifier.");
441+
e(node, "state_invalid_opaque_declaration", "`$state.opaque(...)` must be declared with an destructured array pattern and the state expression and invalidate expression must be an identifier (e.g. `let [state, invalidate] = $state.opaque(data);`)");
442442
}
443443

444444
/**

0 commit comments

Comments
 (0)