Merge pull request #720 from sukvvon/fix/add-versatility-in-runFormat
fix(runFormat.ts): improve filtering in scriptNames
This commit is contained in:
commit
97c12c8a12
@ -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