1.0.3 • Published 6 years ago

poi-preset-eslint-react v1.0.3

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

poi-preset-eslint-react

NPM version NPM downloads CircleCI donate

Run eslint as building react app using Poi

Install

yarn add poi-preset-eslint-react --dev

Usage

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

This preset activate in all mode!

Api

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 '*')

Examples

require('poi-preset-eslint-react')({
  loaderOptions: {
    mode: 'production', // only in `production` mode
    loaderOptions: {
      rules: {
        semi: 0 // ignore semi check
      }
    }
   }
})

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

poi-preset-eslint-react © zcong1993, Released under the MIT License. Authored and maintained by zcong1993 with help from contributors (list).

github.com/zcong1993 · GitHub @zcong1993