DEPRECATED
eslint-fixer
Simple module which provides a promise based function to apply eslint --fix to given directory or files.
Usage
const fix = ; ;API
Functions
- fix(filePath, options) ⇒
Promise.<void> Executes
eslint --fixfor given filePath based on options.
Typedefs
- Options :
Object Options to determine fix function's behaviour.
fix(filePath, options) ⇒ Promise.<void>
Executes eslint --fix for given filePath based on options.
Kind: global function
Returns: Promise.<void> - - Result promise
| Param | Type | Description |
|---|---|---|
| filePath | string |
File path is passed to eslint --fix. |
| options | Options |
Options |
Options : Object
Options to determine fix function's behaviour.
Kind: global typedef
Properties
| Name | Type | Default | Description |
|---|---|---|---|
| checkAvailable | boolean |
false |
When true, eslint command availability is checked. If eslint is not available, eslint command will not be executed. |
| useEslint | boolean |
true |
When false, eslint command will not be executed. |