run-lint
รัน lint และแก้ code เพื่อให้ผ่าน โดยไม่ใช้ ignore patterns และห้ามแก้ไข config ไฟล์
SKILL.mdrun-lint/SKILL.md
GitHubGoal
Run lint and fix code so it passes, without using ignore patterns and handling unused variables appropriately, and never editing config files
Scope
Run lint for all project types and handle errors/warnings from the linter
Execute
Pre-Run: Always run
/deep-reviewfirst —run-*must be reviewed/assessed before the main work, never skip; if findings are blockers, fix or report before running (lint)
1. Run Lint
Goal: Run Lint
- Check the project type and lint config before running
- Run lint as defined in the config:
- For a monorepo: run
bun run lintorturbo lint - For a typical project: run the lint command per the config
- For a monorepo: run
- Wait for lint to finish before continuing
2. Analyze Errors
Goal: Analyze Errors
- Run
/deep-reviewto analyze and prioritize the errors produced by lint - Check the types of errors:
- config-related errors
- code-related errors
- unused variables
- type errors
- style violations
3. Fix Code Issues
Goal: Fix Code Issues
- Fix code-related errors in priority order
- For unused variables:
- Decide whether to delete them or implement them fully
- If they are a mock/placeholder, finish the implementation
- If truly unnecessary, delete them
- For type errors, fix the types to be correct
- For style violations, fix them per the conventions
4. Verify
Goal: Verify
- Run lint again to confirm
- Check that no errors/warnings remain
- Run all tests to confirm the code works
Rules
1. No Config Changes
Never edit any config file
- Do not edit biome.jsonc, eslint.config.js, tsconfig.json, or any other config file
- Fix the code to pass the existing lint rules
- If the config is unsuitable, notify the user instead of editing it yourself
2. Unused Variables
Handle unused variables appropriately
- Check whether they are a mock/placeholder
- If they are a mock/placeholder, finish the implementation
- If truly unnecessary, delete them
- Avoid using ignore comments
3. Error Resolution
Fix problems at the source rather than suppressing them
- Fix the code to pass the lint rules
- Avoid using ignore comments/attributes
- Use
/resolve-errorswhen needed
4. Verification
Check that the code still works normally
- Run lint again to confirm
- Run all tests
- Check that there are no regressions
- Run
/follow-tool-knipto check that every file is used - Never use unsafe / no-verify / bypass flags with linters, formatters, validators, and githooks (e.g.
--unsafe,--allow-unsafe,--no-verify,-n,--bypass) - Use /run-format if needed
Expected Outcome
- Code that passes lint with no errors/warnings
- Every file is used, with no unused files
- A report of the lint run