debian-mirror-gitlab/scripts/frontend/eslint.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
512 B
JavaScript
Raw Normal View History

2022-07-16 23:28:13 +05:30
const { spawn } = require('child_process');
const runEslint = () => {
const [, , ...args] = process.argv;
const child = spawn(`yarn`, ['internal:eslint', ...args], {
stdio: 'inherit',
});
child.on('exit', (code) => {
process.exitCode = code;
if (code === 0) {
return;
}
console.log(`
If you are seeing @graphql-eslint offences, the local GraphQL schema dump might be outdated.
Consider updating it by running \`./scripts/dump_graphql_schema\`.
`);
});
};
runEslint();