UNPKG

376 BPlain TextView Raw
1import { ESLint } from '@berun/fluent-eslint'
2import Berun from '@berun/berun'
3import presetESlint from './preset'
4import { ruleESlint } from './rule'
5
6export default (berun: Berun, opts = {}) => {
7 const options = Object.assign(berun.options, opts)
8
9 berun.use(ESLint)
10 berun.use(presetESlint, options)
11 if ('webpack' in berun) {
12 berun.use(ruleESlint, options)
13 }
14}