quick-lint-js icon indicating copy to clipboard operation
quick-lint-js copied to clipboard

feature request: treat Flow files as TypeScript

Open vegerot opened this issue 1 year ago • 2 comments

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

vegerot avatar Jan 10 '24 00:01 vegerot

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?

strager avatar Jan 10 '24 02:01 strager

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)

vegerot avatar Jan 10 '24 02:01 vegerot