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

Flowtype has extensive linting support through ESLint eslint-plugin-flowtype #49

Open
gajus opened this issue Dec 6, 2018 · 5 comments

Comments

@gajus
Copy link

gajus commented Dec 6, 2018

Might worth including in comparison that unlike TypeScript (?), FlowType has extensive linting support through ESLint https://github.com/gajus/eslint-plugin-flowtype plugin.

@oriSomething
Copy link
Contributor

Why saying so? I use https://github.com/bradzacher/eslint-plugin-typescript at work and it works great

@gajus
Copy link
Author

gajus commented Dec 6, 2018

@oriSomething The last I checked that project it didn't have many rules.

Now the two projects seem comparable (26 vs 34 rules).

@oriSomething
Copy link
Contributor

@gajus More to this compare:

  • A rule like use-flow-type isn't relevant to TS
  • There is a rule of valid-syntax which is overcome a Babylon bug. Not related to TS
  • There are 7 styling rules at Flow plugin comparing to 1 at TS plugin which all of them can be (and should) replaced by prettier
  • And more rules in the Flow plugin, that the counter to them, better used in already exist config of tsconfig.json

So, There is no real different here. It's just a personal preference

@niieani
Copy link
Owner

niieani commented Dec 6, 2018

I'm happy to add a PR with a comparison that takes into account all of the nuances that @oriSomething pointed out. On that note, keep in mind TypeScript also has tslint, so eslint isn't the only option, plus flow has some built-in lints.

@niieani
Copy link
Owner

niieani commented Nov 22, 2019

Btw. eslint now has type-based linting for TypeScript. It's still worth mentioning/comparing, but I think these are on par now.

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

3 participants