|
22 | 22 | "_diff:fail": "git diff --name-only --exit-code || exit 1",
|
23 | 23 | "_fail": "exit 1",
|
24 | 24 | "_filename-error": "echo 'ERROR: the following files violate naming conventions; fix using: `npm run fix:filenames`'; echo; npm run -s _ls-bad-filenames; exit 1",
|
| 25 | + "_fix:trailing-spaces": "find content -name '*.md' -exec perl -i -pe 's/[ \t]+$//g' {} +", |
25 | 26 | "_get:no": "echo SKIPPING get operation",
|
26 | 27 | "_get:submodule": "set -x && git submodule update --init ${DEPTH:- --depth 999}",
|
27 | 28 | "_hugo": "hugo --cleanDestinationDir",
|
|
68 | 69 | "fix:dict": "find content layouts -name \"*.md\" -print0 | xargs -0 scripts/normalize-cspell-front-matter.pl",
|
69 | 70 | "fix:expired": "npm run -s check:expired -- -q | xargs -r -I {} sh -c 'echo \"Deleting expired file: {}\" && rm {}'",
|
70 | 71 | "fix:filenames": "npm run _rename-to-kebab-case",
|
71 |
| - "fix:format": "npm run format", |
| 72 | + "fix:format": "npm run format; npm run _fix:trailing-spaces", |
72 | 73 | "fix:htmltest-config": "scripts/htmltest-config.sh",
|
73 | 74 | "fix:i18n:all": "scripts/check-i18n.sh -a -c HEAD",
|
74 | 75 | "fix:i18n:drifted": "scripts/check-i18n.sh -c HEAD",
|
75 | 76 | "fix:i18n:new": "scripts/check-i18n.sh -n -c HEAD",
|
76 | 77 | "fix:i18n": "npm run fix:i18n:new",
|
77 |
| - "fix:markdown": "npm run check:markdown -- --fix", |
78 |
| - "fix:refcache": "npm run check:links", |
| 78 | + "fix:markdown": "npm run check:markdown -- --fix; echo '\nTrimming trailing whitespace'; npm run _fix:trailing-spaces", |
79 | 79 | "fix:refcache:refresh": "npm run _refcache:prune -- -n ${PRUNE_N:-128}",
|
| 80 | + "fix:refcache": "npm run check:links", |
80 | 81 | "fix:submodule": "npm run pin:submodule",
|
81 | 82 | "fix:text": "npm run check:text -- --fix",
|
82 | 83 | "fix": "npm run fix:all",
|
|
0 commit comments