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
1 change: 1 addition & 0 deletions crates/swc_ecma_transformer/src/bugfix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use swc_ecma_hooks::VisitMutHook;
use crate::TraverseCtx;

#[derive(Debug, Default)]
#[non_exhaustive]
pub struct BugfixOptions {}

pub fn hook(options: BugfixOptions) -> impl VisitMutHook<TraverseCtx> {
Expand Down
1 change: 1 addition & 0 deletions crates/swc_ecma_transformer/src/decorators/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use swc_ecma_hooks::VisitMutHook;
use crate::TraverseCtx;

#[derive(Debug, Default)]
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The #[non_exhaustive] attribute should be placed on a separate line from #[derive(Debug, Default)] for better readability and consistency with Rust formatting conventions. It should be:

#[derive(Debug, Default)]
#[non_exhaustive]
pub struct DecoratorOptions {}

Copilot uses AI. Check for mistakes.
#[non_exhaustive]
pub struct DecoratorOptions {}

pub fn hook(options: DecoratorOptions) -> impl VisitMutHook<TraverseCtx> {
Expand Down
1 change: 1 addition & 0 deletions crates/swc_ecma_transformer/src/es2015/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use swc_ecma_hooks::VisitMutHook;
use crate::TraverseCtx;

#[derive(Debug, Default)]
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The #[non_exhaustive] attribute should be placed on a separate line from #[derive(Debug, Default)] for better readability and consistency with Rust formatting conventions. It should be:

#[derive(Debug, Default)]
#[non_exhaustive]
pub struct Es2015Options {}

Copilot uses AI. Check for mistakes.
#[non_exhaustive]
pub struct Es2015Options {}

pub fn hook(options: Es2015Options) -> impl VisitMutHook<TraverseCtx> {
Expand Down
1 change: 1 addition & 0 deletions crates/swc_ecma_transformer/src/es2016/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use swc_ecma_hooks::VisitMutHook;
use crate::TraverseCtx;

#[derive(Debug, Default)]
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The #[non_exhaustive] attribute should be placed on a separate line from #[derive(Debug, Default)] for better readability and consistency with Rust formatting conventions. It should be:

#[derive(Debug, Default)]
#[non_exhaustive]
pub struct Es2016Options {}

Copilot uses AI. Check for mistakes.
#[non_exhaustive]
pub struct Es2016Options {}

pub fn hook(options: Es2016Options) -> impl VisitMutHook<TraverseCtx> {
Expand Down
1 change: 1 addition & 0 deletions crates/swc_ecma_transformer/src/es2017/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use swc_ecma_hooks::VisitMutHook;
use crate::TraverseCtx;

#[derive(Debug, Default)]
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The #[non_exhaustive] attribute should be placed on a separate line from #[derive(Debug, Default)] for better readability and consistency with Rust formatting conventions. It should be:

#[derive(Debug, Default)]
#[non_exhaustive]
pub struct Es2017Options {}

Copilot uses AI. Check for mistakes.
#[non_exhaustive]
pub struct Es2017Options {}

pub fn hook(options: Es2017Options) -> impl VisitMutHook<TraverseCtx> {
Expand Down
1 change: 1 addition & 0 deletions crates/swc_ecma_transformer/src/es2018/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use swc_ecma_hooks::VisitMutHook;
use crate::TraverseCtx;

#[derive(Debug, Default)]
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The #[non_exhaustive] attribute should be placed on a separate line from #[derive(Debug, Default)] for better readability and consistency with Rust formatting conventions. It should be:

#[derive(Debug, Default)]
#[non_exhaustive]
pub struct Es2018Options {}

Copilot uses AI. Check for mistakes.
#[non_exhaustive]
pub struct Es2018Options {}

pub fn hook(options: Es2018Options) -> impl VisitMutHook<TraverseCtx> {
Expand Down
1 change: 1 addition & 0 deletions crates/swc_ecma_transformer/src/es2019/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use swc_ecma_hooks::VisitMutHook;
use crate::TraverseCtx;

#[derive(Debug, Default)]
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The #[non_exhaustive] attribute should be placed on a separate line from #[derive(Debug, Default)] for better readability and consistency with Rust formatting conventions. It should be:

#[derive(Debug, Default)]
#[non_exhaustive]
pub struct Es2019Options {}

Copilot uses AI. Check for mistakes.
#[non_exhaustive]
pub struct Es2019Options {}

pub fn hook(options: Es2019Options) -> impl VisitMutHook<TraverseCtx> {
Expand Down
1 change: 1 addition & 0 deletions crates/swc_ecma_transformer/src/es2020/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use swc_ecma_hooks::VisitMutHook;
use crate::TraverseCtx;

#[derive(Debug, Default)]
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The #[non_exhaustive] attribute should be placed on a separate line from #[derive(Debug, Default)] for better readability and consistency with Rust formatting conventions. It should be:

#[derive(Debug, Default)]
#[non_exhaustive]
pub struct Es2020Options {}

Copilot uses AI. Check for mistakes.
#[non_exhaustive]
pub struct Es2020Options {}

pub fn hook(options: Es2020Options) -> impl VisitMutHook<TraverseCtx> {
Expand Down
1 change: 1 addition & 0 deletions crates/swc_ecma_transformer/src/es2021/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use swc_ecma_hooks::VisitMutHook;
use crate::TraverseCtx;

#[derive(Debug, Default)]
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The #[non_exhaustive] attribute should be placed on a separate line from #[derive(Debug, Default)] for better readability and consistency with Rust formatting conventions. It should be:

#[derive(Debug, Default)]
#[non_exhaustive]
pub struct Es2021Options {}

Copilot uses AI. Check for mistakes.
#[non_exhaustive]
pub struct Es2021Options {}

pub fn hook(options: Es2021Options) -> impl VisitMutHook<TraverseCtx> {
Expand Down
1 change: 1 addition & 0 deletions crates/swc_ecma_transformer/src/es2022/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use swc_ecma_hooks::VisitMutHook;
use crate::TraverseCtx;

#[derive(Debug, Default)]
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The #[non_exhaustive] attribute should be placed on a separate line from #[derive(Debug, Default)] for better readability and consistency with Rust formatting conventions. It should be:

#[derive(Debug, Default)]
#[non_exhaustive]
pub struct Es2022Options {}

Copilot uses AI. Check for mistakes.
#[non_exhaustive]
pub struct Es2022Options {}

pub fn hook(options: Es2022Options) -> impl VisitMutHook<TraverseCtx> {
Expand Down
1 change: 1 addition & 0 deletions crates/swc_ecma_transformer/src/es2026/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use swc_ecma_hooks::VisitMutHook;
use crate::TraverseCtx;

#[derive(Debug, Default)]
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The #[non_exhaustive] attribute should be placed on a separate line from #[derive(Debug, Default)] for better readability and consistency with Rust formatting conventions. It should be:

#[derive(Debug, Default)]
#[non_exhaustive]
pub struct Es2026Options {}

Copilot uses AI. Check for mistakes.
#[non_exhaustive]
pub struct Es2026Options {}

pub fn hook(options: Es2026Options) -> impl VisitMutHook<TraverseCtx> {
Expand Down
1 change: 1 addition & 0 deletions crates/swc_ecma_transformer/src/jsx/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use swc_ecma_hooks::VisitMutHook;
use crate::TraverseCtx;

#[derive(Debug, Default)]
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The #[non_exhaustive] attribute should be placed on a separate line from #[derive(Debug, Default)] for better readability and consistency with Rust formatting conventions. It should be:

#[derive(Debug, Default)]
#[non_exhaustive]
pub struct JsxOptions {}

Copilot uses AI. Check for mistakes.
#[non_exhaustive]
pub struct JsxOptions {}

pub fn hook(options: JsxOptions) -> impl VisitMutHook<TraverseCtx> {
Expand Down
2 changes: 2 additions & 0 deletions crates/swc_ecma_transformer/src/options/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ pub use crate::{
};

#[derive(Debug, Default)]
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The #[non_exhaustive] attribute should be placed on a separate line from #[derive(Debug, Default)] for better readability and consistency with Rust formatting conventions. It should be:

#[derive(Debug, Default)]
#[non_exhaustive]
pub struct Options {

Copilot uses AI. Check for mistakes.
#[non_exhaustive]
pub struct Options {
pub typescript: Option<TypescriptOptions>,
pub decorator: Option<DecoratorOptions>,
Expand All @@ -15,6 +16,7 @@ pub struct Options {
}

Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The #[non_exhaustive] attribute should be placed on a separate line from #[derive(Debug, Default)] for better readability and consistency with Rust formatting conventions. It should be:

#[derive(Debug, Default)]
#[non_exhaustive]
pub struct EnvOptions {

Copilot uses AI. Check for mistakes.
#[derive(Debug, Default)]
#[non_exhaustive]
pub struct EnvOptions {
pub es2026: Es2026Options,
pub es2022: Es2022Options,
Expand Down
1 change: 1 addition & 0 deletions crates/swc_ecma_transformer/src/regexp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use crate::TraverseCtx;

/// If true, the syntax will be transformed.
#[derive(Debug, Default)]
#[non_exhaustive]
pub struct RegExpOptions {
/// [s/dotAll flag for regular expressions](https://tc39.github.io/proposal-regexp-dotall-flag/)
pub dot_all_regex: bool,
Expand Down
1 change: 1 addition & 0 deletions crates/swc_ecma_transformer/src/typescript/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use swc_ecma_hooks::VisitMutHook;
use crate::TraverseCtx;

#[derive(Debug, Default)]
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The #[non_exhaustive] attribute should be placed on a separate line from #[derive(Debug, Default)] for better readability and consistency with Rust formatting conventions. It should be:

#[derive(Debug, Default)]
#[non_exhaustive]
pub struct TypescriptOptions {}

Copilot uses AI. Check for mistakes.
#[non_exhaustive]
pub struct TypescriptOptions {}

pub fn hook(options: TypescriptOptions) -> impl VisitMutHook<TraverseCtx> {
Expand Down
Loading