feat: add ESLint + local TypeScript checking (closes #4, #5) - #32
Merged
Conversation
Integrate @nuxt/eslint for logic-focused linting and enable Nuxt type-checking: - deps: eslint, @nuxt/eslint, typescript (pinned to 6.x — typescript-eslint and vue-tsc don't support TS 7 yet), vue-tsc - nuxt.config: add @nuxt/eslint module (eslint.config.stylistic:false so Prettier owns formatting), and typescript.typeCheck:true so type errors surface in `nuxt dev`/`nuxt build` - eslint.config.mjs: extends the Nuxt-generated config; disables the stylistic Vue rules (attributes-order, html-self-closing) to keep ESLint logic-only and avoid Prettier conflicts - scripts: lint, lint:fix, format, typecheck - .vscode/settings.json: format-on-save (Prettier) + ESLint fix-on-save - CI (test.yml -> 'CI'): run lint + typecheck alongside the tests on every PR - approve the unrs-resolver native build (pnpm-workspace.yaml) Fixed all pre-existing lint errors (unused vars, an `any`) and the two type errors surfaced by the type-check (possibly-undefined pathname in the auth middleware; DOMWrapper.exists in the app-shell test). Verified: pnpm lint (0 problems), pnpm typecheck (clean), pnpm test (2 passed), pnpm build (passes with typeCheck). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #4 and #5 — the two DX guardrail issues (they share deps/config, so done together).
#4 — @nuxt/eslint (logic-focused linting)
eslint,@nuxt/eslint.nuxt.config.ts:@nuxt/eslintmodule witheslint.config.stylistic: false(Prettier keeps owning formatting).eslint.config.mjs: extends the Nuxt-generated config; turns off the stylistic Vue rules (vue/attributes-order,vue/html-self-closing) so ESLint stays logic-only and doesn't conflict with Prettier.lint,lint:fix,format,typecheck..vscode/settings.json: Prettier format-on-save + ESLint fix-on-save.auth.vue,index.get.ts,seed.ts,auth.ts, and aFormSubmitEvent<any>.#5 — local TypeScript checking
typescript(pinned to 6.x —typescript-eslintandvue-tscdon't support TS 7 yet),vue-tsc.nuxt.config.ts:typescript.typeCheck: true→ type errors surface innuxt devandnuxt build.undefinedpathnameinserver/middleware/auth.ts, andDOMWrapper.existsmisuse in the app-shell test (get→find).CI
Renamed the workflow to CI and added Lint + Type check steps alongside the tests, so all three guardrails run on every PR. Also approved the
unrs-resolvernative build inpnpm-workspace.yaml.Verification
pnpm lint→ 0 problemspnpm typecheck→ cleanpnpm test→ 2 passedpnpm build→ passes withtypeCheck: true(confirmed deploy-safe, since the Docker build runsnuxt build)Closes #4, closes #5.
🤖 Generated with Claude Code