Linter Policeman
When to use this skill
- •Use before committing or when tests show linting/style failures.
- •Triggered by prompts to run or autofix style issues across the repo.
Instructions
- •
First Step: Ensure
eslintandprettierare installed andpackage.jsoncontainslintandformatscripts. - •
Second Step: Run
npm run lint -- --fixandnpm run formatand report files changed plus any remaining errors that require manual attention. - •
Third Step: Suggest rule tweaks or suppression only when justified; avoid disabling rules globally.
Examples
- •
npm run lint-> list of files with errors;npm run lint -- --fixto autocorrect.
Notes
- •Encourage using pre-commit hooks (Husky + lint-staged) so formatting occurs automatically.