chore: add ESLint tooling with TypeScript support#161
Conversation
The repository has a pnpm lint script running 'eslint .' but ESLint and typescript-eslint were not listed in devDependencies. Added: - eslint (^9.0.0) - @eslint/js (^9.0.0) - typescript-eslint (^8.0.0) Added eslint.config.mjs with flat config (ESLint 9+) using typescript-eslint strict rules. Ignores node_modules, dist, build, and framework-specific output directories.
There was a problem hiding this comment.
Pull request overview
Adds ESLint tooling (ESLint 9 flat config + TypeScript support) so the existing pnpm lint script can run successfully in this monorepo.
Changes:
- Add ESLint-related devDependencies (
eslint,@eslint/js,typescript-eslint) to supportpnpm lint. - Introduce
eslint.config.mjsusing ESLint 9 flat config with TypeScript strict rules and ignore patterns.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| package.json | Adds ESLint + TypeScript-ESLint devDependencies to unblock pnpm lint. |
| eslint.config.mjs | Introduces an ESLint 9 flat config with TS strict rules and intended ignores. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "@eslint/js": "^9.0.0", | ||
| "eslint": "^9.0.0", | ||
| "typescript": "^5.7.0", | ||
| "typescript-eslint": "^8.0.0", | ||
| "vitest": "^3.1.0" |
|
Thanks for picking this up! A few notes before we land it: On the Copilot comments
A few things I'd like to sort out before merging
Let me know which direction you want to take on (5) and I'll review the next push. |
- typescript-eslint preset: strict -> recommended for a usable first-pass baseline (per PR discussion); ratchet up in a follow-up. - Drop the projectService/parserOptions block. Neither `recommended` nor `strict` is type-aware, so it was unused; removing it also avoids the pnpm-workspace tsconfig-resolution failure mode flagged in review. - Add Node + browser globals via the `globals` package so .mjs scripts and the dashboard stop hitting `no-undef`. - Expand ignores: built bundles (**/public/**), Astro generated (.astro/), and .private/ (eval scratch). Cuts 2400+ errors in vendored output. - Allow `_`-prefixed unused vars/args/caught errors; skip irregular whitespace inside comments (json-parser intentionally embeds ZWSP-escaped block-comment examples in JSDoc). - Fix the residual 13 genuine errors: drop dead imports/vars, replace two `as any[]` in schema.ts with `Array<Record<string, unknown>>`, drop unused destructure in change-classifier, drop unused catch binding in extract-structure.mjs. - Add EOF newline to eslint.config.mjs. - Refresh pnpm-lock.yaml. - Add `pnpm lint` step to .github/workflows/ci.yml so the tooling actually enforces something. pnpm lint now exits 0 locally; 33+13 test files / 1445 tests still pass.
|
@okwn pushed a follow-up commit addressing the review notes; hope you don't mind me taking it the rest of the way. Summary of what changed: Direction picked for (5): went with Config (
Code fixes (the 13 residual real errors)
Other
Local verification: |
Summary
The repository has a pnpm lint script that runs eslint . but ESLint and typescript-eslint were not listed in devDependencies, causing the script to fail.
Added:
Also added eslint.config.mjs with flat config format (ESLint 9+) using typescript-eslint strict rules. Ignores node_modules, dist, build, and framework-specific output directories.
Problem
Running pnpm lint fails with eslint: not found because ESLint is not installed as a dependency.
Solution
Add the required ESLint packages as devDependencies and create the flat-config file. Does not fix any linting errors — this PR only adds the tooling infrastructure.
Risk / Compatibility