# ESLint Rollout Status

Tracks which projects have their Tier A/B rules (see `docs/Coding-Standards-Frontend.md`)
promoted to `error` and gated in CI. Machine-readable source of truth:
`tools/lint-migration-status.json`. Update both together in the same PR that clears a
project's backlog.

## Gated (Tier A+B backlog cleared, enforced in CI)

| Project | Notes |
|---|---|
| `common` | Selector-prefix rule scoped per real convention (`ent-` for `entitlement/**`, `gb-`/`lib-` elsewhere). `no-console` and `directive-selector` deferred — see below. |
| `ecp` | Tiny pilot app (6 files), unmodified scaffold. |
| `idms` | Tiny pilot app (6 files), unmodified scaffold. |
| `qms` | Tiny pilot app (6 files), unmodified scaffold. |
| `hrms` | Large, heavily-used pilot (470 files) — chosen specifically because a pilot of only small/lightly-used apps wouldn't validate the rules against real, complex, high-traffic code. |

## Known deferrals within gated projects

Not every rule in `docs/Coding-Standards-Frontend.md` is promoted to `error` even for gated
projects — some real backlog turned out larger or riskier than the initial estimate:

- **`common`: `no-console` stays `warn`.** Its actual backlog is much larger than first
  measured, and structurally different — `gbconsoleservice/gbconsole.service.ts` is the
  wrapper's own implementation (legitimately calls `console[level](...)`), and
  `gbformgroup/metaform-lint.cli.ts` is a Node CLI script with no Angular injector at all.
  Needs a proper per-site review before promotion.
- **`common`: `directive-selector` stays `warn`.** One directive
  (`entitlement/directives/if-feature.directive.ts`) uses a bare `[ifFeature]` selector with no
  prefix — renaming it means updating every template that references it, deferred.
- **`hrms`: `no-console` stays `warn` for one specific file**,
  `transaction/advance/advancerepayment/advancerepayment.component.ts` — it was under active
  concurrent development by another session as of 2026-09-03; every fix here got overwritten by
  the next real edit within minutes. Revisit and re-promote once that work settles.
- **Tier C rules (`no-explicit-any`, `gb/no-hardcoded-template-text`) stay `warn` everywhere**,
  including gated projects, by design — see the standards doc's tiering rationale.

## Not yet migrated

All other projects (see `tools/lint-migration-status.json`'s `notYetMigrated` array) have a
`lint` architect target (added automatically when `angular-eslint` was installed) but are not
yet part of the CI gate. They build normally; nothing here blocks them. Planned sequencing:
domain groupings (Finance/Costing, Supply-chain, Sales/CRM, Manufacturing, etc.) as a later
round, with `gbhost` (the shell app) getting extra review given its blast radius.

## A note on local vs. CI feedback

Husky + lint-staged run the exact same root `eslint.config.js`/`.prettierrc.json` as CI — there
is no separate, lighter local config. One intentional asymmetry: editing a file in a
not-yet-migrated project will show more warnings locally (via lint-staged) than CI currently
blocks on, since ESLint itself doesn't know about `gateEnabledProjects` — that distinction lives
only in the CI job's project-selection logic. This is desirable: it nudges improvement in
untouched code without blocking anyone.
