Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion crates/oxc_linter/src/generated/rule_runner_impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3541,7 +3541,13 @@ impl RuleRunner for crate::rules::unicorn::prefer_negative_index::PreferNegative
}

impl RuleRunner for crate::rules::unicorn::prefer_node_protocol::PreferNodeProtocol {
const NODE_TYPES: Option<&AstTypesBitset> = None;
const NODE_TYPES: Option<&AstTypesBitset> = Some(&AstTypesBitset::from_types(&[
AstType::CallExpression,
AstType::ExportNamedDeclaration,
AstType::ImportDeclaration,
AstType::ImportExpression,
AstType::TSImportEqualsDeclaration,
]));
const RUN_FUNCTIONS: RuleRunFunctionsImplemented = RuleRunFunctionsImplemented::Run;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ impl Rule for PreferNodeProtocol {
AstKind::ExportNamedDeclaration(export) => {
export.source.as_ref().map(|item| (item.value, item.span))
}
_ => None,
_ => return,
};
let Some((string_lit_value, span)) = string_lit_value_with_span else {
return;
Expand Down
Loading