1 | import { ESLint } from '@berun/fluent-eslint'
|
2 | import Berun from '@berun/berun'
|
3 | import presetESlint from './preset'
|
4 | import { ruleESlint } from './rule'
|
5 |
|
6 | export 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 | }
|