@@ -6,151 +6,151 @@ source: crates/oxc_linter/src/tester.rs
6
6
1 │ throw Error ()
7
7
· ───────
8
8
╰────
9
- help : While it ' s possible to create a new error without using the `new` keyword, it ' s better to be explicit .
9
+ help : Using ` new` ensures the error is correctly initialized .
10
10
11
11
⚠ eslint - plugin - unicorn (throw - new -error ): Require ` new` when throwing an error .
12
12
╭─[throw_new_error .tsx :1 :7 ]
13
13
1 │ throw (Error )()
14
14
· ─────────
15
15
╰────
16
- help : While it ' s possible to create a new error without using the `new` keyword, it ' s better to be explicit .
16
+ help : Using ` new` ensures the error is correctly initialized .
17
17
18
18
⚠ eslint - plugin - unicorn (throw - new -error ): Require ` new` when throwing an error .
19
19
╭─[throw_new_error .tsx :1 :7 ]
20
20
1 │ throw lib .Error ()
21
21
· ───────────
22
22
╰────
23
- help : While it ' s possible to create a new error without using the `new` keyword, it ' s better to be explicit .
23
+ help : Using ` new` ensures the error is correctly initialized .
24
24
25
25
⚠ eslint - plugin - unicorn (throw - new -error ): Require ` new` when throwing an error .
26
26
╭─[throw_new_error .tsx :1 :7 ]
27
27
1 │ throw lib .mod .Error ()
28
28
· ───────────────
29
29
╰────
30
- help : While it ' s possible to create a new error without using the `new` keyword, it ' s better to be explicit .
30
+ help : Using ` new` ensures the error is correctly initialized .
31
31
32
32
⚠ eslint - plugin - unicorn (throw - new -error ): Require ` new` when throwing an error .
33
33
╭─[throw_new_error .tsx :1 :7 ]
34
34
1 │ throw lib [mod ].Error ()
35
35
· ────────────────
36
36
╰────
37
- help : While it ' s possible to create a new error without using the `new` keyword, it ' s better to be explicit .
37
+ help : Using ` new` ensures the error is correctly initialized .
38
38
39
39
⚠ eslint - plugin - unicorn (throw - new -error ): Require ` new` when throwing an error .
40
40
╭─[throw_new_error .tsx :1 :7 ]
41
41
1 │ throw (lib .mod ).Error ()
42
42
· ─────────────────
43
43
╰────
44
- help : While it ' s possible to create a new error without using the `new` keyword, it ' s better to be explicit .
44
+ help : Using ` new` ensures the error is correctly initialized .
45
45
46
46
⚠ eslint - plugin - unicorn (throw - new -error ): Require ` new` when throwing an error .
47
47
╭─[throw_new_error .tsx :1 :7 ]
48
48
1 │ throw Error (' foo' )
49
49
· ────────────
50
50
╰────
51
- help : While it ' s possible to create a new error without using the `new` keyword, it ' s better to be explicit .
51
+ help : Using ` new` ensures the error is correctly initialized .
52
52
53
53
⚠ eslint - plugin - unicorn (throw - new -error ): Require ` new` when throwing an error .
54
54
╭─[throw_new_error .tsx :1 :7 ]
55
55
1 │ throw CustomError (' foo' )
56
56
· ──────────────────
57
57
╰────
58
- help : While it ' s possible to create a new error without using the `new` keyword, it ' s better to be explicit .
58
+ help : Using ` new` ensures the error is correctly initialized .
59
59
60
60
⚠ eslint - plugin - unicorn (throw - new -error ): Require ` new` when throwing an error .
61
61
╭─[throw_new_error .tsx :1 :7 ]
62
62
1 │ throw FooBarBazError (' foo' )
63
63
· ─────────────────────
64
64
╰────
65
- help : While it ' s possible to create a new error without using the `new` keyword, it ' s better to be explicit .
65
+ help : Using ` new` ensures the error is correctly initialized .
66
66
67
67
⚠ eslint - plugin - unicorn (throw - new -error ): Require ` new` when throwing an error .
68
68
╭─[throw_new_error .tsx :1 :7 ]
69
69
1 │ throw ABCError (' foo' )
70
70
· ───────────────
71
71
╰────
72
- help : While it ' s possible to create a new error without using the `new` keyword, it ' s better to be explicit .
72
+ help : Using ` new` ensures the error is correctly initialized .
73
73
74
74
⚠ eslint - plugin - unicorn (throw - new -error ): Require ` new` when throwing an error .
75
75
╭─[throw_new_error .tsx :1 :7 ]
76
76
1 │ throw Abc3Error (' foo' )
77
77
· ────────────────
78
78
╰────
79
- help : While it ' s possible to create a new error without using the `new` keyword, it ' s better to be explicit .
79
+ help : Using ` new` ensures the error is correctly initialized .
80
80
81
81
⚠ eslint - plugin - unicorn (throw - new -error ): Require ` new` when throwing an error .
82
82
╭─[throw_new_error .tsx :1 :7 ]
83
83
1 │ throw TypeError ()
84
84
· ───────────
85
85
╰────
86
- help : While it ' s possible to create a new error without using the `new` keyword, it ' s better to be explicit .
86
+ help : Using ` new` ensures the error is correctly initialized .
87
87
88
88
⚠ eslint - plugin - unicorn (throw - new -error ): Require ` new` when throwing an error .
89
89
╭─[throw_new_error .tsx :1 :7 ]
90
90
1 │ throw EvalError ()
91
91
· ───────────
92
92
╰────
93
- help : While it ' s possible to create a new error without using the `new` keyword, it ' s better to be explicit .
93
+ help : Using ` new` ensures the error is correctly initialized .
94
94
95
95
⚠ eslint - plugin - unicorn (throw - new -error ): Require ` new` when throwing an error .
96
96
╭─[throw_new_error .tsx :1 :7 ]
97
97
1 │ throw RangeError ()
98
98
· ────────────
99
99
╰────
100
- help : While it ' s possible to create a new error without using the `new` keyword, it ' s better to be explicit .
100
+ help : Using ` new` ensures the error is correctly initialized .
101
101
102
102
⚠ eslint - plugin - unicorn (throw - new -error ): Require ` new` when throwing an error .
103
103
╭─[throw_new_error .tsx :1 :7 ]
104
104
1 │ throw ReferenceError ()
105
105
· ────────────────
106
106
╰────
107
- help : While it ' s possible to create a new error without using the `new` keyword, it ' s better to be explicit .
107
+ help : Using ` new` ensures the error is correctly initialized .
108
108
109
109
⚠ eslint - plugin - unicorn (throw - new -error ): Require ` new` when throwing an error .
110
110
╭─[throw_new_error .tsx :1 :7 ]
111
111
1 │ throw SyntaxError ()
112
112
· ─────────────
113
113
╰────
114
- help : While it ' s possible to create a new error without using the `new` keyword, it ' s better to be explicit .
114
+ help : Using ` new` ensures the error is correctly initialized .
115
115
116
116
⚠ eslint - plugin - unicorn (throw - new -error ): Require ` new` when throwing an error .
117
117
╭─[throw_new_error .tsx :1 :7 ]
118
118
1 │ throw URIError ()
119
119
· ──────────
120
120
╰────
121
- help : While it ' s possible to create a new error without using the `new` keyword, it ' s better to be explicit .
121
+ help : Using ` new` ensures the error is correctly initialized .
122
122
123
123
⚠ eslint - plugin - unicorn (throw - new -error ): Require ` new` when throwing an error .
124
124
╭─[throw_new_error .tsx :1 :10 ]
125
125
1 │ throw (( URIError () ))
126
126
· ──────────
127
127
╰────
128
- help : While it ' s possible to create a new error without using the `new` keyword, it ' s better to be explicit .
128
+ help : Using ` new` ensures the error is correctly initialized .
129
129
130
130
⚠ eslint - plugin - unicorn (throw - new -error ): Require ` new` when throwing an error .
131
131
╭─[throw_new_error .tsx :1 :7 ]
132
132
1 │ throw (( URIError ))()
133
133
· ────────────────
134
134
╰────
135
- help : While it ' s possible to create a new error without using the `new` keyword, it ' s better to be explicit .
135
+ help : Using ` new` ensures the error is correctly initialized .
136
136
137
137
⚠ eslint - plugin - unicorn (throw - new -error ): Require ` new` when throwing an error .
138
138
╭─[throw_new_error .tsx :1 :7 ]
139
139
1 │ throw getGlobalThis ().Error ()
140
140
· ───────────────────────
141
141
╰────
142
- help : While it ' s possible to create a new error without using the `new` keyword, it ' s better to be explicit .
142
+ help : Using ` new` ensures the error is correctly initialized .
143
143
144
144
⚠ eslint - plugin - unicorn (throw - new -error ): Require ` new` when throwing an error .
145
145
╭─[throw_new_error .tsx :1 :7 ]
146
146
1 │ throw utils .getGlobalThis ().Error ()
147
147
· ─────────────────────────────
148
148
╰────
149
- help : While it ' s possible to create a new error without using the `new` keyword, it ' s better to be explicit .
149
+ help : Using ` new` ensures the error is correctly initialized .
150
150
151
151
⚠ eslint - plugin - unicorn (throw - new -error ): Require ` new` when throwing an error .
152
152
╭─[throw_new_error .tsx :1 :7 ]
153
153
1 │ throw (( getGlobalThis ().Error ))()
154
154
· ─────────────────────────────
155
155
╰────
156
- help : While it ' s possible to create a new error without using the `new` keyword, it ' s better to be explicit .
156
+ help : Using ` new` ensures the error is correctly initialized .
0 commit comments