Skip to content

fix: move prettier-ignore statement so it works #729

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 1, 2024
Merged

Conversation

HookyGV
Copy link
Contributor

@HookyGV HookyGV commented Jan 20, 2024

Description

Solve the prettier formatting issue, but leave the comment in the head section. prettier-ignore will ignore following block (the module declaration) in this case.
See https://prettier.io/docs/en/ignore.html#javascript

Linked Issues

Same issue, different solution: PR #689

Additional context

@HookyGV HookyGV requested a review from antfu as a code owner January 20, 2024 03:36
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@@ -114,20 +114,14 @@ export function getDeclaration(ctx: Context, filepath: string, originalImports?:
directive: stringifyDeclarationImports({ ...originalImports?.directive, ...imports.directive }),
}

const head = ctx.options.version === 2.7
Copy link
Contributor Author

@HookyGV HookyGV Jan 20, 2024

Choose a reason for hiding this comment

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

Note that both paths here resolve to the same string, so this check is no longer required.

@HookyGV HookyGV changed the title fix: Move prettier-ignore statement so it works Move prettier-ignore statement so it works Jan 20, 2024
@antfu antfu changed the title Move prettier-ignore statement so it works fix: move prettier-ignore statement so it works May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants