lint-staged

Configure lint-staged to run linters on git-staged files in pre-commit hooks.

Updated Feb 19, 2026
One-click install
npx skills add https://github.com/trystan2k/padelbuddy --skill lint-staged
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lint-staged
Source: https://github.com/trystan2k/padelbuddy/tree/main/.opencode/skills/lint-staged
Command: npx skills add https://github.com/trystan2k/padelbuddy --skill lint-staged

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Configure lint-staged to run linters only on git-staged files as part of a pre-commit hook, keeping pre-commit checks fast and focused.

Core Features & Use Cases

  • Config file options: supports .lintstagedrc.json, .lintstagedrc.js/.mjs, or lint-staged config in package.json.
  • Scoped linting: runs on staged files only, enabling targeted linting for faster commits.
  • Tool integrations: integrates with Biome, ESLint, and Prettier, with performance tuning guidance.
  • Monorepo and edge cases: provides strategies for large repos and complex file patterns.

Quick Start

Create a basic lint-staged setup that runs Biome and ESLint/Prettier on staged JavaScript files.

Frequently Asked Questions about lint-staged

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run ESLint and Prettier only on staged files before committing?

You can run ESLint and Prettier on staged files by configuring lint-staged within a pre-commit hook, ensuring checks execute solely on changed code for faster commits.

Can I configure lint-staged using a .lintstagedrc file in a JavaScript monorepo?

Yes, lint-staged supports configuration via .lintstagedrc.json, .lintstagedrc.js, or package.json, providing glob patterns and strategies specifically for monorepo setups.

What is the best way to integrate lint-staged with Husky pre-commit hooks?

Integrating lint-staged with Husky involves configuring lint-staged to target staged files and triggering it through a Husky pre-commit hook to automate linting before commits.

Does lint-staged support running Biome alongside other linters concurrently?

Yes, lint-staged supports tool integrations with Biome, ESLint, and Prettier, allowing you to configure optional concurrent tasks to optimize pre-commit performance.

How do I handle complex glob patterns for staged files in large repositories?

For large repositories, lint-staged provides targeted strategies and complex file pattern handling via glob patterns to ensure pre-commit checks remain fast and focused.