|
1 | 1 | ---
|
2 | 2 | source: crates/oxc_linter/src/tester.rs
|
3 | 3 | ---
|
4 |
| - ⚠ eslint-plugin-unicorn(switch-case-braces): Empty switch case shouldn't have braces and not-empty case should have braces around it. |
| 4 | + ⚠ eslint-plugin-unicorn(switch-case-braces): Missing braces in case clause. |
5 | 5 | ╭─[switch_case_braces.tsx:1:18]
|
6 | 6 | 1 │ switch(s){case'':/]/}
|
7 | 7 | · ───
|
8 | 8 | ╰────
|
9 |
| - help: There is less visual clutter for empty cases and proper scope for non-empty cases. |
| 9 | + help: Add Braces for case clause. |
10 | 10 |
|
11 |
| - ⚠ eslint-plugin-unicorn(switch-case-braces): Empty switch case shouldn't have braces and not-empty case should have braces around it. |
| 11 | + ⚠ eslint-plugin-unicorn(switch-case-braces): Unexpected braces in empty case clause. |
12 | 12 | ╭─[switch_case_braces.tsx:1:29]
|
13 | 13 | 1 │ switch(something) { case 1: {} case 2: {console.log('something'); break;}}
|
14 | 14 | · ──
|
15 | 15 | ╰────
|
16 |
| - help: There is less visual clutter for empty cases and proper scope for non-empty cases. |
| 16 | + help: Remove braces in empty case clause. |
17 | 17 |
|
18 |
| - ⚠ eslint-plugin-unicorn(switch-case-braces): Empty switch case shouldn't have braces and not-empty case should have braces around it. |
| 18 | + ⚠ eslint-plugin-unicorn(switch-case-braces): Missing braces in case clause. |
19 | 19 | ╭─[switch_case_braces.tsx:1:37]
|
20 | 20 | 1 │ switch(something) { case 1: case 2: console.log('something'); break;}
|
21 | 21 | · ────────────────────────────────
|
22 | 22 | ╰────
|
23 |
| - help: There is less visual clutter for empty cases and proper scope for non-empty cases. |
| 23 | + help: Add Braces for case clause. |
24 | 24 |
|
25 |
| - ⚠ eslint-plugin-unicorn(switch-case-braces): Empty switch case shouldn't have braces and not-empty case should have braces around it. |
| 25 | + ⚠ eslint-plugin-unicorn(switch-case-braces): Unexpected braces in empty case clause. |
26 | 26 | ╭─[switch_case_braces.tsx:1:23]
|
27 | 27 | 1 │ switch(foo) { case 1: {} case 2: {} default: { doSomething(); } }
|
28 | 28 | · ──
|
29 | 29 | ╰────
|
30 |
| - help: There is less visual clutter for empty cases and proper scope for non-empty cases. |
| 30 | + help: Remove braces in empty case clause. |
31 | 31 |
|
32 |
| - ⚠ eslint-plugin-unicorn(switch-case-braces): Empty switch case shouldn't have braces and not-empty case should have braces around it. |
| 32 | + ⚠ eslint-plugin-unicorn(switch-case-braces): Unexpected braces in empty case clause. |
33 | 33 | ╭─[switch_case_braces.tsx:1:34]
|
34 | 34 | 1 │ switch(foo) { case 1: {} case 2: {} default: { doSomething(); } }
|
35 | 35 | · ──
|
36 | 36 | ╰────
|
37 |
| - help: There is less visual clutter for empty cases and proper scope for non-empty cases. |
| 37 | + help: Remove braces in empty case clause. |
38 | 38 |
|
39 |
| - ⚠ eslint-plugin-unicorn(switch-case-braces): Empty switch case shouldn't have braces and not-empty case should have braces around it. |
| 39 | + ⚠ eslint-plugin-unicorn(switch-case-braces): Unexpected braces in empty case clause. |
40 | 40 | ╭─[switch_case_braces.tsx:1:23]
|
41 | 41 | 1 │ switch(foo) { case 1: { /* fallthrough */ } default: {}/* fallthrough */ case 3: { doSomething(); break; } }
|
42 | 42 | · ─────────────────────
|
43 | 43 | ╰────
|
44 |
| - help: There is less visual clutter for empty cases and proper scope for non-empty cases. |
| 44 | + help: Remove braces in empty case clause. |
45 | 45 |
|
46 |
| - ⚠ eslint-plugin-unicorn(switch-case-braces): Empty switch case shouldn't have braces and not-empty case should have braces around it. |
| 46 | + ⚠ eslint-plugin-unicorn(switch-case-braces): Unexpected braces in empty case clause. |
47 | 47 | ╭─[switch_case_braces.tsx:1:54]
|
48 | 48 | 1 │ switch(foo) { case 1: { /* fallthrough */ } default: {}/* fallthrough */ case 3: { doSomething(); break; } }
|
49 | 49 | · ──
|
50 | 50 | ╰────
|
51 |
| - help: There is less visual clutter for empty cases and proper scope for non-empty cases. |
| 51 | + help: Remove braces in empty case clause. |
52 | 52 |
|
53 |
| - ⚠ eslint-plugin-unicorn(switch-case-braces): Empty switch case shouldn't have braces and not-empty case should have braces around it. |
| 53 | + ⚠ eslint-plugin-unicorn(switch-case-braces): Missing braces in case clause. |
54 | 54 | ╭─[switch_case_braces.tsx:1:24]
|
55 | 55 | 1 │ switch(foo) { default: doSomething(); }
|
56 | 56 | · ──────────────
|
57 | 57 | ╰────
|
58 |
| - help: There is less visual clutter for empty cases and proper scope for non-empty cases. |
| 58 | + help: Add Braces for case clause. |
59 | 59 |
|
60 |
| - ⚠ eslint-plugin-unicorn(switch-case-braces): Empty switch case shouldn't have braces and not-empty case should have braces around it. |
| 60 | + ⚠ eslint-plugin-unicorn(switch-case-braces): Missing braces in case clause. |
61 | 61 | ╭─[switch_case_braces.tsx:1:23]
|
62 | 62 | 1 │ switch(foo) { case 1: { doSomething(); } break; /* <-- This should be between braces */ }
|
63 | 63 | · ─────────────────────────
|
64 | 64 | ╰────
|
65 |
| - help: There is less visual clutter for empty cases and proper scope for non-empty cases. |
| 65 | + help: Add Braces for case clause. |
66 | 66 |
|
67 |
| - ⚠ eslint-plugin-unicorn(switch-case-braces): Empty switch case shouldn't have braces and not-empty case should have braces around it. |
| 67 | + ⚠ eslint-plugin-unicorn(switch-case-braces): Missing braces in case clause. |
68 | 68 | ╭─[switch_case_braces.tsx:1:24]
|
69 | 69 | 1 │ switch(foo) { default: label: {} }
|
70 | 70 | · ─────────
|
71 | 71 | ╰────
|
72 |
| - help: There is less visual clutter for empty cases and proper scope for non-empty cases. |
| 72 | + help: Add Braces for case clause. |
73 | 73 |
|
74 |
| - ⚠ eslint-plugin-unicorn(switch-case-braces): Empty switch case shouldn't have braces and not-empty case should have braces around it. |
| 74 | + ⚠ eslint-plugin-unicorn(switch-case-braces): Missing braces in case clause. |
75 | 75 | ╭─[switch_case_braces.tsx:1:82]
|
76 | 76 | 1 │ switch(something) { case 1: case 2: { console.log('something'); break; } case 3: console.log('something else'); }
|
77 | 77 | · ──────────────────────────────
|
78 | 78 | ╰────
|
79 |
| - help: There is less visual clutter for empty cases and proper scope for non-empty cases. |
| 79 | + help: Add Braces for case clause. |
0 commit comments