File tree 3 files changed +5
-8
lines changed
packages/eslint-plugin-svelte
tests/fixtures/rules/prefer-const/invalid
3 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -46,13 +46,6 @@ function shouldSkipDeclaration(declaration: TSESTree.Expression | null) {
46
46
) {
47
47
return true ;
48
48
}
49
- if (
50
- callee . object . name === '$state' &&
51
- callee . property . type === 'Identifier' &&
52
- callee . property . name === 'raw'
53
- ) {
54
- return true ;
55
- }
56
49
57
50
return false ;
58
51
}
Original file line number Diff line number Diff line change 6
6
line : 4
7
7
column : 6
8
8
suggestions : null
9
+ - message : " 'raw' is never reassigned. Use 'const' instead."
10
+ line : 5
11
+ column : 6
12
+ suggestions : null
9
13
- message : " 'doubled' is never reassigned. Use 'const' instead."
10
14
line : 6
11
15
column : 6
Original file line number Diff line number Diff line change 2
2
let { prop1, prop2 } = $props ();
3
3
const zero = 0 ;
4
4
const state = $state (0 );
5
- let raw = $state .raw (0 );
5
+ const raw = $state .raw (0 );
6
6
const doubled = state * 2 ;
7
7
let derived = $derived (state * 2 );
8
8
const calculated = calc ();
You can’t perform that action at this time.
0 commit comments