Skip to content

Commit

Permalink
update help and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
David B committed Dec 3, 2018
1 parent dff414a commit e881b81
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 21 deletions.
38 changes: 21 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,27 +43,31 @@ check-flow-annotation -h

Usage: check-flow-annotation.js [options] path1 path2 path3 etc

By default it checks every ".js" and ".jsx" in your project, but you can filter it with exclude option
By default it checks every ".js", ".jsx" and ".mjs" in your project,
but you can filter it with exclude option

Note that options are written "--option=value" but short version are written "-o value"
Note that options are written "--option=value"
but short versions are written "-o value"

--help, -h
Displays help information about this script
'index.js -h' or 'index.js --help'
--help, -h
Displays help information about this script
'index.js -h' or 'index.js --help'

--version
Displays version info
index.js --version
--version
Displays version info
index.js --version

--strict, -s
Force to check for "@flow strict"
--strict, -s
Force to check "@flow strict"

--exclude, -x
Allow to exclude certain paths or extensions, it‘s a comma separated value
example: 'build*','.src/static/*'
will be merged with default array: ['node_modules*', '.git*', 'flow-typed*', '.*', '!*.+(js|jsx|mjs)']
--exclude, -x
Allow to exclude certain paths or extensions, it‘s a comma separated value
example: 'build*','.src/static/*'
will be merged with default array:
['node_modules*', '.git*', 'flow-typed*', '.*', '!*.+(js|jsx|mjs)']

--check, -c
Set a custom check
'@flow weak' or '@no flow'

--check, -c
Set a custom check
'@flow weak' or '@no flow'
```
11 changes: 7 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,19 @@ function exec(inputArgs = argv) {
.info(
`Usage: check-flow-annotation.js [options] path1 path2 path3 etc
By default it checks every ".js" and ".jsx" in your project, but you can filter it with exclude option
By default it checks every ".js", ".jsx" and ".mjs" in your project,
but you can filter it with exclude option
Note that options are written "--option=value" but short versions are written "-o value"`
Note that options are written "--option=value"
but short versions are written "-o value"`
)
.version('v1.0')
.option([
{
name: 'strict',
short: 's',
type: 'boolean',
description: 'Force to check for "@flow strict"'
description: 'Force to check "@flow strict"'
},
{
name: 'exclude',
Expand All @@ -31,7 +33,8 @@ function exec(inputArgs = argv) {
description:
'Allow to exclude certain paths or extensions, it‘s a comma separated value',
example: `example: 'build*','.src/static/*'
will be merged with default array: ['node_modules*', '.git*', 'flow-typed*', '.*', '!*.+(js|jsx|mjs)']`
will be merged with default array:
['node_modules*', '.git*', 'flow-typed*', '.*', '!*.+(js|jsx|mjs)']`
},
{
name: 'check',
Expand Down

0 comments on commit e881b81

Please sign in to comment.