poi-preset-eslint

9.1.1 • Public • Published

poi-preset-eslint

Install

yarn add eslint poi-preset-eslint --dev

Usage

To use eslint during building:

module.exports = {
  presets: [
    require('poi-preset-eslint')(/* options */)
  ]
}

By default this preset is only activated in poi build.

To configure eslint, you can set eslintConfig in package.json or use a standalone config file like .eslintrc.

API

presetESLint

Add ESLint to build pipeline

Parameters

  • options Object (optional, default {})
    • options.loaderOptions any Options for eslint-loader. (optional, default undefined)
    • options.mode (string | Array<string>) In which mode to run ESLint. It could be a wildcard symbol * which means all modes, or an array of modes like ['production', 'test'] (optional, default 'production')

Examples

require('poi-preset-eslint')({
  loaderOptions: {
    configFile: '/path/to/.eslintrc',
    // Enforce our own ESLint config file
    useEslintrc: false
   }
})

License

MIT © EGOIST

Readme

Keywords

none

Package Sidebar

Install

npm i poi-preset-eslint

Weekly Downloads

8

Version

9.1.1

License

MIT

Last publish

Collaborators

  • rem