Skip to content

Commit 2520af3

Browse files
camc314Copilot
andauthored
Update crates/oxc_linter/src/rules/typescript/no_restricted_types.rs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Cameron <cameron.clark@hey.com>
1 parent eff2e0b commit 2520af3

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

crates/oxc_linter/src/rules/typescript/no_restricted_types.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -255,10 +255,7 @@ impl Rule for NoRestrictedTypes {
255255
}
256256

257257
fn should_run(&self, ctx: &ContextHost) -> bool {
258-
if !ctx.source_type().is_typescript() || self.0.types.is_empty() {
259-
return false;
260-
}
261-
true
258+
ctx.source_type().is_typescript() && !self.0.types.is_empty()
262259
}
263260
}
264261

0 commit comments

Comments
 (0)