Skip to content

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
@bolt-new-by-stackblitz
Copy link

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

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