-
-
Notifications
You must be signed in to change notification settings - Fork 32
Advanced Config
Amila Welihinda edited this page Mar 22, 2019
·
1 revision
Here are some examples of changing the recommended configs:
Add this line to the 'rules' section of your .eslintrc
to report flow warnings.
"flowtype-errors/show-warnings": "warn"
Note that flow won't report warnings unless you add this setting to your .flowconfig
:
[options]
include_warnings=true
Add this line to the 'rules' section of your .eslintrc
to enforce a minimum percentage of flow coverage per file (optional). Here's an example of enforcing a converage of at least 50%:
"flowtype-errors/enforce-min-coverage": ["error", 50]
Add this line to the 'plugins' section of your .eslintrc
"flowtype-errors"
Add the @flow
pragma to files that you want to lint
Also make sure that your .flowconfig
is in the root of your project directory
/**
* @flow
*/
Step 3. Settings (optional)
Add this line to the 'settings' section of your .eslintrc
to force the Flow server to stop after it finishes checking types.
"settings": {
"flowtype-errors": {
"stopOnExit": true
}
},