fix(runFormat.ts): improve filtering in scriptNames
This commit is contained in:
parent
792d4262c8
commit
b349a819ba
@ -44,7 +44,12 @@ export function runFormat(params: { packageJsonFilePath: string }) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (const scriptName of ["format", "lint"]) {
|
||||
const scriptKeys = Object.keys(scripts);
|
||||
const scriptNames = scriptKeys.filter(scriptKey =>
|
||||
scriptKey.trim().match(/^(lint|format)/)
|
||||
);
|
||||
|
||||
for (const scriptName of scriptNames) {
|
||||
if (!(scriptName in scripts)) {
|
||||
continue;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user