|
1 | 1 | --- |
2 | 2 | source: crates/oxc_linter/src/tester.rs |
3 | 3 | --- |
4 | | - ⚠ eslint(no-const-assign): eslint(no-const-assign): Unexpected re-assignment of const variable x |
| 4 | + ⚠ eslint(no-const-assign): Unexpected re-assignment of const variable x |
5 | 5 | ╭─[no_const_assign.tsx:1:7] |
6 | 6 | 1 │ const x = 0; x = 1; |
7 | 7 | · ┬ ┬ |
8 | 8 | · │ ╰── x is re-assigned here |
9 | 9 | · ╰── x is declared here as const |
10 | 10 | ╰──── |
11 | 11 |
|
12 | | - ⚠ eslint(no-const-assign): eslint(no-const-assign): Unexpected re-assignment of const variable x |
| 12 | + ⚠ eslint(no-const-assign): Unexpected re-assignment of const variable x |
13 | 13 | ╭─[no_const_assign.tsx:1:11] |
14 | 14 | 1 │ const {a: x} = {a: 0}; x = 1; |
15 | 15 | · ┬ ┬ |
16 | 16 | · │ ╰── x is re-assigned here |
17 | 17 | · ╰── x is declared here as const |
18 | 18 | ╰──── |
19 | 19 |
|
20 | | - ⚠ eslint(no-const-assign): eslint(no-const-assign): Unexpected re-assignment of const variable x |
| 20 | + ⚠ eslint(no-const-assign): Unexpected re-assignment of const variable x |
21 | 21 | ╭─[no_const_assign.tsx:1:7] |
22 | 22 | 1 │ const x = 0; ({x} = {x: 1}); |
23 | 23 | · ┬ ┬ |
24 | 24 | · │ ╰── x is re-assigned here |
25 | 25 | · ╰── x is declared here as const |
26 | 26 | ╰──── |
27 | 27 |
|
28 | | - ⚠ eslint(no-const-assign): eslint(no-const-assign): Unexpected re-assignment of const variable x |
| 28 | + ⚠ eslint(no-const-assign): Unexpected re-assignment of const variable x |
29 | 29 | ╭─[no_const_assign.tsx:1:7] |
30 | 30 | 1 │ const x = 0; ({a: x = 1} = {}); |
31 | 31 | · ┬ ┬ |
32 | 32 | · │ ╰── x is re-assigned here |
33 | 33 | · ╰── x is declared here as const |
34 | 34 | ╰──── |
35 | 35 |
|
36 | | - ⚠ eslint(no-const-assign): eslint(no-const-assign): Unexpected re-assignment of const variable x |
| 36 | + ⚠ eslint(no-const-assign): Unexpected re-assignment of const variable x |
37 | 37 | ╭─[no_const_assign.tsx:1:7] |
38 | 38 | 1 │ const x = 0; x += 1; |
39 | 39 | · ┬ ┬ |
40 | 40 | · │ ╰── x is re-assigned here |
41 | 41 | · ╰── x is declared here as const |
42 | 42 | ╰──── |
43 | 43 |
|
44 | | - ⚠ eslint(no-const-assign): eslint(no-const-assign): Unexpected re-assignment of const variable x |
| 44 | + ⚠ eslint(no-const-assign): Unexpected re-assignment of const variable x |
45 | 45 | ╭─[no_const_assign.tsx:1:7] |
46 | 46 | 1 │ const x = 0; ++x; |
47 | 47 | · ┬ ┬ |
48 | 48 | · │ ╰── x is re-assigned here |
49 | 49 | · ╰── x is declared here as const |
50 | 50 | ╰──── |
51 | 51 |
|
52 | | - ⚠ eslint(no-const-assign): eslint(no-const-assign): Unexpected re-assignment of const variable i |
| 52 | + ⚠ eslint(no-const-assign): Unexpected re-assignment of const variable i |
53 | 53 | ╭─[no_const_assign.tsx:1:12] |
54 | 54 | 1 │ for (const i = 0; i < 10; ++i) { foo(i); } |
55 | 55 | · ┬ ┬ |
56 | 56 | · │ ╰── i is re-assigned here |
57 | 57 | · ╰── i is declared here as const |
58 | 58 | ╰──── |
59 | 59 |
|
60 | | - ⚠ eslint(no-const-assign): eslint(no-const-assign): Unexpected re-assignment of const variable x |
| 60 | + ⚠ eslint(no-const-assign): Unexpected re-assignment of const variable x |
61 | 61 | ╭─[no_const_assign.tsx:1:7] |
62 | 62 | 1 │ const x = 0; x = 1; x = 2; |
63 | 63 | · ┬ ┬ |
64 | 64 | · │ ╰── x is re-assigned here |
65 | 65 | · ╰── x is declared here as const |
66 | 66 | ╰──── |
67 | 67 |
|
68 | | - ⚠ eslint(no-const-assign): eslint(no-const-assign): Unexpected re-assignment of const variable x |
| 68 | + ⚠ eslint(no-const-assign): Unexpected re-assignment of const variable x |
69 | 69 | ╭─[no_const_assign.tsx:1:7] |
70 | 70 | 1 │ const x = 0; x = 1; x = 2; |
71 | 71 | · ┬ ┬ |
72 | 72 | · │ ╰── x is re-assigned here |
73 | 73 | · ╰── x is declared here as const |
74 | 74 | ╰──── |
75 | 75 |
|
76 | | - ⚠ eslint(no-const-assign): eslint(no-const-assign): Unexpected re-assignment of const variable x |
| 76 | + ⚠ eslint(no-const-assign): Unexpected re-assignment of const variable x |
77 | 77 | ╭─[no_const_assign.tsx:1:7] |
78 | 78 | 1 │ const x = 0; function foo() { x = x + 1; } |
79 | 79 | · ┬ ┬ |
80 | 80 | · │ ╰── x is re-assigned here |
81 | 81 | · ╰── x is declared here as const |
82 | 82 | ╰──── |
83 | 83 |
|
84 | | - ⚠ eslint(no-const-assign): eslint(no-const-assign): Unexpected re-assignment of const variable x |
| 84 | + ⚠ eslint(no-const-assign): Unexpected re-assignment of const variable x |
85 | 85 | ╭─[no_const_assign.tsx:1:7] |
86 | 86 | 1 │ const x = 0; function foo(a) { x = a; } |
87 | 87 | · ┬ ┬ |
88 | 88 | · │ ╰── x is re-assigned here |
89 | 89 | · ╰── x is declared here as const |
90 | 90 | ╰──── |
91 | 91 |
|
92 | | - ⚠ eslint(no-const-assign): eslint(no-const-assign): Unexpected re-assignment of const variable x |
| 92 | + ⚠ eslint(no-const-assign): Unexpected re-assignment of const variable x |
93 | 93 | ╭─[no_const_assign.tsx:1:7] |
94 | 94 | 1 │ const x = 0; while (true) { x = x + 1; } |
95 | 95 | · ┬ ┬ |
96 | 96 | · │ ╰── x is re-assigned here |
97 | 97 | · ╰── x is declared here as const |
98 | 98 | ╰──── |
99 | 99 |
|
100 | | - ⚠ eslint(no-const-assign): eslint(no-const-assign): Unexpected re-assignment of const variable x |
| 100 | + ⚠ eslint(no-const-assign): Unexpected re-assignment of const variable x |
101 | 101 | ╭─[no_const_assign.tsx:1:7] |
102 | 102 | 1 │ const x = 0; function foo(a) { function bar(b) { x = b; } bar(123); } |
103 | 103 | · ┬ ┬ |
104 | 104 | · │ ╰── x is re-assigned here |
105 | 105 | · ╰── x is declared here as const |
106 | 106 | ╰──── |
107 | 107 |
|
108 | | - ⚠ eslint(no-const-assign): eslint(no-const-assign): Unexpected re-assignment of const variable x |
| 108 | + ⚠ eslint(no-const-assign): Unexpected re-assignment of const variable x |
109 | 109 | ╭─[no_const_assign.tsx:1:1] |
110 | 110 | 1 │ x = 123; const x = 1; |
111 | 111 | · ┬ ┬ |
112 | 112 | · │ ╰── x is declared here as const |
113 | 113 | · ╰── x is re-assigned here |
114 | 114 | ╰──── |
115 | 115 |
|
116 | | - ⚠ eslint(no-const-assign): eslint(no-const-assign): Unexpected re-assignment of const variable d |
| 116 | + ⚠ eslint(no-const-assign): Unexpected re-assignment of const variable d |
117 | 117 | ╭─[no_const_assign.tsx:1:24] |
118 | 118 | 1 │ const [a, b, ...[c, ...d]] = [1, 2, 3, 4, 5]; d = 123 |
119 | 119 | · ┬ ┬ |
120 | 120 | · │ ╰── d is re-assigned here |
121 | 121 | · ╰── d is declared here as const |
122 | 122 | ╰──── |
123 | 123 |
|
124 | | - ⚠ eslint(no-const-assign): eslint(no-const-assign): Unexpected re-assignment of const variable d |
| 124 | + ⚠ eslint(no-const-assign): Unexpected re-assignment of const variable d |
125 | 125 | ╭─[no_const_assign.tsx:1:7] |
126 | 126 | 1 │ const d = 123; [a, b, ...[c, ...d]] = [1, 2, 3, 4, 5] |
127 | 127 | · ┬ ┬ |
128 | 128 | · │ ╰── d is re-assigned here |
129 | 129 | · ╰── d is declared here as const |
130 | 130 | ╰──── |
131 | 131 |
|
132 | | - ⚠ eslint(no-const-assign): eslint(no-const-assign): Unexpected re-assignment of const variable b |
| 132 | + ⚠ eslint(no-const-assign): Unexpected re-assignment of const variable b |
133 | 133 | ╭─[no_const_assign.tsx:1:7] |
134 | 134 | 1 │ const b = 0; ({a, ...b} = {a: 1, c: 2, d: 3}) |
135 | 135 | · ┬ ┬ |
|
0 commit comments