Skip to content

feat: add ESLint + local TypeScript checking (closes #4, #5) - #32

Merged
TusharW4ni merged 1 commit into
mainfrom
feat/eslint-and-typecheck
Aug 23, 2026
Merged

feat: add ESLint + local TypeScript checking (closes #4, #5)#32
TusharW4ni merged 1 commit into
mainfrom
feat/eslint-and-typecheck

Conversation

@TusharW4ni

Copy link
Copy Markdown
Contributor

Closes #4 and #5 — the two DX guardrail issues (they share deps/config, so done together).

#4 — @nuxt/eslint (logic-focused linting)

  • Deps: eslint, @nuxt/eslint.
  • nuxt.config.ts: @nuxt/eslint module with eslint.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.
  • Scripts: lint, lint:fix, format, typecheck.
  • .vscode/settings.json: Prettier format-on-save + ESLint fix-on-save.
  • Fixed all pre-existing lint errors: unused vars in auth.vue, index.get.ts, seed.ts, auth.ts, and a FormSubmitEvent<any>.

#5 — local TypeScript checking

  • Deps: typescript (pinned to 6.xtypescript-eslint and vue-tsc don't support TS 7 yet), vue-tsc.
  • nuxt.config.ts: typescript.typeCheck: true → type errors surface in nuxt dev and nuxt build.
  • Fixed the two type errors this surfaced: possibly-undefined pathname in server/middleware/auth.ts, and DOMWrapper.exists misuse in the app-shell test (getfind).

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-resolver native build in pnpm-workspace.yaml.

Verification

  • pnpm lint → 0 problems
  • pnpm typecheck → clean
  • pnpm test → 2 passed
  • pnpm build → passes with typeCheck: true (confirmed deploy-safe, since the Docker build runs nuxt build)

⚠️ Note: typeCheck: true means a type error will now fail nuxt build (and therefore a deploy). That's intended (fail fast), and CI now catches it on PRs first.

Closes #4, closes #5.

🤖 Generated with Claude Code

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>
@TusharW4ni
TusharW4ni merged commit 5aad9eb into main Aug 23, 2026
1 check passed
@TusharW4ni
TusharW4ni deleted the feat/eslint-and-typecheck branch August 23, 2026 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DX: Enable local TypeScript checking during development DX: Integrate @nuxt/eslint for strict logic checks

1 participant