S2 EsLint implementation
All checks were successful
Build, test and publish / verify (push) Successful in 1m40s

This commit is contained in:
2026-10-29 22:05:11 +01:00
parent 09cb26107e
commit 8f3026e6cd
22 changed files with 2282 additions and 31 deletions

View File

@@ -1,6 +1,6 @@
# S2 — ESLint for the frontend
Status: REFINED
Status: IN_REVIEW
Agreed after the grill-me review; shared understanding confirmed.
@@ -183,36 +183,43 @@ consistent. Record the performance evidence with the implementation documentatio
## Acceptance criteria
- [ ] Compatible tooling checks maintained application TypeScript/JavaScript,
- [x] Compatible tooling checks maintained application TypeScript/JavaScript,
Angular templates, unit tests, Playwright tests and applicable frontend
configuration using the agreed recommended and type-aware rules.
- [ ] All existing violations are fixed; there is no legacy baseline allowance.
- [x] All existing violations are fixed; there is no legacy baseline allowance.
Frontend builds, unit tests and container end-to-end tests still pass.
- [ ] `npm run lint` checks the full scope without modifications and fails on
- [x] `npm run lint` checks the full scope without modifications and fails on
either errors or warnings.
- [ ] `npm run lint:fix` offers explicit local autofixes; CI does not modify source.
- [ ] Formatting remains under Prettier, without conflicting ESLint rules.
- [ ] Any necessary rule suppressions are narrow and concretely justified.
- [ ] Every branch pipeline runs lint immediately after frontend `npm ci` and
- [x] `npm run lint:fix` offers explicit local autofixes; CI does not modify source.
- [x] Formatting remains under Prettier, without conflicting ESLint rules.
- [x] Any necessary rule suppressions are narrow and concretely justified.
- [x] Every branch pipeline runs lint immediately after frontend `npm ci` and
before frontend tests/builds and container E2E; lint failure prevents
publication and leaves actionable diagnostic output.
- [ ] VS Code recommends ESLint without mandatory fix/format-on-save settings.
- [ ] Complete-hook measurements cover the agreed single-file, mixed-file and
- [x] VS Code recommends ESLint without mandatory fix/format-on-save settings.
- [x] Complete-hook measurements cover the agreed single-file, mixed-file and
all-maintained-files cases with fresh processes and no tool cache.
- [ ] The measured three-second budget determines combined tools, Prettier-only
- [x] The measured three-second budget determines combined tools, Prettier-only
or no active hook; no writing formatter is forcibly interrupted to meet it.
- [ ] If installed, the hook processes only applicable staged frontend files,
- [x] If installed, the hook processes only applicable staged frontend files,
applies Prettier formatting before any ESLint check, and preserves unrelated
files and unstaged edits, including partially staged files.
- [ ] A failed installed hook restores the original staged and unstaged state and
- [x] A failed installed hook restores the original staged and unstaged state and
blocks the commit with a concrete explanation.
- [ ] Hook installation is automatic for local `npm ci` when applicable, skipped
- [x] Hook installation is automatic for local `npm ci` when applicable, skipped
in CI/Docker, and has documented local opt-out instructions.
- [ ] Root `README.md` explains `npm run lint`, `npm run lint:fix`, CI enforcement
- [x] Root `README.md` explains `npm run lint`, `npm run lint:fix`, CI enforcement
and the selected hook behavior; measurement evidence is included.
## Implementation handoff
This specification records agreed behavior. It does not install ESLint, change
application code, modify the pipeline, install a hook or update command usage in
the README yet. Those changes and the timing measurements are implementation work.
The agreed behavior has been implemented and is ready for review. See the
implementation evidence below.
## Implementation evidence
Implemented with ESLint flat configuration, type-aware TypeScript and Angular
template checks. The measured three-second budget selects a Prettier-only
Husky/lint-staged hook; ESLint remains mandatory in the Java-based pipeline.
See [validation and timings](../../docs/s2-validation.md) for scope, preservation
checks, local installation and successful builds/unit/container E2E tests.