https://github.com/skarab42/eslint-staged
Refines lint-staged functionality, enforcing adherence to ESLint's ignored file configurations.
https://github.com/skarab42/eslint-staged
eslint eslint-staged git staged
Last synced: about 2 months ago
JSON representation
Refines lint-staged functionality, enforcing adherence to ESLint's ignored file configurations.
- Host: GitHub
- URL: https://github.com/skarab42/eslint-staged
- Owner: skarab42
- License: mit
- Created: 2024-01-09T05:51:28.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-03T17:28:57.000Z (over 1 year ago)
- Last Synced: 2025-03-29T20:33:20.803Z (7 months ago)
- Topics: eslint, eslint-staged, git, staged
- Language: TypeScript
- Homepage:
- Size: 120 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
# @skarab/eslint-staged
Refines [lint-staged] functionality, enforcing strict adherence to ESLint's ignored file configurations.
This package provides a CLI tool (`eslint-staged`) designed to run ESLint on staged files, considering the files in `.eslintignore` and `ignorePatterns`.
It resolves the [common issue] ([1], [2]) where [lint-staged] pass files ignored by ESLint.
## Installation
```bash
pnpm add @skarab/eslint-staged --save-dev
```## Usage
In your `package.json`, configure [lint-staged] as follows:
```ts
"lint-staged": {
"*": [
"pnpm eslint-staged --fix --max-warnings=0",
"pnpm prettier --write --ignore-unknown"
]
}
```---
Scaffolded with [@skarab/skaffold](https://www.npmjs.com/package/@skarab/skaffold)
[lint-staged]: https://github.com/lint-staged/lint-staged
[common issue]: https://www.curiouslychase.com/posts/eslint-error-file-ignored-because-of-a-matching-ignore-pattern/
[1]: https://github.com/lint-staged/lint-staged/issues/584#issue-413947299
[2]: https://github.com/eslint/eslint/issues/16602#issue-1470373542