Skip to content
This repository has been archived by the owner on Mar 27, 2020. It is now read-only.

Latest commit

 

History

History

plugin-lib-eslint

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

🚷 plugin-lib-eslint

npm linux windows coverage deps

Lint and/or fix code using ESLint.

Install

$ yarn add --dev @start/plugin-lib-eslint
# or
$ npm install --save-dev @start/plugin-lib-eslint

Usage

Signature

eslint(options?: {}, formatter?: string)

options

ESLint CLIEngine options.

Default:

{
  cache: true,
  cacheLocation: 'node_modules/.cache/eslint'
}

formatter

ESLint formatter.

Example

import sequence from '@start/plugin-sequence'
import findGitStaged from '@start/plugin-find-git-staged'
import read from '@start/plugin-read'
import eslint from '@start/plugin-lib-eslint'

export const task = () =>
  sequence(
    findGitStaged('src/**/*.js'),
    read,
    eslint({
      rules: {
        'no-undef': 'error'
      }
    })
  )
import sequence from '@start/plugin-sequence'
import find from '@start/plugin-find'
import read from '@start/plugin-read'
import eslint from '@start/plugin-lib-eslint'
import overwrite from '@start/plugin-overwrite'

export const task = () =>
  sequence(
    find('src/**/*.js'),
    read,
    eslint({ fix: true }),
    overwrite
  )