safeword 0.4.1 → 0.4.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "safeword",
3
- "version": "0.4.1",
3
+ "version": "0.4.3",
4
4
  "description": "CLI for setting up and managing safeword development environments",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,3 +1,7 @@
1
+ ---
2
+ description: Review code changes against project architecture guidelines and layer boundaries
3
+ ---
4
+
1
5
  # Architecture Review
2
6
 
3
7
  Review code changes against project architecture guidelines.
@@ -1,3 +1,7 @@
1
+ ---
2
+ description: Run ESLint and Prettier on the project, fix auto-fixable issues
3
+ ---
4
+
1
5
  # Lint
2
6
 
3
7
  Run project linting and fix issues.
@@ -8,4 +12,4 @@ Run project linting and fix issues.
8
12
  /lint
9
13
  ```
10
14
 
11
- Runs ESLint and reports any issues found.
15
+ Runs ESLint and Prettier on the project. Auto-fixes what it can, reports remaining issues.
@@ -1,3 +1,7 @@
1
+ ---
2
+ description: Deep code quality review with web research against latest docs and versions
3
+ ---
4
+
1
5
  # Quality Review
2
6
 
3
7
  Deep code quality review with web research.
@@ -13,7 +13,7 @@ file=$(echo "$input" | jq -r '.tool_input.file_path // .tool_input.notebook_path
13
13
 
14
14
  # Determine linters based on file extension
15
15
  case "$file" in
16
- *.js|*.jsx|*.ts|*.tsx|*.mjs|*.cjs|*.astro)
16
+ *.js|*.jsx|*.ts|*.tsx|*.mjs|*.cjs|*.astro|*.vue)
17
17
  # Prettier (silent, ignore errors)
18
18
  npx prettier --write "$file" 2>/dev/null
19
19
 
@@ -38,6 +38,30 @@ case "$file" in
38
38
  # Prettier only (silent, ignore errors)
39
39
  npx prettier --write "$file" 2>/dev/null
40
40
  ;;
41
+
42
+ *.py)
43
+ # Python: ruff format + ruff check --fix (silent, capture unfixable)
44
+ npx ruff format "$file" 2>/dev/null
45
+ errors=$(npx ruff check --fix "$file" 2>&1)
46
+ exit_code=$?
47
+ if [ $exit_code -ne 0 ] && [ -n "$errors" ]; then
48
+ echo "$errors"
49
+ fi
50
+ ;;
51
+
52
+ *.go)
53
+ # Go: gofmt (silent, capture errors)
54
+ if command -v gofmt &> /dev/null; then
55
+ gofmt -w "$file" 2>/dev/null
56
+ fi
57
+ ;;
58
+
59
+ *.rs)
60
+ # Rust: rustfmt (silent, capture errors)
61
+ if command -v rustfmt &> /dev/null; then
62
+ rustfmt "$file" 2>/dev/null
63
+ fi
64
+ ;;
41
65
  esac
42
66
 
43
67
  exit 0