Nylas-mail: PR: Initial support for flow

Created on 19 Oct 2016  路  6Comments  路  Source: nylas/nylas-mail

Projects of this scale can benefit from static type checking. I think adding flow support to nylas would be a great addition in terms of scalability. Flow can be run as an eslint rule so integration isnt very hard. Here's a demo of a plugin that can run flow as an eslint plugin:

ESLint Flow Demo

Thoughts? 馃榿

enhancement-request

Most helpful comment

@bengotow @emorikawa would love to help out with the integration! Lmk where I can help 馃榾.

All 6 comments

@amilajack Agreed! It's underway 馃槃

@emorikawa Great! Have you guys already started the migration to flow? Is there a branch for that?

There actually is! I'm not sure if it's public though? (cc @emorikawa). We're also looking to move our internal API documentation to http://documentation.js.org/ which is awesome because the flow type decorations get turned into @params in the docs.

@bengotow @emorikawa would love to help out with the integration! Lmk where I can help 馃榾.

Initial support for flow typechecking has landed on master, and we've been trying it out on a few files internally. At this point it doesn't look like we'll commit to updating the entire codebase to use Flow. The Flow docs (https://flowtype.org/docs/existing.html) mention:

Making previously-untyped code typecheck with Flow may take some time and work - and sometimes it may not be worth the effort in the short term.

It definitely seems like that's the case so far. We actually haven't found any bugs or issues with Flow yet!

I've experienced this as well. I've found flow much more useful for workflow when writing new code as opposed to running it on already tested code.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hazim1093 picture hazim1093  路  4Comments

winks picture winks  路  4Comments

chyupa picture chyupa  路  3Comments

dariosm picture dariosm  路  4Comments

danielbayley picture danielbayley  路  3Comments