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

feature request: treat Flow files as TypeScript #1178

Open
vegerot opened this issue Jan 10, 2024 · 2 comments
Open

feature request: treat Flow files as TypeScript #1178

vegerot opened this issue Jan 10, 2024 · 2 comments

Comments

@vegerot
Copy link
Contributor

vegerot commented Jan 10, 2024

Flow files frequently have // @flow annotations at the top of them. From my testing, telling quick-lint that flow files are typescript(react) doesn't add any false positives.

While not perfect, it's better than nothing.

Request: When quick-lint sees a @flow annotation, treat it as TypeScript

@strager
Copy link
Collaborator

strager commented Jan 10, 2024

Flow files should be treated as Flow, not TypeScript. There are important differences in syntax.

I do not plan on implementing Flow parsing support in quick-lint-js any time soon. However, quick-lint-js should probably detect @flow and not parse the file in this case. Would that be a good enough solution for you?

@vegerot
Copy link
Contributor Author

vegerot commented Jan 10, 2024

quick-lint-js should probably detect @flow and not parse the file in this case. Would that be a good enough solution for you?

No. This would break my current workaround of :set ft=typescriptreact. quick-lint works well enough for the flow project I'm working on (React)

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