-
-
Notifications
You must be signed in to change notification settings - Fork 633
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
Add Flowtype (WIP) #530
Add Flowtype (WIP) #530
Conversation
Changes Unknown when pulling 9af0cd8 on AlexKVal:flow into * on shakacode:master*. |
Review status: 0 of 7 files reviewed at latest revision, 1 unresolved discussion, some commit checks failed. node_package/src/context.js, line 5 [r1] (raw file):
I think it might be better to put // @flow as a separate line at the top, o/w it's lost in the comment description. Comments from Reviewable |
@AlexKVal Did we not need to add the params for flow? We should probably have this in the eslintrc, but only for the library, not the samples...
Review status: 0 of 7 files reviewed at latest revision, 1 unresolved discussion, some commit checks failed. node_package/src/context.js, line 5 [r1] (raw file):
|
Reviewed 7 of 7 files at r1. node_package/src/Authenticity.js, line 10 [r1] (raw file):
This needs to be string values in the object. Comments from Reviewable |
@alleycat-at-git thank you for the help. I wasn't sure what is the best way. @justin808 thank you for the rules for 'eslint'. I'll implement them one by one. |
src/Authenticity.js without {content?: string} it warns about > property `content` Property not found in HTMLElement
we don't need additional `console.history.length === 0` check ```js let line = [] line.join('\n') // results in '' ```
Nice work. A couple ideas. Reviewed 4 of 5 files at r2, 1 of 1 files at r3. node_package/src/Authenticity.js, line 10 [r3] (raw file):
It seems a bit odd for object properties to be a string. However, this is from the example (kval), so maybe we use
node_package/src/generatorFunction.js, line 12 [r3] (raw file):
https://flowtype.org/docs/union-intersection-types.html#_ This one is either React.createClass (probably an object) Then again, Comments from Reviewable |
Review status: all files reviewed at latest revision, 4 unresolved discussions. node_package/src/Authenticity.js, line 10 [r3] (raw file):
|
I will be gradually adding commits step by step to facilitate review and for earlier feedbacks.
I've started to learn flow. Yay _o_/ 😄
But IMHO
Adding flowtype annotations to the library is kinda Pandora's box.
It adds a lot of additional maintenance burden.
The first three commits:
green https://travis-ci.org/AlexKVal/react_on_rails/builds/153954865
src/Authenticity.js
without {content?: string} it warns about
because it is a dynamic property from
document.querySelector('meta[name="csrf-token"]')
The line
lib/generators/react_on_rails/templates/node/base/client/node/server.js
has been added to.eslintignore
because of #469 merging with linting errors 😈I'll remove it after the master branch will have resolved linting issues.
Notes about 'fsevents' bug
After a fresh
npm i
installation of all packages with node@6 versionrunning of
npm run build
orbuild-watch
throws this node's error:
babel-cli
useschokidar
which uses not the latestfsevents
npm i fsevents@latest
command solves the problem.The cause of it fsevents/fsevents#128
Probably we should add the latest
fsevents
version topackage.json
via
npm i -D fsevents@latest
command.Notes about Atom's
linter-flow
I've managed to get it working only with node@6.3.1 version (out of 6th versions)
linter-flow
doesn't work with the latest (at the moment) node@6.4.0. (w/o errors. it just doesn't show any warnings in Atom)This change is