mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-23 10:53:34 +03:00
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:
parent
08309f8d88
commit
e11636b6f8
2
.github/hooks/pre-commit
vendored
2
.github/hooks/pre-commit
vendored
@ -3,7 +3,7 @@
|
||||
|
||||
[ -n "$CI" ] && exit 0
|
||||
|
||||
yarn lint-staged
|
||||
yarn lint-staged --relative
|
||||
lintStatus=$?
|
||||
|
||||
if [ $lintStatus -ne 0 ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user