JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 47
  • Score
    100M100P100Q61573F
  • License MIT

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

Package Exports

  • eslint-fixer

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (eslint-fixer) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

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.