@spardutti/claude-skills 2.38.1 → 2.38.3
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.
|
@@ -46,8 +46,10 @@ js_misplaced() { # js_misplaced <path> <owner>
|
|
|
46
46
|
echo "sorted by kind first; it belongs in <domain>/<kind>/ or shared/<kind>/"
|
|
47
47
|
elif printf '%s' "$b" | grep -qE '^use[A-Z].*\.[jt]sx?$' && ! printf '%s' "/$f" | grep -qE '/(hooks|queries)/'; then
|
|
48
48
|
echo "a hook belongs in hooks/ or queries/"
|
|
49
|
+
# Stimulus loads *_controller.js from any depth under controllers/, so controllers/components/ is its kind folder.
|
|
49
50
|
elif printf '%s' "$b" | grep -qE "$STRUCTURE_KIND_FILE" \
|
|
50
|
-
&& ! printf '%s' "$parent" | grep -qxE 'routes|controllers|services|schemas|models|api|queries|types'
|
|
51
|
+
&& ! printf '%s' "$parent" | grep -qxE 'routes|controllers|services|schemas|models|api|queries|types' \
|
|
52
|
+
&& ! printf '%s' "/$f" | grep -qE '/controllers/(.+/)?[^/]+_controller\.[jt]s$'; then
|
|
51
53
|
echo "the kind is in the filename; it belongs in a kind folder"
|
|
52
54
|
fi
|
|
53
55
|
}
|