lintstagedrc

Generate a .lintstagedrc.json file to run ESLint and Prettier on staged files.

Updated Nov 20, 2025
One-click install
npx skills add https://github.com/sayali-ingle-pdl/adusa-ai-vuejs-app-template --skill lintstagedrc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lintstagedrc
Source: https://github.com/sayali-ingle-pdl/adusa-ai-vuejs-app-template/tree/main/.github/agents/app-starter/agents-context/skills/lintstagedrc
Command: npx skills add https://github.com/sayali-ingle-pdl/adusa-ai-vuejs-app-template --skill lintstagedrc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Generates a lint-staged configuration to automatically fix and format staged files before commit, ensuring code quality before every commit and reducing manual linting steps.

Core Features & Use Cases

  • Automatic fixes: Creates a lint-staged config and runs ESLint with --fix and Prettier on staged JavaScript, TypeScript, and Vue files.
  • Stylelint support: If Stylelint is present in the project, the configuration includes stylelint --fix for CSS/SCSS files to maintain styling consistency.
  • Safe pre-commit workflow: Encourages a deterministic pre-commit process by validating patterns, ensuring the recommended .lintstagedrc.json format, and guiding verification of CLI flags.

Quick Start

Generate a .lintstagedrc.json file at the project root to configure lint-staged for pre-commit fixes and formatting.

Frequently Asked Questions about lintstagedrc

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

FAQPage Schema
How do I run ESLint and Prettier automatically on staged files before a git commit?

To run ESLint and Prettier on staged files, generate a .lintstagedrc.json configuration at your project root. This setup automatically applies --fix and formatting commands to JavaScript, TypeScript, and Vue files during pre-commit workflows.

What is the best way to configure lint-staged for a Vue and TypeScript project?

Configuring lint-staged for Vue and TypeScript involves generating a .lintstagedrc.json file at the project root. This file targets specific file patterns and applies ESLint --fix and Prettier commands to enforce code quality before commits.

Can I include Stylelint for CSS files in my pre-commit lint setup?

Yes, lint-staged can format CSS and SCSS files if Stylelint is present in your project. The generated .lintstagedrc.json configuration includes stylelint --fix commands to automatically maintain styling consistency across your staged files.

How do I create a .lintstagedrc.json file to automate code formatting?

Creating a .lintstagedrc.json file involves defining CLI flags and file patterns for ESLint and Prettier. The generated output is placed at the project root to validate patterns and ensure a deterministic pre-commit formatting process.

Why do I need a specific configuration file for pre-commit linting instead of running scripts manually?

A specific configuration file ensures a safe pre-commit workflow by validating file patterns and CLI flags before execution. It eliminates manual linting steps and guarantees that automatic fixes are applied consistently to staged files only.