Skip to content

Commit

Permalink
chore: fix formatting issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
rzvxa committed Apr 18, 2024
1 parent ef3c912 commit 5cf4899
Show file tree
Hide file tree
Showing 12 changed files with 31 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use oxc_ast::{
ast::{Expression, MemberExpression}, dummy, AstKind
ast::{Expression, MemberExpression},
dummy, AstKind,
};
use oxc_diagnostics::{
miette::{self, Diagnostic},
Expand Down Expand Up @@ -96,7 +97,7 @@ impl Rule for BadArrayMethodOnArguments {
}
}
MemberExpression::PrivateFieldExpression(_) => {}
MemberExpression::Dummy => dummy!(unreachable)
MemberExpression::Dummy => dummy!(unreachable),
}
}
}
Expand Down
5 changes: 3 additions & 2 deletions crates/oxc_linter/src/rules/jest/prefer_spy_on.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ use oxc_ast::{
ast::{
Argument, AssignmentExpression, AssignmentTarget, CallExpression, Expression,
MemberExpression, SimpleAssignmentTarget,
}, dummy, AstKind
},
dummy, AstKind,
};
use oxc_diagnostics::{
miette::{self, Diagnostic},
Expand Down Expand Up @@ -156,7 +157,7 @@ impl PreferSpyOn {
formatter.print_str(format!("\'{name}\'").as_bytes());
}
MemberExpression::PrivateFieldExpression(_) => (),
MemberExpression::Dummy => dummy!(unreachable)
MemberExpression::Dummy => dummy!(unreachable),
}

formatter.print(b')');
Expand Down
5 changes: 3 additions & 2 deletions crates/oxc_linter/src/rules/jest/prefer_to_have_length.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use oxc_ast::{
ast::{Argument, CallExpression, Expression, MemberExpression}, dummy, AstKind
ast::{Argument, CallExpression, Expression, MemberExpression},
dummy, AstKind,
};
use oxc_diagnostics::{
miette::{self, Diagnostic},
Expand Down Expand Up @@ -102,7 +103,7 @@ impl PreferToHaveLength {
ctx,
),
MemberExpression::PrivateFieldExpression(_) => (),
MemberExpression::Dummy => dummy!(unreachable)
MemberExpression::Dummy => dummy!(unreachable),
};
}
Expression::CallExpression(expr_call_expr) => {
Expand Down
5 changes: 3 additions & 2 deletions crates/oxc_linter/src/rules/jest/valid_describe_callback.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use oxc_ast::{
ast::{Argument, Expression, FunctionBody, Statement}, dummy, AstKind
ast::{Argument, Expression, FunctionBody, Statement},
dummy, AstKind,
};
use oxc_diagnostics::{
miette::{self, Diagnostic},
Expand Down Expand Up @@ -141,7 +142,7 @@ fn run<'a>(possible_jest_node: &PossibleJestNode<'a, '_>, ctx: &LintContext<'a>)
Argument::SpreadElement(spreed_element) => {
diagnostic(ctx, spreed_element.span, Message::SecondArgumentMustBeFunction);
}
Argument::Dummy => dummy!(unreachable)
Argument::Dummy => dummy!(unreachable),
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use oxc_ast::{
ast::{JSXAttributeItem, JSXAttributeValue, JSXOpeningElement}, dummy, AstKind
ast::{JSXAttributeItem, JSXAttributeValue, JSXOpeningElement},
dummy, AstKind,
};
use oxc_diagnostics::{
miette::{self, Diagnostic},
Expand Down
3 changes: 2 additions & 1 deletion crates/oxc_linter/src/rules/react/jsx_key.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use oxc_ast::{
ast::{Expression, JSXAttributeItem, JSXAttributeName, JSXElement, JSXFragment, Statement}, dummy, AstKind
ast::{Expression, JSXAttributeItem, JSXAttributeName, JSXElement, JSXFragment, Statement},
dummy, AstKind,
};
use oxc_diagnostics::{
miette::{self, Diagnostic},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ use oxc_ast::{
ast::{
Argument, Expression, JSXAttributeItem, JSXAttributeName, JSXElementName,
ObjectPropertyKind, PropertyKey,
}, dummy, AstKind
},
dummy, AstKind,
};
use oxc_diagnostics::{
miette::{self, Diagnostic},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ use oxc_ast::{
ast::{
ClassElement, Declaration, ExportDefaultDeclarationKind, Expression, FunctionType,
ModuleDeclaration, PropertyKey, Statement, TSSignature,
}, dummy, AstKind
},
dummy, AstKind,
};
use oxc_diagnostics::{
miette::{self, Diagnostic},
Expand Down Expand Up @@ -98,7 +99,7 @@ fn get_kind_from_key(key: &PropertyKey) -> MethodKind {
| Expression::NullLiteral(_) => MethodKind::Quoted,
_ => MethodKind::Expression,
},
PropertyKey::Dummy => dummy!(unreachable)
PropertyKey::Dummy => dummy!(unreachable),
}
}

Expand Down
5 changes: 3 additions & 2 deletions crates/oxc_linter/src/rules/typescript/no_this_alias.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use oxc_ast::{
ast::{AssignmentTarget, BindingPatternKind, Expression, SimpleAssignmentTarget}, dummy, AstKind
ast::{AssignmentTarget, BindingPatternKind, Expression, SimpleAssignmentTarget},
dummy, AstKind,
};
use oxc_diagnostics::{
miette::{self, Diagnostic},
Expand Down Expand Up @@ -152,7 +153,7 @@ impl Rule for NoThisAlias {
}
}
},
AssignmentTarget::Dummy => dummy!(unreachable)
AssignmentTarget::Dummy => dummy!(unreachable),
}
}
_ => {}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
use std::collections::HashMap;

use oxc_ast::{
ast::{Declaration, ModuleDeclaration, Statement, TSModuleReference}, dummy, AstKind
ast::{Declaration, ModuleDeclaration, Statement, TSModuleReference},
dummy, AstKind,
};
use oxc_diagnostics::{
miette::{self, Diagnostic},
Expand Down Expand Up @@ -145,7 +146,7 @@ impl Rule for TripleSlashReference {
}
}
TSModuleReference::TypeName(_) => {}
TSModuleReference::Dummy => dummy!(unreachable)
TSModuleReference::Dummy => dummy!(unreachable),
}
}
Statement::ModuleDeclaration(st) => {
Expand Down
3 changes: 2 additions & 1 deletion crates/oxc_linter/src/rules/unicorn/no_useless_spread.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use oxc_ast::{
ast::{Argument, ArrayExpression, ArrayExpressionElement, CallExpression, Expression}, dummy, AstKind
ast::{Argument, ArrayExpression, ArrayExpressionElement, CallExpression, Expression},
dummy, AstKind,
};
use oxc_diagnostics::{
miette::{self, Diagnostic},
Expand Down
3 changes: 2 additions & 1 deletion crates/oxc_linter/src/utils/jest/parse_jest_fn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ use std::{borrow::Cow, cmp::Ordering};
use oxc_ast::{
ast::{
Argument, CallExpression, Expression, IdentifierName, IdentifierReference, MemberExpression,
}, dummy, AstKind
},
dummy, AstKind,
};
use oxc_semantic::AstNode;
use oxc_span::{Atom, Span};
Expand Down

0 comments on commit 5cf4899

Please sign in to comment.