format: apply repo prettier (3.8.1) to the folded skills tree
963 markdown files reformatted with the repository's pinned prettier so pnpm format:check covers the folded tree like every other repo file. The formatter's embedded-language pass also normalized code fences (TS semicolons, closed HTML tags in examples, lowercased CSS hex colors, one renumbered list that skipped an index). Alphanumeric token deltas vs the fold commit were audited file-by-file; all are formatter-equivalent markup normalizations plus the four sanitized skills.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: lint
|
||||
description: "Enforce zero-tolerance linting on every code change. This skill MUST be followed after writing or modifying any code file. Run the project linter, fix ALL violations, and never cut corners. Triggers on: lint, delint, fix lint errors, clean up code, run linter."
|
||||
description: 'Enforce zero-tolerance linting on every code change. This skill MUST be followed after writing or modifying any code file. Run the project linter, fix ALL violations, and never cut corners. Triggers on: lint, delint, fix lint errors, clean up code, run linter.'
|
||||
---
|
||||
|
||||
# Lint — Zero Tolerance
|
||||
@@ -27,16 +27,16 @@ This is not optional. This is not "nice to have." This is a hard gate.
|
||||
|
||||
Check for these in order:
|
||||
|
||||
| File / Config | Linter | Command |
|
||||
|---------------|--------|---------|
|
||||
| `biome.json` or `biome.jsonc` | Biome | `pnpm biome check --write .` or `npx biome check --write .` |
|
||||
| `.eslintrc.*` or `eslint.config.*` or `package.json` has `eslint` | ESLint | `pnpm lint` or `npx eslint --fix .` |
|
||||
| `pyproject.toml` with `[tool.ruff]` | Ruff | `ruff check --fix .` |
|
||||
| `pyproject.toml` with `[tool.flake8]` or `.flake8` | Flake8 | `flake8 .` |
|
||||
| `pyproject.toml` with `[tool.pylint]` or `.pylintrc` | Pylint | `pylint **/*.py` |
|
||||
| `.rubocop.yml` | RuboCop | `rubocop -a .` |
|
||||
| `Cargo.toml` | Clippy | `cargo clippy --fix` |
|
||||
| `.golangci.yml` | golangci-lint | `golangci-lint run --fix` |
|
||||
| File / Config | Linter | Command |
|
||||
| ----------------------------------------------------------------- | ------------- | ----------------------------------------------------------- |
|
||||
| `biome.json` or `biome.jsonc` | Biome | `pnpm biome check --write .` or `npx biome check --write .` |
|
||||
| `.eslintrc.*` or `eslint.config.*` or `package.json` has `eslint` | ESLint | `pnpm lint` or `npx eslint --fix .` |
|
||||
| `pyproject.toml` with `[tool.ruff]` | Ruff | `ruff check --fix .` |
|
||||
| `pyproject.toml` with `[tool.flake8]` or `.flake8` | Flake8 | `flake8 .` |
|
||||
| `pyproject.toml` with `[tool.pylint]` or `.pylintrc` | Pylint | `pylint **/*.py` |
|
||||
| `.rubocop.yml` | RuboCop | `rubocop -a .` |
|
||||
| `Cargo.toml` | Clippy | `cargo clippy --fix` |
|
||||
| `.golangci.yml` | golangci-lint | `golangci-lint run --fix` |
|
||||
|
||||
Also check `package.json` scripts for a `lint` or `lint:fix` command — prefer the project's configured command over raw tool invocations.
|
||||
|
||||
@@ -64,7 +64,9 @@ If the project doesn't have a `lint` script, run the detected tool directly (see
|
||||
## Step 3: Fix All Violations
|
||||
|
||||
### Auto-fixable violations
|
||||
|
||||
Most linters have a `--fix` flag. Use it first:
|
||||
|
||||
```bash
|
||||
pnpm lint --fix
|
||||
# or
|
||||
@@ -74,25 +76,28 @@ ruff check --fix .
|
||||
```
|
||||
|
||||
### Manual violations
|
||||
|
||||
After auto-fix, re-run the linter without `--fix`. For each remaining error:
|
||||
|
||||
1. Read the rule name and understand WHY it exists
|
||||
2. Fix the code to comply with the rule
|
||||
3. Do NOT add a disable comment
|
||||
|
||||
### Common violations and correct fixes
|
||||
|
||||
| Violation | Wrong Fix | Right Fix |
|
||||
|-----------|-----------|-----------|
|
||||
| `no-unused-vars` | `// eslint-disable-next-line` | Delete the unused variable |
|
||||
| `@typescript-eslint/no-explicit-any` | `// eslint-disable` | Add a proper type |
|
||||
| `prefer-const` | Ignore it | Change `let` to `const` |
|
||||
| `no-console` | `// eslint-disable` | Use the project's logger |
|
||||
| Import order | Ignore it | Let auto-fix sort imports |
|
||||
| `any` type | `as unknown as Type` | Define the correct type |
|
||||
| Violation | Wrong Fix | Right Fix |
|
||||
| ------------------------------------ | ----------------------------- | -------------------------- |
|
||||
| `no-unused-vars` | `// eslint-disable-next-line` | Delete the unused variable |
|
||||
| `@typescript-eslint/no-explicit-any` | `// eslint-disable` | Add a proper type |
|
||||
| `prefer-const` | Ignore it | Change `let` to `const` |
|
||||
| `no-console` | `// eslint-disable` | Use the project's logger |
|
||||
| Import order | Ignore it | Let auto-fix sort imports |
|
||||
| `any` type | `as unknown as Type` | Define the correct type |
|
||||
|
||||
### The only acceptable exception
|
||||
|
||||
If fixing a violation would require a major refactor outside your task scope:
|
||||
|
||||
1. Do NOT disable the rule
|
||||
2. Document it as a deferred item with rationale
|
||||
3. Create a follow-up task/issue for the fix
|
||||
|
||||
Reference in New Issue
Block a user