safeword 0.4.3 → 0.4.4

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.3",
3
+ "version": "0.4.4",
4
4
  "description": "CLI for setting up and managing safeword development environments",
5
5
  "type": "module",
6
6
  "bin": {
@@ -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|*.vue)
16
+ *.js|*.jsx|*.ts|*.tsx|*.mjs|*.cjs|*.astro|*.vue|*.svelte)
17
17
  # Prettier (silent, ignore errors)
18
18
  npx prettier --write "$file" 2>/dev/null
19
19
 
@@ -40,24 +40,26 @@ case "$file" in
40
40
  ;;
41
41
 
42
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"
43
+ # Python: ruff format + ruff check --fix
44
+ if command -v ruff &> /dev/null; then
45
+ ruff format "$file" 2>/dev/null
46
+ errors=$(ruff check --fix "$file" 2>&1)
47
+ exit_code=$?
48
+ if [ $exit_code -ne 0 ] && [ -n "$errors" ]; then
49
+ echo "$errors"
50
+ fi
49
51
  fi
50
52
  ;;
51
53
 
52
54
  *.go)
53
- # Go: gofmt (silent, capture errors)
55
+ # Go: gofmt
54
56
  if command -v gofmt &> /dev/null; then
55
57
  gofmt -w "$file" 2>/dev/null
56
58
  fi
57
59
  ;;
58
60
 
59
61
  *.rs)
60
- # Rust: rustfmt (silent, capture errors)
62
+ # Rust: rustfmt
61
63
  if command -v rustfmt &> /dev/null; then
62
64
  rustfmt "$file" 2>/dev/null
63
65
  fi