#atom

Tool that runs linters on git staged files to ensure only quality code is committed

Core Idea: Lint-staged runs linters (like ESLint) only on files that are staged for git commit, improving performance by avoiding full codebase linting and ensuring all committed code meets quality standards.

Key Elements


3. Integrate with git hooks tool like Husky
4. Run automatically before commits or manually as needed

- **Code Example**:

```js
// package.json configuration example
{
  "scripts": {
    "lint-staged": "lint-staged"
  },
  "lint-staged": {
    "*.{js,jsx,ts,tsx}": [
      "eslint --fix",
      "jest --findRelatedTests"
    ],
    "*.{json,css,md}": "prettier --write"
  }
}
```

## Connections

- **Related Concepts**: ESLint (tool commonly run by lint-staged), Husky Pre-commit Hooks (triggers lint-staged before commits)
- **Broader Context**: Git Workflow Automation (part of automated git workflow)
- **Applications**: Code Quality Automation (enforces quality standards automatically)
- **Components**: Git Hooks (mechanism that enables lint-staged to work)

## References

1. Lint-staged GitHub Repository: https://github.com/okonet/lint-staged
2. "Modern JavaScript Tools and Practices" by Cory House

#git #automation #code-quality #linting #developer-workflow

---
**Connections:**
- 
---
**Sources:**
- From: Syntax - Lint como un desarrollador senior con eslint + husky + lint staged + acciones de github