Skip to content

Commit e110476

Browse files
committed
style(linter): reformat code (#13573)
Follow-on after #13138. Just code reformatting (inc codegen-generated code).
1 parent 7128fb5 commit e110476

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

crates/oxc_linter/src/generated/rule_runner_impls.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#![allow(clippy::needless_pass_by_value)]
55

66
use oxc_ast::AstType;
7-
87
use oxc_semantic::AstTypesBitset;
98

109
use crate::rule::RuleRunner;

crates/oxc_linter/src/rule.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ pub trait RuleRunner: Rule {
7676
(Self::NODE_TYPES, Self::ANY_NODE_TYPE)
7777
}
7878
}
79+
7980
pub trait RuleMeta {
8081
const NAME: &'static str;
8182

tasks/linter_codegen/src/main.rs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
#![allow(clippy::print_stdout)]
2-
use std::fmt::Write as _;
3-
use std::io::Write as _;
4-
use std::process::{Command, Stdio};
5-
use std::{collections::BTreeSet, fs, io, path::Path};
2+
3+
use std::{
4+
collections::BTreeSet,
5+
fmt::Write as _,
6+
fs,
7+
io::{self, Write as _},
8+
path::Path,
9+
process::{Command, Stdio},
10+
};
611

712
use convert_case::{Case, Casing};
813
use syn::{Expr, ExprIf, File, Pat, Path as SynPath, Stmt}; // keep syn in scope for parse_file used elsewhere
@@ -24,7 +29,7 @@ pub fn generate_rule_runner_impls() -> io::Result<()> {
2429
out.push_str("// Auto-generated code, DO NOT EDIT DIRECTLY!\n");
2530
out.push_str("// To regenerate: `cargo run -p oxc_linter_codegen`\n\n");
2631
out.push_str("#![allow(clippy::needless_pass_by_value)]\n\n");
27-
out.push_str("use oxc_ast::AstType;\n\n");
32+
out.push_str("use oxc_ast::AstType;\n");
2833
out.push_str("use oxc_semantic::AstTypesBitset;\n\n");
2934
out.push_str("use crate::rule::RuleRunner;\n\n");
3035

0 commit comments

Comments
 (0)