-
Notifications
You must be signed in to change notification settings - Fork 25.1k
Use flow-bin to typecheck locally, update ESLint to 2.0 #6145
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
Conversation
|
@facebook-github-bot import |
|
Thanks for importing. If you are an FB employee go to Phabricator to review. |
package.json
Outdated
| "scripts": { | ||
| "test": "NODE_ENV=test jest", | ||
| "lint": "eslint Examples/ Libraries/", | ||
| "test": "NODE_ENV=test node_modules/jest-cli/bin/jest.js", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this shouldn't be necessary? npm install creates a .bin folder in node_modules with a jest executable. npm run adds this to the $PATH.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cpojer My bad. For some reason it didn't work for me last time I tried. Will update the PR.
|
Can you clarify the "use local tools"? Your explanation doesn't make sense in the context of how npm works. It might make sense for flow, but not for jest or eslint. |
|
@cpojer Updated! |
|
@satya164 updated the pull request. |
|
Waiting for @cpojer to approve this. |
|
Yeah I think this makes more sense. |
|
Thanks for doing this! Please hold on with merging this until Travis tests are back to green to be safe. |
|
Added tag so that we come back to this next week |
|
@satya164 maybe we can remove global flow install in Travis then? |
|
@bestander done! |
|
@satya164 updated the pull request. |
1 similar comment
|
@satya164 updated the pull request. |
|
@satya164 updated the pull request. |
|
e2e tests are still broken so we can't merge this yet, thanks for the patience. |
|
@facebook-github-bot import |
|
Thanks for importing. If you are an FB employee go to Phabricator to review. |
|
shipping... |
Summary:Using local version of the Flow make it easy to have project specific version instead of relying on the user to have the correct version installed globally. For example, React Native uses an older version of Flow, while I have the latest version installed. Now I cannot typecheck the code because my version doesn't match the `.flowconfig`. **Test plan (required)** Run `npm run lint` and `npm run flow` to run `eslint` and `flow`. cc bestander mkonicek Closes facebook#6145 Reviewed By: dmmiller Differential Revision: D2976616 Pulled By: bestander fb-gh-sync-id: bb08f6f8ceb09f644ec1d45c40b4cb7a9d3cfef5 shipit-source-id: bb08f6f8ceb09f644ec1d45c40b4cb7a9d3cfef5
Using local version of the Flow make it easy to have project specific version instead of relying on the user to have the correct version installed globally. For example, React Native uses an older version of Flow, while I have the latest version installed. Now I cannot typecheck the code because my version doesn't match the
.flowconfig.Test plan (required)
Run
npm run lintandnpm run flowto runeslintandflow.cc @bestander @mkonicek