@coding-with-hassan/lint-staged-config
v0.1.0
Published
Project-aware lint-staged config for monorepos with a NestJS API and an Angular SPA side by side.
Downloads
103
Readme
@coding-with-hassan/lint-staged-config
Project-aware lint-staged config factory. Designed for monorepos where a NestJS API and an Angular SPA live in sibling folders at the repo root.
Install
pnpm add -D @coding-with-hassan/lint-staged-config lint-stagedUse
Create lint-staged.config.js at the repo root:
module.exports = require('@coding-with-hassan/lint-staged-config')({
api: 'de-autozaak-car-rental',
spa: 'de-autozaak-car-rental-spa',
});Both keys are optional — omit one if your repo only has the other side.
What it does
For the API folder:
*.ts→ run ESLint with--fix --cache, scoped to that project (pnpm -C <dir>)
For the SPA folder:
*.ts,*.html→ run Prettier--writethen ESLint--fix --cache, scoped to that project*.scss,*.css,*.json→ run Prettier--write, scoped to that project
Per-project scoping means each side uses its own ESLint/Prettier config, so backend conventions don't leak into the frontend or vice versa.
