lint-staged-config-generator
Generate lint-staged configuration for running linters on staged Git files. Triggers on "create lint-staged config", "generate lint staged", "lint-staged setup", "staged file linting".
When & Why to Use This Skill
The Lint-Staged Config Generator is a specialized Claude skill designed to automate the creation of lint-staged configurations. It helps developers maintain high code quality by ensuring that linters and formatters run only on staged Git files, significantly speeding up the pre-commit process and preventing unformatted or buggy code from entering the repository. By generating optimized configuration files like .lintstagedrc.js, it streamlines the integration of tools like ESLint, Prettier, and Stylelint into the development workflow.
Use Cases
- Initial Project Setup: Quickly generate a complete lint-staged configuration for a new project to enforce coding standards from the first commit.
- Multi-Language Workflow: Create complex configurations that handle multiple file types (e.g., TypeScript, CSS, JSON) with specific linting rules for each.
- Pre-commit Optimization: Transition from running linters on the entire codebase to an efficient 'staged-only' approach to reduce local commit wait times.
- Standardizing Team Practices: Easily distribute and implement consistent lint-staged settings across multiple repositories or team members.
| name | lint-staged-config-generator |
|---|---|
| description | Generate lint-staged configuration for running linters on staged Git files. Triggers on "create lint-staged config", "generate lint staged", "lint-staged setup", "staged file linting". |
Lint-Staged Config Generator
Generate lint-staged configuration for running linters only on staged Git files.
Output Requirements
File Output: .lintstagedrc.js, lint-staged.config.js, or in package.json
Format: Valid lint-staged configuration
Standards: lint-staged 15.x
When Invoked
Immediately generate a complete lint-staged configuration for the project's file types.
Example Invocations
Prompt: "Create lint-staged config for TypeScript and CSS"
Output: Complete .lintstagedrc.js with ESLint, Prettier, and Stylelint.