Skip to content

Commit 5e2f5e2

Browse files
catomeanclaude
andcommitted
ci: add the missing lint gate, and put typecheck in verify
Third instance of one scaffold defect. ai-forms (#11) and ai-ration (#2) had exactly this, and so does threadkit: - No lint at all. ESLint was not a dependency, there was no config, and no script referenced it — so the fleet verify floor (lint AND typecheck AND test) was unmet. - `typecheck` existed but was not in `verify`. `build` is `tsc -p`, so types were checked only as a side effect of emitting. That conflates "compiles to dist" with "types are sound", and it evaporates the moment the build strategy changes. verify = lint → typecheck → build → test. Three repos with the same gap is a template problem, not three coincidences. The instance is fixed here; the generator that produces `"verify": "npm run build && npm test"` needs the same edit, or repo four is born with it. Naming that explicitly rather than quietly fixing instance three — an un-encoded "I'll remember" is the thing the never-twice rule exists to prevent. Recommended presets only. ~500 lines of library code does not need a bespoke rule set. Lint is clean on arrival, so this closes a hole rather than deferring a backlog. CI needs no change — ci.yml already calls `npm run verify` verbatim. Verified: `npm run verify` passes — eslint clean, tsc clean, build clean, 31/31 tests. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 351612d commit 5e2f5e2

3 files changed

Lines changed: 1514 additions & 4 deletions

File tree

eslint.config.mjs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Flat config (ESLint 9). Recommended presets only: this is ~500 lines of
2+
// library code, and a bespoke rule set would be a second opinion to maintain
3+
// for no benefit. The floor is "lint runs and can fail", not "lint encodes
4+
// taste".
5+
import js from '@eslint/js'
6+
import globals from 'globals'
7+
import tseslint from 'typescript-eslint'
8+
9+
export default tseslint.config(
10+
{
11+
// dist/ is generated by `tsc`.
12+
ignores: ['dist/**', 'node_modules/**'],
13+
},
14+
js.configs.recommended,
15+
...tseslint.configs.recommended,
16+
{
17+
files: ['**/*.ts'],
18+
languageOptions: { globals: globals.node },
19+
},
20+
{
21+
// Tests are plain Node running under `node --test`.
22+
files: ['test/**/*.js', 'scripts/**/*.{js,mjs}'],
23+
languageOptions: { globals: { ...globals.node, ...globals.nodeBuiltin } },
24+
},
25+
)

0 commit comments

Comments
 (0)