Chore: Fix packageJsonLint on some systems (#8721)

pull/8724/head
Henry Heino 2023-08-24 11:51:53 -07:00 committed by GitHub
parent ea60087788
commit bf41ed1b13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -2,6 +2,10 @@ import { execCommand, getRootDir } from '@joplin/utils';
import { chdir } from 'process'; import { chdir } from 'process';
const main = async () => { const main = async () => {
// Having no output seems to cause lint-staged to fail on some systems.
// Add a console.log statement to work around this issue.
console.log('Linting package.json files...');
const rootDir = await getRootDir(); const rootDir = await getRootDir();
chdir(rootDir); chdir(rootDir);
await execCommand('yarn run npmPkgJsonLint --configFile .npmpackagejsonlintrc.json --quiet .'); await execCommand('yarn run npmPkgJsonLint --configFile .npmpackagejsonlintrc.json --quiet .');