Skip to content

Commit e07c752

Browse files
authored
chore: support dynamic entry (#6)
1 parent d2cce1b commit e07c752

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@ export default (api: IApi) => {
77
return;
88
}
99

10+
const inputFolder =
11+
api?.config?.esm?.input || api?.config?.esm?.input || 'src/';
12+
1013
const { execSync } = require('child_process');
1114
execSync(
12-
"npx eslint src/ --ext .tsx,.ts --rule \"@typescript-eslint/consistent-type-exports: error\"",
15+
`npx eslint ${inputFolder} --ext .tsx,.ts --rule '@typescript-eslint/consistent-type-exports: error'`,
1316
{
1417
cwd: process.cwd(),
1518
env: process.env,

0 commit comments

Comments
 (0)