File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -3541,7 +3541,13 @@ impl RuleRunner for crate::rules::unicorn::prefer_negative_index::PreferNegative
35413541}
35423542
35433543impl RuleRunner for crate :: rules:: unicorn:: prefer_node_protocol:: PreferNodeProtocol {
3544- const NODE_TYPES : Option < & AstTypesBitset > = None ;
3544+ const NODE_TYPES : Option < & AstTypesBitset > = Some ( & AstTypesBitset :: from_types ( & [
3545+ AstType :: CallExpression ,
3546+ AstType :: ExportNamedDeclaration ,
3547+ AstType :: ImportDeclaration ,
3548+ AstType :: ImportExpression ,
3549+ AstType :: TSImportEqualsDeclaration ,
3550+ ] ) ) ;
35453551 const RUN_FUNCTIONS : RuleRunFunctionsImplemented = RuleRunFunctionsImplemented :: Run ;
35463552}
35473553
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ impl Rule for PreferNodeProtocol {
6464 AstKind :: ExportNamedDeclaration ( export) => {
6565 export. source . as_ref ( ) . map ( |item| ( item. value , item. span ) )
6666 }
67- _ => None ,
67+ _ => return ,
6868 } ;
6969 let Some ( ( string_lit_value, span) ) = string_lit_value_with_span else {
7070 return ;
You can’t perform that action at this time.
0 commit comments