@theglitchking/gimme-the-lint 1.0.1 → 1.1.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.
Files changed (38) hide show
  1. package/.claude-plugin/marketplace.json +47 -0
  2. package/.claude-plugin/plugin.json +14 -40
  3. package/CHANGELOG.md +25 -0
  4. package/LICENSE +0 -0
  5. package/README.backup.md +310 -0
  6. package/README.md +307 -202
  7. package/agents/linting-agent.md +5 -0
  8. package/bin/gimme-the-lint.js +0 -0
  9. package/bin/postinstall.js +0 -0
  10. package/{.claude-plugin/commands → commands}/lint-baseline.md +4 -0
  11. package/{.claude-plugin/commands → commands}/lint-status.md +4 -0
  12. package/{.claude-plugin/commands → commands}/lint.md +20 -1
  13. package/githooks/install.sh +0 -0
  14. package/githooks/pre-commit +0 -0
  15. package/githooks/pre-push +0 -0
  16. package/install.sh +0 -0
  17. package/lib/config-manager.js +21 -5
  18. package/lib/directory-discovery.js +0 -0
  19. package/lib/drift-detector.js +0 -0
  20. package/lib/git-hooks-manager.js +0 -0
  21. package/lib/index.js +0 -0
  22. package/lib/installer.js +1 -1
  23. package/lib/manifest-manager.js +0 -0
  24. package/lib/venv-manager.js +0 -0
  25. package/package.json +2 -1
  26. package/scripts/dashboard.sh +26 -2
  27. package/scripts/eslint-baseline.sh +24 -1
  28. package/scripts/ruff-baseline.sh +24 -1
  29. package/scripts/run-checks.sh +28 -2
  30. package/scripts/setup-venv.sh +0 -0
  31. package/scripts/validate-version.sh +0 -0
  32. package/templates/.gitleaks.template.toml +0 -0
  33. package/templates/.pre-commit-config.template.yaml +0 -0
  34. package/templates/commitlint.config.template.js +0 -0
  35. package/templates/eslint.config.template.js +0 -0
  36. package/templates/pyproject.template.toml +0 -0
  37. package/templates/requirements.linting.txt +0 -0
  38. package/uninstall.sh +0 -0
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "gimme-the-lint-marketplace",
3
+ "owner": {
4
+ "name": "TheGlitchKing",
5
+ "email": "theglitchking@users.noreply.github.com"
6
+ },
7
+ "metadata": {
8
+ "description": "Official marketplace for gimme-the-lint - Progressive linting with directory-chunked baselines and drift detection",
9
+ "version": "1.1.2"
10
+ },
11
+ "plugins": [
12
+ {
13
+ "name": "gimme-the-lint",
14
+ "description": "Progressive linting system with directory-chunked baselines, drift detection, and auto-healing for monorepo projects (Python + JS/TS)",
15
+ "version": "1.1.2",
16
+ "author": {
17
+ "name": "TheGlitchKing"
18
+ },
19
+ "homepage": "https://github.com/TheGlitchKing/gimme-the-lint",
20
+ "repository": "https://github.com/TheGlitchKing/gimme-the-lint.git",
21
+ "license": "MIT",
22
+ "keywords": [
23
+ "linting",
24
+ "progressive-linting",
25
+ "eslint",
26
+ "ruff",
27
+ "python",
28
+ "monorepo",
29
+ "git-hooks",
30
+ "drift-detection",
31
+ "claude-code"
32
+ ],
33
+ "category": "productivity",
34
+ "tags": [
35
+ "linting",
36
+ "progressive",
37
+ "baseline",
38
+ "drift"
39
+ ],
40
+ "source": {
41
+ "source": "npm",
42
+ "package": "@theglitchking/gimme-the-lint"
43
+ },
44
+ "strict": true
45
+ }
46
+ ]
47
+ }
@@ -1,48 +1,22 @@
1
1
  {
2
2
  "name": "gimme-the-lint",
3
- "version": "1.0.0",
4
- "displayName": "Gimme The Lint",
5
- "description": "Progressive linting with directory-chunked baselines, drift detection, and auto-healing for monorepo projects",
3
+ "description": "Progressive linting system with directory-chunked baselines, drift detection, and auto-healing for monorepo projects (Python + JS/TS)",
4
+ "version": "1.1.2",
6
5
  "author": {
7
6
  "name": "TheGlitchKing",
8
- "email": "theglitchking@users.noreply.github.com",
9
- "github": "TheGlitchKing"
7
+ "email": "theglitchking@users.noreply.github.com"
10
8
  },
11
- "repository": {
12
- "type": "github",
13
- "owner": "TheGlitchKing",
14
- "repo": "gimme-the-lint",
15
- "url": "https://github.com/TheGlitchKing/gimme-the-lint"
16
- },
17
- "claudeCodeVersion": ">=1.0.0",
18
- "type": "claude-plugin",
19
- "category": "productivity",
20
- "tags": ["linting", "progressive-linting", "eslint", "ruff", "python", "monorepo", "git-hooks", "drift-detection"],
21
9
  "license": "MIT",
22
- "hooks": {},
23
- "commands": [
24
- {
25
- "name": "lint",
26
- "description": "Run progressive linting checks on the current project",
27
- "file": "commands/lint.md"
28
- },
29
- {
30
- "name": "lint:status",
31
- "description": "Show progressive linting dashboard with drift detection",
32
- "file": "commands/lint-status.md"
33
- },
34
- {
35
- "name": "lint:baseline",
36
- "description": "Create or refresh linting baselines",
37
- "file": "commands/lint-baseline.md"
38
- }
39
- ],
40
- "agents": [
41
- {
42
- "name": "linting-agent",
43
- "description": "Background agent that runs progressive linting and reports results",
44
- "type": "general-purpose",
45
- "file": "../agents/linting-agent.md"
46
- }
10
+ "homepage": "https://github.com/TheGlitchKing/gimme-the-lint",
11
+ "repository": "https://github.com/TheGlitchKing/gimme-the-lint",
12
+ "keywords": [
13
+ "linting",
14
+ "progressive-linting",
15
+ "eslint",
16
+ "ruff",
17
+ "python",
18
+ "monorepo",
19
+ "git-hooks",
20
+ "drift-detection"
47
21
  ]
48
22
  }
package/CHANGELOG.md CHANGED
@@ -5,6 +5,31 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.1.2] - 2026-04-11
9
+
10
+ ### Fixed
11
+ - Plugin manifest now passes `claude plugin validate`. Rewrote `.claude-plugin/plugin.json` to the minimal schema Claude Code actually accepts (dropped `displayName`, `claudeCodeVersion`, `type`, `commands`, `agents`, `hooks` — all of those were either unsupported keys or wrongly-shaped arrays that the validator rejected).
12
+ - Moved command definitions from `.claude-plugin/commands/*.md` → `commands/*.md` at the repo root (Claude Code's auto-discovery convention).
13
+ - Added YAML frontmatter (`description` field) to all three command files and to `agents/linting-agent.md`.
14
+
15
+ ### Added
16
+ - `.claude-plugin/marketplace.json` — registers gimme-the-lint as a standalone Claude Code marketplace, so users can install with `claude plugin install gimme-the-lint@gimme-the-lint-marketplace`.
17
+ - `commands/` added to npm `files` array so the plugin's slash commands actually ship in the tarball.
18
+
19
+ ## [1.1.1] - 2026-03-19
20
+
21
+ ### Fixed
22
+ - ESM project support: `initConfig()` now writes `gimme-the-lint.config.cjs` when the target project has `"type": "module"` in package.json
23
+ - `getConfig()` checks for `.cjs` first, then falls back to `.js`
24
+ - All shell scripts and `action.yml` use two-step config lookup (`.cjs` then `.js`)
25
+
26
+ ## [1.1.0] - 2026-03-19
27
+
28
+ ### Added
29
+ - Shell scripts now read `gimme-the-lint.config.js` for directory paths (`frontendDir`, `backendDir`, `srcDir`, `appDir`)
30
+ - Config-driven directory detection in `run-checks.sh`, `eslint-baseline.sh`, `ruff-baseline.sh`, `dashboard.sh`, and `action.yml` inline fallback
31
+ - Backward-compatible: if no config file exists, auto-detection falls through to existing logic
32
+
8
33
  ## [1.0.1] - 2026-02-03
9
34
 
10
35
  ### Changed
package/LICENSE CHANGED
File without changes
@@ -0,0 +1,310 @@
1
+ # gimme-the-lint
2
+
3
+ Progressive linting system with directory-chunked baselines, drift detection, and auto-healing for monorepo projects (Python + JS/TS).
4
+
5
+ **Only NEW violations block commits. Old violations are baselined and tracked for progressive cleanup.**
6
+
7
+ ## Features
8
+
9
+ - **Progressive Linting** - Baseline existing violations, only block new ones
10
+ - **Directory-Chunked Auto-Discovery** - Auto-detects production directories, scales without config
11
+ - **Manifest-Based Drift Detection** - Detects directory, config, time, and violation drift
12
+ - **Auto-Healing** - Manifests auto-update when re-running baselines
13
+ - **Python .venv Management** - Auto-creates virtual environment with ruff, mypy
14
+ - **Git Hooks** - Pre-commit (changed files only, ~30s) and pre-push (full lint)
15
+ - **GitHub Action** - CI/CD integration with PR comments
16
+ - **Claude Code Plugin** - /lint, /lint:status, /lint:baseline commands
17
+ - **LLM-Optimized** - Pre-commit output instructs Claude Code to auto-fix without asking
18
+
19
+ ## Quick Start
20
+
21
+ ```bash
22
+ # Install
23
+ npm install --save-dev @theglitchking/gimme-the-lint
24
+
25
+ # Initialize configs and Python venv
26
+ npx gimme-the-lint install
27
+
28
+ # Create baselines (capture existing violations)
29
+ npx gimme-the-lint baseline
30
+
31
+ # Install git hooks
32
+ npx gimme-the-lint hooks
33
+
34
+ # Check status
35
+ npx gimme-the-lint dashboard
36
+ ```
37
+
38
+ ## CLI Commands
39
+
40
+ | Command | Description |
41
+ |---------|-------------|
42
+ | `gimme-the-lint install` | Initialize configs, templates, and Python venv |
43
+ | `gimme-the-lint check` | Run progressive linting on changed files |
44
+ | `gimme-the-lint check --fix` | Auto-fix violations |
45
+ | `gimme-the-lint check --all` | Lint entire codebase |
46
+ | `gimme-the-lint check --frontend-only` | Frontend only |
47
+ | `gimme-the-lint check --backend-only` | Backend only |
48
+ | `gimme-the-lint baseline` | Create/refresh baselines (frontend + backend) |
49
+ | `gimme-the-lint baseline frontend` | Frontend baselines only |
50
+ | `gimme-the-lint baseline backend` | Backend baselines only |
51
+ | `gimme-the-lint dashboard` | Show linting status dashboard |
52
+ | `gimme-the-lint hooks` | Install git hooks |
53
+ | `gimme-the-lint venv setup` | Setup Python virtual environment |
54
+ | `gimme-the-lint venv status` | Show venv status |
55
+ | `gimme-the-lint status` | Show overall plugin status |
56
+ | `gimme-the-lint uninstall` | Remove plugin from project |
57
+
58
+ ## How It Works
59
+
60
+ ### Progressive Linting
61
+
62
+ Traditional linting blocks all commits if any violations exist. For large codebases with thousands of existing violations, this makes adoption impossible.
63
+
64
+ **gimme-the-lint** takes a different approach:
65
+
66
+ 1. **Baseline** - Capture all existing violations at a point in time
67
+ 2. **Gate** - Only NEW violations (not in baseline) block commits
68
+ 3. **Track** - Monitor progress as old violations are gradually fixed
69
+ 4. **Scale** - Per-directory baselines mean only changed directories are re-checked
70
+
71
+ ### Directory-Chunked Auto-Discovery
72
+
73
+ Instead of configuring which directories to lint, gimme-the-lint automatically discovers all production directories:
74
+
75
+ ```
76
+ frontend/src/
77
+ api/ <- auto-discovered
78
+ components/ <- auto-discovered
79
+ features/ <- auto-discovered
80
+ hooks/ <- auto-discovered
81
+ __tests__/ <- excluded (test directory)
82
+ e2e/ <- excluded (test directory)
83
+
84
+ backend/app/
85
+ routers/ <- auto-discovered
86
+ services/ <- auto-discovered
87
+ models/ <- auto-discovered
88
+ tests/ <- excluded (test directory)
89
+ __pycache__/ <- excluded
90
+ ```
91
+
92
+ When you add a new directory, it's automatically included in the next baseline run. No config changes needed.
93
+
94
+ ### Drift Detection
95
+
96
+ gimme-the-lint creates manifest files that track baseline state. On every run, it checks for 4 types of drift:
97
+
98
+ | Drift Type | What Changed | Auto-Action |
99
+ |-----------|-------------|-------------|
100
+ | **Directory** | New/removed directories | Warns, auto-heals on re-baseline |
101
+ | **Config** | Linter config file changed | Warns baseline may be stale |
102
+ | **Time** | Baseline >30 days old | Suggests refresh |
103
+ | **Violation** | Count changed vs baseline | Shows progress/regression |
104
+
105
+ ### Manifest Format
106
+
107
+ ```json
108
+ {
109
+ "created_at": "2026-02-03T00:00:00Z",
110
+ "tool": "eslint",
111
+ "version": "9.0.0",
112
+ "directories_baselined": ["api", "components", "features", "hooks"],
113
+ "total_directories": 4,
114
+ "total_violations": 42,
115
+ "config_hash": "abc123def456",
116
+ "test_excluded": ["__tests__", "e2e", "*.test.*"]
117
+ }
118
+ ```
119
+
120
+ ## GitHub Action
121
+
122
+ Use gimme-the-lint in your CI/CD pipeline:
123
+
124
+ ```yaml
125
+ # .github/workflows/lint.yml
126
+ name: Lint
127
+ on:
128
+ pull_request:
129
+ branches: [main]
130
+
131
+ permissions:
132
+ contents: read
133
+ pull-requests: write
134
+
135
+ jobs:
136
+ lint:
137
+ runs-on: ubuntu-latest
138
+ steps:
139
+ - uses: actions/checkout@v4
140
+ with:
141
+ fetch-depth: 0
142
+
143
+ - uses: TheGlitchKing/gimme-the-lint@v1
144
+ with:
145
+ mode: progressive # or 'full'
146
+ frontend: true
147
+ backend: true
148
+ comment-on-pr: true # Posts results as PR comment
149
+ ```
150
+
151
+ ### Action Inputs
152
+
153
+ | Input | Default | Description |
154
+ |-------|---------|-------------|
155
+ | `mode` | `progressive` | `progressive` (changed files) or `full` (entire codebase) |
156
+ | `fix` | `false` | Auto-fix violations |
157
+ | `frontend` | `true` | Enable ESLint checks |
158
+ | `backend` | `true` | Enable Ruff checks |
159
+ | `python-version` | `3.13` | Python version for backend |
160
+ | `node-version` | `22` | Node.js version |
161
+ | `comment-on-pr` | `true` | Post results as PR comment |
162
+
163
+ ### Action Outputs
164
+
165
+ | Output | Description |
166
+ |--------|-------------|
167
+ | `frontend-status` | `pass`, `fail`, or `skip` |
168
+ | `backend-status` | `pass`, `fail`, or `skip` |
169
+ | `drift-detected` | `true` if baseline drift detected |
170
+ | `violations-count` | Number of new violations found |
171
+
172
+ ## Claude Code Integration
173
+
174
+ gimme-the-lint integrates with Claude Code as a plugin:
175
+
176
+ ```
177
+ /lint Run progressive linting checks
178
+ /lint:status Show dashboard with drift detection
179
+ /lint:baseline Create or refresh baselines
180
+ ```
181
+
182
+ ### LLM Pre-Commit Workflow
183
+
184
+ When a commit fails due to linting, the pre-commit hook outputs LLM-specific instructions:
185
+
186
+ ```
187
+ For LLMs (Claude Code):
188
+ AUTOMATICALLY run: gimme-the-lint check --fix
189
+ Re-stage files and retry commit
190
+ ONLY ask user if manual fixes needed after auto-fix
191
+ ```
192
+
193
+ ## Project Structure
194
+
195
+ ```
196
+ gimme-the-lint/
197
+ ├── action.yml # GitHub Action (composite)
198
+ ├── package.json # npm package
199
+ ├── install.sh # Global install script
200
+ ├── uninstall.sh # Uninstall script
201
+ ├── bin/
202
+ │ ├── gimme-the-lint.js # CLI entry point
203
+ │ └── postinstall.js # Post-install message
204
+ ├── scripts/
205
+ │ ├── run-checks.sh # Progressive linting
206
+ │ ├── dashboard.sh # Status dashboard
207
+ │ ├── eslint-baseline.sh # Frontend baseline creator
208
+ │ ├── ruff-baseline.sh # Backend baseline creator
209
+ │ ├── setup-venv.sh # Python venv setup
210
+ │ └── validate-version.sh # Pre-publish validation
211
+ ├── lib/
212
+ │ ├── index.js # Module exports
213
+ │ ├── directory-discovery.js # Auto-discover directories
214
+ │ ├── manifest-manager.js # Manifest CRUD
215
+ │ ├── drift-detector.js # Drift detection & auto-healing
216
+ │ ├── venv-manager.js # Python venv management
217
+ │ ├── config-manager.js # Config templates
218
+ │ ├── git-hooks-manager.js # Git hooks install/uninstall
219
+ │ └── installer.js # Interactive setup
220
+ ├── templates/
221
+ │ ├── eslint.config.template.js
222
+ │ ├── pyproject.template.toml
223
+ │ ├── .gitleaks.template.toml
224
+ │ ├── commitlint.config.template.js
225
+ │ ├── .pre-commit-config.template.yaml
226
+ │ └── requirements.linting.txt
227
+ ├── githooks/
228
+ │ ├── pre-commit
229
+ │ ├── pre-push
230
+ │ └── install.sh
231
+ ├── .claude-plugin/
232
+ │ ├── plugin.json
233
+ │ └── commands/
234
+ │ ├── lint.md
235
+ │ ├── lint-status.md
236
+ │ └── lint-baseline.md
237
+ ├── agents/
238
+ │ └── linting-agent.md
239
+ └── .github/workflows/
240
+ └── lint.template.yml # Workflow template for consumers
241
+ ```
242
+
243
+ ## Configuration
244
+
245
+ Create `gimme-the-lint.config.js` in your project root (auto-generated by `gimme-the-lint install`):
246
+
247
+ ```javascript
248
+ module.exports = {
249
+ projectType: 'monorepo', // 'monorepo', 'frontend', 'backend'
250
+ frontendDir: 'frontend',
251
+ backendDir: 'backend',
252
+ srcDir: 'src',
253
+ appDir: 'app',
254
+ };
255
+ ```
256
+
257
+ ## Supported Project Structures
258
+
259
+ | Structure | Frontend | Backend |
260
+ |-----------|----------|---------|
261
+ | Monorepo | `frontend/src/` | `backend/app/` |
262
+ | Frontend-only | `src/` | - |
263
+ | Backend-only | - | `app/` |
264
+
265
+ ## Requirements
266
+
267
+ - **Node.js** >= 18.0.0
268
+ - **Python** >= 3.8 (for backend linting)
269
+ - **Git** (for hooks and changed file detection)
270
+ - **ESLint** >= 9.0.0 (frontend, peer dependency)
271
+ - **jq** (for manifest operations in shell scripts)
272
+
273
+ ## Roadmap
274
+
275
+ ### v1.1 - Enhanced Linter Support
276
+ - Support for additional Python linters (pylint, flake8)
277
+ - Support for legacy JS linters (TSLint)
278
+ - Custom rule presets
279
+ - Parallel directory processing (lint multiple dirs concurrently)
280
+ - Team dashboard (weekly health scorecard)
281
+
282
+ ### v1.2 - Observability & Integrations
283
+ - Web dashboard (localhost:3000/lint-dashboard)
284
+ - VS Code extension integration
285
+ - Slack/Discord notifications for CI failures
286
+ - Drift history tracking (timeline of baseline changes)
287
+ - Automated baseline refresh (scheduled via cron)
288
+
289
+ ### v2.0 - Multi-Language & Enterprise
290
+ - Multi-language support (Go, Rust, Java)
291
+ - Cloud-based baseline storage
292
+ - Team collaboration features
293
+ - AI-powered violation triage (auto-prioritize fixes)
294
+ - Cross-repo baseline sharing (enterprise feature)
295
+
296
+ ## Marketplace
297
+
298
+ This plugin is published to the [Glitch Kingdom Marketplace](https://github.com/TheGlitchKing/glitch-kingdom-of-plugins):
299
+
300
+ ```bash
301
+ # Via Claude marketplace
302
+ /plugin install TheGlitchKing/gimme-the-lint
303
+
304
+ # Via npm
305
+ npm install -g @theglitchking/gimme-the-lint
306
+ ```
307
+
308
+ ## License
309
+
310
+ MIT - see [LICENSE](LICENSE)