diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-18 00:08:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-18 00:08:51 +0300 |
commit | 9613d93025008a5326ddb624e2909feaa87e7977 (patch) | |
tree | 0a48921271f5ad0a31433626325f54b691d10fd6 /scripts/frontend | |
parent | 6f05d35c3160e3a442b40d6af1e8e584747080b3 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'scripts/frontend')
-rw-r--r-- | scripts/frontend/eslint.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/scripts/frontend/eslint.js b/scripts/frontend/eslint.js new file mode 100644 index 00000000000..2ba5976d1b9 --- /dev/null +++ b/scripts/frontend/eslint.js @@ -0,0 +1,22 @@ +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(); |