Skip to content
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

Idea: use jest-docblock for parsing comments #51

Open
phungtuanhoang1996 opened this issue Mar 10, 2023 · 1 comment
Open

Idea: use jest-docblock for parsing comments #51

phungtuanhoang1996 opened this issue Mar 10, 2023 · 1 comment

Comments

@phungtuanhoang1996
Copy link

Hi, I am trying to migrate to Typescript + strict mode on a legacy codebase and very interested in this project

This idea is pretty similar in concept to Prettier's --require-pragma (https://prettier.io/docs/en/options.html#require-pragma)

Prettier is using jest-docblock internally to parse its pragma and supports multiple comment types

// @format or
/** @format */ or even

/** 
 * @format
 * @some-other-pragmas
 */

would be great if we can put the @ts-strict or @ts-strict-ignore in the docblock as well, so all so-called pragmas are grouped in 1 docblock at the top of a file.

@kamkry
Copy link
Collaborator

kamkry commented Sep 4, 2023

Thank you for considering the idea. If we decide to implement this change, it would mean making adjustments to our migration script, which includes altering existing comments rather than just adding or removing them. If you believe this could be beneficial, please feel free to create a pull request with the suggested changes. Your input and contribution would be highly appreciated!

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

No branches or pull requests

2 participants