chore: better prettier error message
Description
This MR alters the npm run lint
script slightly to explain what went wrong.
Inspired by !1493 (comment 1831055842)
Before
Checking formatting...
[warn] README.md
[warn] Code style issues found in the above file. Run Prettier to fix.
Cleaning up project directory and file based variables 00:00
ERROR: Job failed: exit code 1
After
job log: https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/jobs/6477253483
> prettier --check '**/*.{js,ts,mjs,vue,json,md}' || echo 'Prettier failed. Use "npm run autofix" and push the fix.' && exit 1
Checking formatting...
[warn] README.md
[warn] Code style issues found in the above file. Run Prettier to fix.
Prettier failed. Use "npm run autofix" and push the fix.
Cleaning up project directory and file based variables 00:01
ERROR: Job failed: exit code 1
Edited by Tomas Vik (OOO back on 2024-06-18)