File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
crates/oxc_linter/src/rules/react Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -205,15 +205,13 @@ impl Rule for JsxHandlerNames {
205
205
event_handler_prop_prefixes = s;
206
206
}
207
207
}
208
- if let Some ( raw) = options. get ( "checkInlineFunction" ) {
209
- if let Some ( v) = raw. as_bool ( ) {
210
- check_inline_functions = v;
211
- }
208
+ if let Some ( v) = options. get ( "checkInlineFunction" ) . and_then ( serde_json:: Value :: as_bool)
209
+ {
210
+ check_inline_functions = v;
212
211
}
213
- if let Some ( raw) = options. get ( "checkLocalVariables" ) {
214
- if let Some ( v) = raw. as_bool ( ) {
215
- check_local_variables = v;
216
- }
212
+ if let Some ( v) = options. get ( "checkLocalVariables" ) . and_then ( serde_json:: Value :: as_bool)
213
+ {
214
+ check_local_variables = v;
217
215
}
218
216
if let Some ( names) = options. get ( "ignoreComponentNames" ) {
219
217
if let Some ( arr) = names. as_array ( ) {
You can’t perform that action at this time.
0 commit comments