Skip to content

Commit 8aa90ea

Browse files
authored
Merge pull request #858 from feross/feross/flow
readme: Add more specific Flow instructions
2 parents 1e66bdf + 3c64877 commit 8aa90ea

File tree

1 file changed

+22
-4
lines changed

1 file changed

+22
-4
lines changed

README.md

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -486,25 +486,43 @@ Before using a custom JS language variant, consider whether the added complexity
486486

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

491491
```bash
492-
$ standard --plugin flowtype
492+
$ standard --plugin PLUGIN_NAME
493493
```
494494

495495
Or, add this to `package.json`:
496496

497497
```json
498498
{
499499
"standard": {
500-
"plugins": [ "flowtype" ]
500+
"plugins": [ "PLUGIN_NAME" ]
501+
}
502+
}
503+
```
504+
505+
To use Flow, you need to use `babel-eslint` as your parser. So, run
506+
`npm install eslint-plugin-flowtype babel-eslint`, then run:
507+
508+
```bash
509+
$ standard --plugin flowtype --parser babel-eslint
510+
```
511+
512+
Or, add this to `package.json`:
513+
514+
```json
515+
{
516+
"standard": {
517+
"plugins": [ "flowtype" ],
518+
"parser": "babel-eslint"
501519
}
502520
}
503521
```
504522

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

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

0 commit comments

Comments
 (0)