Repository navigation
Add ESLint flat config + activate the TS complexity-gate half - #31
Conversation
… half (#30) The template shipped no ESLint config (ESLint 10 needs eslint.config.js), so frontend linting + the TS half of the complexity gate were inactive. - Add the eslint toolchain (eslint, @eslint/js, typescript-eslint, eslint-plugin-react-hooks, eslint-plugin-react-refresh, globals) + frontend/eslint.config.js: a pragmatic flat config (real-bug rules as errors; inherited-code/stylistic rules as warnings; the aggressive react-hooks v7 compiler rules are intentionally not enabled). - npm run lint / lint:fix + make lint / lint-fix. - Remove 3 dead 'eslint-disable jsx-a11y/media-has-caption' directives (bibliogon residue for a plugin the template does not install - they errored as 'rule not found'). - Re-seed .complexity-baseline: the now-active eslint half surfaces 22 TS cc>20 offenders, grandfathered alongside the 4 Python ones (ratchet may only shrink). check-complexity-gate stays exit 0. make lint -> 0 errors (64 warnings, informational); tsc clean; Vitest 1199 passed; build OK. Closes #30
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
# Conflicts: # Makefile
Closes #30
The template shipped no ESLint config (ESLint 10 needs
eslint.config.js), so frontend linting and the TypeScript half of the complexity gate (pattern 07) were inactive. This adds both.frontend/eslint.config.js— a pragmatic flat config: real-bug rules as errors, inherited-code/stylistic rules as warnings. The aggressivereact-hooksv7 compiler rules (set-state-in-effect,refs,immutability) are intentionally not enabled (they flag very common patterns across the inherited EXAMPLE-DOMAIN code).npm run lint/lint:fix+make lint/lint-fix.eslint-disable jsx-a11y/media-has-captiondirectives (bibliogon residue for a plugin the template doesn't install — they errored as "rule not found")..complexity-baselinewith the 22 TS cc>20 offenders the eslint half now surfaces (grandfathered alongside the 4 Python ones; ratchet may only shrink).Green
make lint→ 0 errors (64 warnings, informational).tsc --noEmitclean. Vitest 121 files / 1199 passed. Build OK.make check-complexity-gate→ exit 0.Note
I did not edit
docs/patterns/07's status line here to avoid a conflict with the god-folder PR (#29), which rewrites the same paragraph. Once #29 + this merge, pattern 07 is fully realized (all three ratchet gates + the eslint/TS complexity half) and the status line can be refreshed in a one-line follow-up.