@digitoimistodude/code-quality-checks 2.1.4 → 2.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.husky/_/applypatch-msg +2 -0
- package/.husky/_/commit-msg +2 -0
- package/.husky/_/h +22 -0
- package/.husky/_/husky.sh +9 -0
- package/.husky/_/post-applypatch +2 -0
- package/.husky/_/post-checkout +2 -0
- package/.husky/_/post-commit +2 -0
- package/.husky/_/post-merge +2 -0
- package/.husky/_/post-rewrite +2 -0
- package/.husky/_/pre-applypatch +2 -0
- package/.husky/_/pre-auto-gc +2 -0
- package/.husky/_/pre-commit +2 -0
- package/.husky/_/pre-merge-commit +2 -0
- package/.husky/_/pre-push +2 -0
- package/.husky/_/pre-rebase +2 -0
- package/.husky/_/prepare-commit-msg +2 -0
- package/.husky/commit-msg +4 -5
- package/.husky/pre-commit +3 -3
- package/package.json +1 -1
package/.husky/_/h
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#!/usr/bin/env sh
|
|
2
|
+
[ "$HUSKY" = "2" ] && set -x
|
|
3
|
+
n=$(basename "$0")
|
|
4
|
+
s=$(dirname "$(dirname "$0")")/$n
|
|
5
|
+
|
|
6
|
+
[ ! -f "$s" ] && exit 0
|
|
7
|
+
|
|
8
|
+
if [ -f "$HOME/.huskyrc" ]; then
|
|
9
|
+
echo "husky - '~/.huskyrc' is DEPRECATED, please move your code to ~/.config/husky/init.sh"
|
|
10
|
+
fi
|
|
11
|
+
i="${XDG_CONFIG_HOME:-$HOME/.config}/husky/init.sh"
|
|
12
|
+
[ -f "$i" ] && . "$i"
|
|
13
|
+
|
|
14
|
+
[ "${HUSKY-}" = "0" ] && exit 0
|
|
15
|
+
|
|
16
|
+
export PATH="node_modules/.bin:$PATH"
|
|
17
|
+
sh -e "$s" "$@"
|
|
18
|
+
c=$?
|
|
19
|
+
|
|
20
|
+
[ $c != 0 ] && echo "husky - $n script failed (code $c)"
|
|
21
|
+
[ $c = 127 ] && echo "husky - command not found in PATH=$PATH"
|
|
22
|
+
exit $c
|
package/.husky/commit-msg
CHANGED
|
@@ -99,11 +99,10 @@ if [ -f "$commit_msg_file" ]; then
|
|
|
99
99
|
# Check for uncommitted files
|
|
100
100
|
uncommitted_files=$(git status --porcelain | wc -l | tr -d ' ')
|
|
101
101
|
if [ "$uncommitted_files" -gt 0 ]; then
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
fi
|
|
102
|
+
local msg="• You have $uncommitted_files uncommitted files"
|
|
103
|
+
local msg_len=${#msg}
|
|
104
|
+
local padding=$((56 - msg_len))
|
|
105
|
+
echo "${GREEN}║${NC} ${GREEN}${msg}${NC}$(printf '%*s' $padding '')${GREEN}║${NC}"
|
|
107
106
|
fi
|
|
108
107
|
|
|
109
108
|
# Check current branch
|
package/.husky/pre-commit
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# Ref: DEV-177, DEV-373, DEV-623
|
|
3
3
|
|
|
4
4
|
# Version:
|
|
5
|
-
VERSION="2.1.
|
|
5
|
+
VERSION="2.1.6 (2026-01-15)"
|
|
6
6
|
|
|
7
7
|
# Load configuration
|
|
8
8
|
# First check for local project config, then fall back to package default
|
|
@@ -740,7 +740,7 @@ if [ -n "$scss_files" ]; then
|
|
|
740
740
|
original_dir=$(pwd)
|
|
741
741
|
cd "$theme_dir_for_stylelint" || exit 1
|
|
742
742
|
|
|
743
|
-
if ! $stylelint_cmd --config "$stylelint_config" $relative_scss_files 2>/dev/null; then
|
|
743
|
+
if ! $stylelint_cmd --config "$stylelint_config" --max-warnings 0 $relative_scss_files 2>/dev/null; then
|
|
744
744
|
cd "$original_dir" || exit 1
|
|
745
745
|
echo "${RED}${CROSS} FAILED${NC}"
|
|
746
746
|
echo " ${RED}Stylelint found errors in SCSS files${NC}"
|
|
@@ -760,7 +760,7 @@ if [ -n "$scss_files" ]; then
|
|
|
760
760
|
fi
|
|
761
761
|
else
|
|
762
762
|
# Standalone: run from current directory
|
|
763
|
-
if ! $stylelint_cmd --config "$stylelint_config" $scss_files 2>/dev/null; then
|
|
763
|
+
if ! $stylelint_cmd --config "$stylelint_config" --max-warnings 0 $scss_files 2>/dev/null; then
|
|
764
764
|
echo "${RED}${CROSS} FAILED${NC}"
|
|
765
765
|
echo " ${RED}Stylelint found errors in SCSS files${NC}"
|
|
766
766
|
echo " ${YELLOW}Please fix the following files:${NC}"
|