-
Notifications
You must be signed in to change notification settings - Fork 7
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
Integrate type checking into Meteor #55
Comments
I agree that static type checking would be a great addition. The flow compiler could probably be integrated as a community package handling I also want to underline the fact that even with static type checking, we'll still need runtime type checking for all users inputs, particularly on the server side (currently handled by the |
+1 |
I believe it is possible to use Flow as an external tool together with Babel module, which is already available for Meteor. It is just required to use .jsx extension as it is the only one supported by babel module and flow. As for the runtime checking we could use this library https://github.com/gcanti/flowcheck. |
Hm, but it seems it is not possible to use Flow with CoffeeScript. :-( |
@awatson1978, I have tried that (not for Meteor, but anyway...) by integrating Dart into HarpJS static generator as one of the preprocessors - Dart compiler works extremely slow, so after a day of use I realised it was not very bright idea to use it in realtime. @mitar, that is possible with CoffeScript as well, but the way is a bit sophisticated. Flotate (https://github.com/jareware/flotate) should help. The code will be a bit ugly with all those comments but should work. As an option we could think about CoffeScript syntax extension, but I am still not sure what is better, to keep code nice looking or to keep compatibility. |
Has anyone made |
Is seems that Flow currently supports annotations in comments the same way flotate does. However, I see same problems here. |
I made my code start working with the
I guess the API interfaces problem can somehow be easily resolved, but I think the second one is kind of tricky. Here's the output of the
|
It's already in the ecmascript package: https://github.com/meteor/meteor/blob/devel/packages/ecmascript/README.md#syntax Search for "flow". |
Another possibility could be to fork the meteor remove modules
meteor remove ecmascript
meteor add someone:modules-flow
meteor add someone:ecmascript-flow (not sure which packages actually need to be forked, but just mentioning that the concept is probably not too hard to do) |
There are tools like Flow which provide some help in type checking JavaScript. How would one integrate this into the Meteor workflow? As a tinytest? Travis CI? Or something which runs every time during bundling?
The text was updated successfully, but these errors were encountered: