@start/plugin-lib-eslint
TypeScript icon, indicating that this package has built-in type declarations

3.0.0 • Public • Published

🚷 plugin-lib-eslint

Lint and/or fix code using ESLint.

Install

$ yarn add --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
  )

Package Sidebar

Install

npm i @start/plugin-lib-eslint

Weekly Downloads

12

Version

3.0.0

License

MIT

Unpacked Size

5.52 kB

Total Files

5

Last publish

Collaborators

  • fosimus
  • psxcode
  • deepsweet