safeword 0.5.1 → 0.5.2

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.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "CLI for setting up and managing safeword development environments",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,15 +1,73 @@
1
1
  ---
2
- description: Run ESLint and Prettier on the project, fix auto-fixable issues
2
+ description: Run all linters and formatters on the project
3
3
  ---
4
4
 
5
5
  # Lint
6
6
 
7
- Run project linting and fix issues.
7
+ Run the full linting and formatting suite on the project.
8
8
 
9
- ## Usage
9
+ ## Instructions
10
10
 
11
+ Run the following commands based on what's available in the project. Check for each tool before running.
12
+
13
+ ### JavaScript/TypeScript (if package.json exists)
14
+
15
+ ```bash
16
+ # Prettier (format all supported files)
17
+ npx prettier --write "**/*.{js,jsx,ts,tsx,mjs,cjs,vue,svelte,astro,json,css,scss,html,yaml,yml,graphql,md}" --ignore-path .gitignore 2>/dev/null || true
18
+
19
+ # ESLint (lint and fix JS/TS files)
20
+ npx eslint --fix "**/*.{js,jsx,ts,tsx,mjs,cjs,vue,svelte,astro}" --ignore-path .gitignore 2>&1 || true
21
+ ```
22
+
23
+ ### Markdown (if .md files exist)
24
+
25
+ ```bash
26
+ # markdownlint
27
+ npx markdownlint-cli2 --fix "**/*.md" "#node_modules" 2>&1 || true
28
+ ```
29
+
30
+ ### Python (if .py files exist and ruff is installed)
31
+
32
+ ```bash
33
+ # Check if ruff is available
34
+ if command -v ruff &> /dev/null; then
35
+ ruff format .
36
+ ruff check --fix .
37
+ fi
11
38
  ```
12
- /lint
39
+
40
+ ### Go (if .go files exist)
41
+
42
+ ```bash
43
+ # Check if go is available
44
+ if command -v go &> /dev/null; then
45
+ go fmt ./...
46
+ # Run go vet for static analysis
47
+ go vet ./... 2>&1 || true
48
+ fi
49
+ ```
50
+
51
+ ### Rust (if Cargo.toml exists)
52
+
53
+ ```bash
54
+ # Check if cargo is available
55
+ if command -v cargo &> /dev/null; then
56
+ cargo fmt
57
+ # Run clippy for lints
58
+ cargo clippy --fix --allow-dirty --allow-staged 2>&1 || true
59
+ fi
13
60
  ```
14
61
 
15
- Runs ESLint and Prettier on the project. Auto-fixes what it can, reports remaining issues.
62
+ ### TypeScript Type Checking (if tsconfig.json exists)
63
+
64
+ ```bash
65
+ npx tsc --noEmit 2>&1 || true
66
+ ```
67
+
68
+ ## Summary
69
+
70
+ After running, report:
71
+ 1. Number of files formatted/fixed
72
+ 2. Any remaining errors that couldn't be auto-fixed
73
+ 3. Type errors (if TypeScript)