From fb945898c2751cdef5aaf7aa4878987bdab0172a Mon Sep 17 00:00:00 2001 From: SBrown52 Date: Fri, 24 Feb 2017 16:21:53 +0000 Subject: [PATCH] Update flow configuration documentation (#1518) * Update flow configuration documentation The documentation was missing creating the .flowconfig file * Update flow configuration documentation Adding in suggested changes * Wording * Wording --- packages/react-scripts/template/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/react-scripts/template/README.md b/packages/react-scripts/template/README.md index 28f3cb20bcf..2ca5f05404c 100644 --- a/packages/react-scripts/template/README.md +++ b/packages/react-scripts/template/README.md @@ -585,7 +585,8 @@ To add Flow to a Create React App project, follow these steps: 1. Run `npm install --save-dev flow-bin`. 2. Add `"flow": "flow"` to the `scripts` section of your `package.json`. -3. Add `// @flow` to any files you want to type check (for example, to `src/App.js`). +3. Run `npm run flow -- init` to create a [`.flowconfig` file](https://flowtype.org/docs/advanced-configuration.html) in the root directory. +4. Add `// @flow` to any files you want to type check (for example, to `src/App.js`). Now you can run `npm run flow` to check the files for type errors. You can optionally use an IDE like [Nuclide](https://nuclide.io/docs/languages/flow/) for a better integrated experience.