@@ -5,7 +5,7 @@ source: crates/oxc_linter/src/tester.rs
55 ╭─[prefer_default_parameters .tsx :2 :2 ]
66 1 │ function abc(foo ) {
77 2 │ foo = foo || 123 ;
8- · ─────────────────
8+ · ────────────────
99 3 │ }
1010 ╰────
1111 help : Replace the reassignment with a default parameter .
@@ -14,7 +14,7 @@ source: crates/oxc_linter/src/tester.rs
1414 ╭─[prefer_default_parameters .tsx :2 :2 ]
1515 1 │ function abc(foo ) {
1616 2 │ foo = foo || true ;
17- · ──────────────────
17+ · ─────────────────
1818 3 │ }
1919 ╰────
2020 help : Replace the reassignment with a default parameter .
@@ -23,7 +23,7 @@ source: crates/oxc_linter/src/tester.rs
2323 ╭─[prefer_default_parameters .tsx :2 :2 ]
2424 1 │ function abc(foo ) {
2525 2 │ foo = foo || 123 ;
26- · ─────────────────
26+ · ────────────────
2727 3 │ console .log (foo );
2828 ╰────
2929 help : Replace the reassignment with a default parameter .
@@ -50,7 +50,7 @@ source: crates/oxc_linter/src/tester.rs
5050 ╭─[prefer_default_parameters .tsx :2 :2 ]
5151 1 │ const abc = function (foo ) {
5252 2 │ foo = foo || 123 ;
53- · ─────────────────
53+ · ────────────────
5454 3 │ }
5555 ╰────
5656 help : Replace the reassignment with a default parameter .
@@ -59,7 +59,7 @@ source: crates/oxc_linter/src/tester.rs
5959 ╭─[prefer_default_parameters .tsx :2 :2 ]
6060 1 │ const abc = (foo ) => {
6161 2 │ foo = foo || ' bar' ;
62- · ───────────────────
62+ · ──────────────────
6363 3 │ };
6464 ╰────
6565 help : Replace the reassignment with a default parameter .
@@ -68,7 +68,7 @@ source: crates/oxc_linter/src/tester.rs
6868 ╭─[prefer_default_parameters .tsx :2 :2 ]
6969 1 │ const abc = foo => {
7070 2 │ foo = foo || ' bar' ;
71- · ───────────────────
71+ · ──────────────────
7272 3 │ };
7373 ╰────
7474 help : Replace the reassignment with a default parameter .
@@ -86,7 +86,7 @@ source: crates/oxc_linter/src/tester.rs
8686 ╭─[prefer_default_parameters .tsx :2 :2 ]
8787 1 │ function abc(foo ) {
8888 2 │ foo = foo || ' bar' ;
89- · ───────────────────
89+ · ──────────────────
9090 3 │ bar ();
9191 ╰────
9292 help : Replace the reassignment with a default parameter .
@@ -95,7 +95,7 @@ source: crates/oxc_linter/src/tester.rs
9595 ╭─[prefer_default_parameters .tsx :2 :2 ]
9696 1 │ function abc(foo ) {
9797 2 │ foo = foo ?? 123 ;
98- · ─────────────────
98+ · ────────────────
9999 3 │ }
100100 ╰────
101101 help : Replace the reassignment with a default parameter .
@@ -122,7 +122,7 @@ source: crates/oxc_linter/src/tester.rs
122122 ╭─[prefer_default_parameters .tsx :3 :3 ]
123123 2 │ abc (foo ) {
124124 3 │ foo = foo || 123 ;
125- · ─────────────────
125+ · ────────────────
126126 4 │ }
127127 ╰────
128128 help : Replace the reassignment with a default parameter .
@@ -131,7 +131,7 @@ source: crates/oxc_linter/src/tester.rs
131131 ╭─[prefer_default_parameters .tsx :3 :3 ]
132132 2 │ abc (foo ) {
133133 3 │ foo = foo || 123 ;
134- · ─────────────────
134+ · ────────────────
135135 4 │ },
136136 ╰────
137137 help : Replace the reassignment with a default parameter .
@@ -140,7 +140,7 @@ source: crates/oxc_linter/src/tester.rs
140140 ╭─[prefer_default_parameters .tsx :3 :3 ]
141141 2 │ abc (foo ) {
142142 3 │ foo = foo || 123 ;
143- · ─────────────────
143+ · ────────────────
144144 4 │ }
145145 ╰────
146146 help : Replace the reassignment with a default parameter .
@@ -149,37 +149,37 @@ source: crates/oxc_linter/src/tester.rs
149149 ╭─[prefer_default_parameters .tsx :3 :3 ]
150150 2 │ abc (foo ) {
151151 3 │ foo = foo || 123 ;
152- · ─────────────────
152+ · ────────────────
153153 4 │ }
154154 ╰────
155155 help : Replace the reassignment with a default parameter .
156156
157157 ⚠ eslint - plugin - unicorn (prefer - default - parameters ): Prefer default parameters over reassignment for ' foo' .
158158 ╭─[prefer_default_parameters .tsx :1 :21 ]
159159 1 │ function abc(foo ) { foo = foo || ' bar' ; }
160- · ───────────────────
160+ · ──────────────────
161161 ╰────
162162 help : Replace the reassignment with a default parameter .
163163
164164 ⚠ eslint - plugin - unicorn (prefer - default - parameters ): Prefer default parameters over reassignment for ' foo' .
165165 ╭─[prefer_default_parameters .tsx :1 :21 ]
166166 1 │ function abc(foo ) { foo = foo || ' bar' ;}
167- · ───────────────────
167+ · ──────────────────
168168 ╰────
169169 help : Replace the reassignment with a default parameter .
170170
171171 ⚠ eslint - plugin - unicorn (prefer - default - parameters ): Prefer default parameters over reassignment for ' foo' .
172172 ╭─[prefer_default_parameters .tsx :1 :29 ]
173173 1 │ const abc = function (foo ) { foo = foo || ' bar' ;}
174- · ───────────────────
174+ · ──────────────────
175175 ╰────
176176 help : Replace the reassignment with a default parameter .
177177
178178 ⚠ eslint - plugin - unicorn (prefer - default - parameters ): Prefer default parameters over reassignment for ' foo' .
179179 ╭─[prefer_default_parameters .tsx :2 :2 ]
180180 1 │ function abc(foo ) {
181181 2 │ foo = foo || ' bar' ; bar (); baz ();
182- · ───────────────────
182+ · ──────────────────
183183 3 │ }
184184 ╰────
185185 help : Replace the reassignment with a default parameter .
@@ -188,7 +188,7 @@ source: crates/oxc_linter/src/tester.rs
188188 ╭─[prefer_default_parameters .tsx :2 :2 ]
189189 1 │ function abc(foo ) {
190190 2 │ foo = foo || ' bar' ;
191- · ───────────────────
191+ · ──────────────────
192192 3 │ function def(bar ) {
193193 ╰────
194194 help : Replace the reassignment with a default parameter .
@@ -197,7 +197,7 @@ source: crates/oxc_linter/src/tester.rs
197197 ╭─[prefer_default_parameters .tsx :4 :3 ]
198198 3 │ function def(bar ) {
199199 4 │ bar = bar || ' foo' ;
200- · ───────────────────
200+ · ──────────────────
201201 5 │ }
202202 ╰────
203203 help : Replace the reassignment with a default parameter .
@@ -206,7 +206,7 @@ source: crates/oxc_linter/src/tester.rs
206206 ╭─[prefer_default_parameters .tsx :4 :3 ]
207207 3 │ function def(bar ) {
208208 4 │ bar = bar || ' foo' ;
209- · ───────────────────
209+ · ──────────────────
210210 5 │ }
211211 ╰────
212212 help : Replace the reassignment with a default parameter .
@@ -224,7 +224,7 @@ source: crates/oxc_linter/src/tester.rs
224224 ╭─[prefer_default_parameters .tsx :3 :3 ]
225225 2 │ abc (foo ) {
226226 3 │ foo = foo || 123 ;
227- · ─────────────────
227+ · ────────────────
228228 4 │ },
229229 ╰────
230230 help : Replace the reassignment with a default parameter .
@@ -233,7 +233,7 @@ source: crates/oxc_linter/src/tester.rs
233233 ╭─[prefer_default_parameters .tsx :6 :3 ]
234234 5 │ def (foo ) {
235235 6 │ foo = foo || 123 ;
236- · ─────────────────
236+ · ────────────────
237237 7 │ }
238238 ╰────
239239 help : Replace the reassignment with a default parameter .
@@ -242,7 +242,7 @@ source: crates/oxc_linter/src/tester.rs
242242 ╭─[prefer_default_parameters .tsx :3 :3 ]
243243 2 │ abc (foo ) {
244244 3 │ foo = foo || 123 ;
245- · ─────────────────
245+ · ────────────────
246246 4 │ }
247247 ╰────
248248 help : Replace the reassignment with a default parameter .
@@ -251,7 +251,7 @@ source: crates/oxc_linter/src/tester.rs
251251 ╭─[prefer_default_parameters .tsx :6 :3 ]
252252 5 │ def (foo ) {
253253 6 │ foo = foo || 123 ;
254- · ─────────────────
254+ · ────────────────
255255 7 │ }
256256 ╰────
257257 help : Replace the reassignment with a default parameter .
@@ -260,7 +260,7 @@ source: crates/oxc_linter/src/tester.rs
260260 ╭─[prefer_default_parameters .tsx :3 :2 ]
261261 2 │ const noSideEffects = 123 ;
262262 3 │ foo = foo || 123 ;
263- · ─────────────────
263+ · ────────────────
264264 4 │ }
265265 ╰────
266266 help : Replace the reassignment with a default parameter .
@@ -269,7 +269,7 @@ source: crates/oxc_linter/src/tester.rs
269269 ╭─[prefer_default_parameters .tsx :5 :2 ]
270270 4 │
271271 5 │ foo = foo || 123 ;
272- · ─────────────────
272+ · ────────────────
273273 6 │ console .log (foo );
274274 ╰────
275275 help : Replace the reassignment with a default parameter .
@@ -278,7 +278,7 @@ source: crates/oxc_linter/src/tester.rs
278278 ╭─[prefer_default_parameters .tsx :3 :2 ]
279279 2 │ const bar = function () {};
280280 3 │ foo = foo || 123 ;
281- · ─────────────────
281+ · ────────────────
282282 4 │ }
283283 ╰────
284284 help : Replace the reassignment with a default parameter .
0 commit comments