eslint-fixer

0.1.5 • Public • Published

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.

Readme

Keywords

Package Sidebar

Install

npm i eslint-fixer

Weekly Downloads

46

Version

0.1.5

License

MIT

Unpacked Size

7.04 kB

Total Files

4

Last publish

Collaborators

  • ozum