Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Jul 3, 2024
1 parent e9c090f commit 8aa466f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ mod tests {
common::{errors::ColorConfig, FilePathMapping, SourceMap, GLOBALS},
ecma::{
ast::Program,
parser::{EsConfig, Syntax, TsConfig},
parser::{EsSyntax, Syntax, TsSyntax},
},
};

Expand All @@ -247,13 +247,13 @@ mod tests {
let options = ParseOptions {
is_module: IsModule::Unknown,
syntax: if file_path.ends_with(".ts") || file_path.ends_with(".tsx") {
Syntax::Typescript(TsConfig {
Syntax::Typescript(TsSyntax {
tsx: true,
decorators: true,
..Default::default()
})
} else {
Syntax::Es(EsConfig {
Syntax::Es(EsSyntax {
jsx: true,
decorators: true,
..Default::default()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use turbopack_binding::swc::{
core::{
common::{chain, FileName, Mark},
ecma::{
parser::{EsConfig, Syntax},
parser::{EsSyntax, Syntax},
transforms::{
base::resolver,
testing::{test_fixture, FixtureTestConfig},
Expand All @@ -26,7 +26,7 @@ use turbopack_binding::swc::{
};

fn syntax() -> Syntax {
Syntax::Es(EsConfig {
Syntax::Es(EsSyntax {
jsx: true,
..Default::default()
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use turbopack_binding::swc::{
core::{
common::{chain, comments::SingleThreadedComments, FileName, Mark, SyntaxContext},
ecma::{
parser::{EsConfig, Syntax},
parser::{EsSyntax, Syntax},
transforms::{
base::resolver,
react::jsx,
Expand All @@ -40,7 +40,7 @@ use turbopack_binding::swc::{
};

fn syntax() -> Syntax {
Syntax::Es(EsConfig {
Syntax::Es(EsSyntax {
jsx: true,
..Default::default()
})
Expand Down
8 changes: 3 additions & 5 deletions packages/next-swc/crates/next-custom-transforms/tests/full.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@ use std::path::{Path, PathBuf};

use next_custom_transforms::chain_transforms::{custom_before_pass, TransformOptions};
use serde::de::DeserializeOwned;
use swc_core::ecma::parser::TsSyntax;
use turbopack_binding::swc::{
core::{
base::Compiler,
common::{comments::SingleThreadedComments, Mark},
ecma::{
parser::{Syntax, TsConfig},
transforms::base::pass::noop,
},
ecma::{parser::Syntax, transforms::base::pass::noop},
},
testing::{NormalizedOutput, Tester},
};
Expand Down Expand Up @@ -49,7 +47,7 @@ fn test(input: &Path, minify: bool) {
} else {
None
},
syntax: Some(Syntax::Typescript(TsConfig {
syntax: Some(Syntax::Typescript(TsSyntax {
tsx: true,
..Default::default()
})),
Expand Down

0 comments on commit 8aa466f

Please sign in to comment.