2023-08-22 12:46:35 +02:00
|
|
|
import { execCommand, getRootDir } from '@joplin/utils';
|
|
|
|
import { chdir } from 'process';
|
|
|
|
|
|
|
|
const main = async () => {
|
2023-08-24 20:51:53 +02:00
|
|
|
// 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...');
|
|
|
|
|
2023-08-22 12:46:35 +02:00
|
|
|
const rootDir = await getRootDir();
|
|
|
|
chdir(rootDir);
|
2024-01-26 22:19:28 +02:00
|
|
|
await execCommand('yarn npmPkgJsonLint --configFile .npmpackagejsonlintrc.json --quiet .');
|
2023-08-22 12:46:35 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
main().catch((error) => {
|
|
|
|
console.error(error);
|
|
|
|
process.exit(1);
|
|
|
|
});
|