eslint-fixer

Promise based function to apply `eslint --fix` to given directory or files.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
eslint-fixer
0.1.56 years ago7 years agoMinified + gzip package size for eslint-fixer in KB

Readme

DEPRECATED
eslint-fixer
Simple module which provides a promise based function to apply eslint --fix to given directory or files.
Usage
const fix = require("eslint-fixer");

fix("./my-file.js")
  .then(result => doSomething())
  .catch(err => console.error(err));
API

Functions

fix(filePath, options)Promise.<void>

Executes eslint --fix for 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. |