Fixed execution path for lint commands in lint-staged

refs https://ghost.slack.com/archives/C02G9E68C/p1665497363885949

- we've seen an issue with `lint-staged` in the Admin package because it
  doesn't pick up the lint-todo file, so it incorrectly flags linting
  issues that we're ignoring
- this is happening because it runs the command from cwd, where the lint
  exclusion file does not exist
- thankfully, `lint-staged` has `--relative` which will run the command
  from the directory where the command is defined in config, so `ghost/admin`
  in our case, and that means the lint file is present and picked up
This commit is contained in:
Daniel Lockyer 2022-10-11 21:37:05 +07:00
parent 08309f8d88
commit e11636b6f8
No known key found for this signature in database

View File

@ -3,7 +3,7 @@
[ -n "$CI" ] && exit 0 [ -n "$CI" ] && exit 0
yarn lint-staged yarn lint-staged --relative
lintStatus=$? lintStatus=$?
if [ $lintStatus -ne 0 ]; then if [ $lintStatus -ne 0 ]; then