|
7 | 7 | "__check:links": "make --keep-going check-links", |
8 | 8 | "__check:format:nowrap": "npm run _check:format:any -- --prose-wrap preserve", |
9 | 9 | "_build": "npm run _hugo -- -e dev --buildDrafts --buildFuture --baseURL \"${DEPLOY_PRIME_URL:-http://localhost}\"", |
10 | | - "__check:format": "./scripts/npx-helper.sh prettier", |
| 10 | + "__check:format": "./scripts/npx-helper.sh prettier --ignore-unknown", |
11 | 11 | "_check:format:any": "npm run __check:format -- --check --ignore-path ''", |
12 | 12 | "_check:format:nowrap": "npm run __check:format:nowrap -- content/ja content/uk content/zh", |
13 | 13 | "_check:format": "npm run __check:format -- --check .", |
|
24 | 24 | "_fail": "exit 1", |
25 | 25 | "_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", |
26 | 26 | "_fix:trailing-spaces": "find content -name '*.md' -exec perl -i -pe 's/[ \t]+$//g' {} +", |
27 | | - "_fix:format:diff": "npm run __check:format -- --write $(npm -s run _list:diff)", |
| 27 | + "_fix:format:diff": "npm run __check:format -- --write", |
28 | 28 | "_get:no": "echo SKIPPING get operation", |
29 | 29 | "_get:submodule": "set -x && git submodule update --init ${DEPTH:- --depth 999}", |
30 | 30 | "_hugo": "hugo --cleanDestinationDir", |
|
33 | 33 | "_list:check:*": "npm run --loglevel=warn | grep -Ee '^\\s*check:[^:]+$'", |
34 | 34 | "_list:check:for-test-and-fix": "npm -s run _list:check:* | grep -Ev \"i18n|${CMD_SKIP:-noop}\"", |
35 | 35 | "_list:dict": "grep '^\\s*\"@cspell' package.json | awk -F: '{print $1}' | tr -d '\"'", |
36 | | - "_list:diff": "git diff --name-only --diff-filter=AM", |
| 36 | + "_list:diff-never-empty": "echo README.md && npm run _list:diff", |
| 37 | + "_list:diff": "git diff --name-only --diff-filter=AMR", |
37 | 38 | "_list:fix:*": "npm run --loglevel=warn | grep -Ee '^\\s*fix:[^:]+$' | grep -v 'fix:all'", |
38 | 39 | "_list:fix:for-test-and-fix": "npm -s run _list:fix:* | grep -Ev \"i18n|refcache|submodule|${CMD_SKIP:-noop}\"", |
39 | 40 | "_ls-bad-filenames": "find assets content static -name '*_*' ! -name '[_.]*'", |
|
72 | 73 | "fix:dict": "find content layouts -name \"*.md\" -print0 | xargs -0 scripts/normalize-cspell-front-matter.pl", |
73 | 74 | "fix:expired": "npm run -s check:expired -- -q | xargs -r -I {} sh -c 'echo \"Deleting expired file: {}\" && rm {}'", |
74 | 75 | "fix:filenames": "npm run _rename-to-kebab-case", |
| 76 | + "fix:format:diff": "npm run _fix:format:diff -- $(npm -s run _list:diff-never-empty)", |
| 77 | + "fix:format:staged": "npm run _fix:format:diff -- $(npm -s run _list:diff-never-empty -- --cached)", |
75 | 78 | "fix:format": "npm run format; npm run _fix:trailing-spaces", |
76 | 79 | "fix:htmltest-config": "scripts/htmltest-config.sh", |
77 | 80 | "fix:i18n:status": "scripts/check-i18n.sh -D", |
|
0 commit comments