build: bind eslint plugin to generator

This commit is contained in:
helloqian12138 2021-12-20 21:46:38 +08:00
parent 8fc99d2a25
commit 1979f56f34
2 changed files with 10 additions and 3 deletions

View File

@ -1,4 +1,6 @@
import path from 'path';
import { IBundleOptions } from 'father-build/src/types';
import eslint from '@rollup/plugin-eslint';
const options: IBundleOptions = {
cjs: { type: 'rollup' },
@ -30,6 +32,12 @@ const options: IBundleOptions = {
'@ant-design/icons',
],
],
extraRollupPlugins: [{
before: "babel",
plugins: [
eslint(path.resolve(__dirname, '.eslintrc.js')),
],
}],
pkgs: [
'drip-table',
'drip-table-generator',

View File

@ -14,9 +14,8 @@ const options: IBundleOptions = {
extraRollupPlugins: [{
before: "babel",
plugins: [
eslint({
configFile: path.resolve(__dirname, '.eslintrc.js'),
}),
eslint(path.resolve(__dirname, '.eslintrc.js')),
,
],
}],
pkgs: [