Skip to content

Commit

Permalink
Merge pull request #858 from feross/feross/flow
Browse files Browse the repository at this point in the history
readme: Add more specific Flow instructions
  • Loading branch information
feross authored Apr 13, 2017
2 parents 1e66bdf + 3c64877 commit 8aa90ea
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -486,25 +486,43 @@ Before using a custom JS language variant, consider whether the added complexity

`standard` supports ESLint plugins. Use one of these to transform your code into
valid JavaScript before `standard` sees it. To use a custom parser, install it from
npm (example: `npm install eslint-plugin-flowtype`) and run:
npm and run:

```bash
$ standard --plugin flowtype
$ standard --plugin PLUGIN_NAME
```

Or, add this to `package.json`:

```json
{
"standard": {
"plugins": [ "flowtype" ]
"plugins": [ "PLUGIN_NAME" ]
}
}
```

To use Flow, you need to use `babel-eslint` as your parser. So, run
`npm install eslint-plugin-flowtype babel-eslint`, then run:

```bash
$ standard --plugin flowtype --parser babel-eslint
```

Or, add this to `package.json`:

```json
{
"standard": {
"plugins": [ "flowtype" ],
"parser": "babel-eslint"
}
}
```

If `standard` is installed globally (i.e. `npm install standard --global`), then
be sure to install `eslint-plugin-flowtype` globally as well, with
`npm install eslint-plugin-flowtype -g`.
`npm install eslint-plugin-flowtype --global`.

*Note: `plugin` and `plugins` are equivalent.*

Expand Down

0 comments on commit 8aa90ea

Please sign in to comment.