Skip to content

build: add ESLint + Prettier toolchain and /ready quality gate#42

Merged
rogadev merged 5 commits into
mainfrom
dev
Jun 11, 2026
Merged

build: add ESLint + Prettier toolchain and /ready quality gate#42
rogadev merged 5 commits into
mainfrom
dev

Conversation

@rogadev

@rogadev rogadev commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds ESLint 10 (flat config) + Prettier as the project's lint/format baseline: eslint-plugin-vue for templates, vitest/playwright plugins scoped to their test dirs, prettier-plugin-tailwindcss for class sorting, and a repo-wide format pass — most of the diff is that one-time reformat
  • Lint and format checks run as static-only steps in the existing unit-test CI job; browser/E2E tests stay local-only per project policy
  • New pnpm ready script chains lint → format check → unit + browser tests → E2E (3 engines) → build as the local pre-PR gate, with a matching /ready Claude skill that enforces running it uninterrupted and fixing root causes rather than weakening tests
  • Rewrites the Playwright E2E specs to web-first assertions (expect(locator).toHaveX auto-retry) — removes fixed waitForTimeout sleeps and the no-op clipboard "test"
  • Fixes dead code the new rules surfaced (unused toggleSetting, unused page import, unused catch binding)

Dependency updates

Decisions

  • ESLint config is .mjs because postcss.config.js is CommonJS, so package.json can't adopt "type": "module"
  • @vue/eslint-config-prettier/skip-formatting sits last in the ESLint config so ESLint never fights Prettier — Prettier alone owns formatting

Full pnpm ready run is green on this exact tree, now on vite 8 / jsdom 29 (lint, format, 49 unit, 14 browser, 30 E2E across Chromium/Firefox/WebKit, production build with service-worker generation).

rogadev added 4 commits June 10, 2026 20:55
TDD'd per writing-skills: baseline agent under time pressure ran only
unit tests and declared ready ('tree matches HEAD, no further
verification needed'); with the skill, the same scenario produced a
full uninterrupted pnpm ready run, a root-cause fix justified against
CLAUDE.md invariants, and a gate re-run after the fix.

Also corrects the audit skill's now-false claim that no pnpm ready
gate exists.
Establish a modern lint/format baseline for the Vue 3 + Vite codebase.

- ESLint 10 flat config (eslint.config.mjs): eslint-plugin-vue for template
  rules, @vitest/eslint-plugin and eslint-plugin-playwright scoped to their
  test dirs, and per-area globals (browser src / node configs / tests).
- Prettier owns formatting; @vue/eslint-config-prettier/skip-formatting sits
  last so ESLint never fights Prettier. prettier-plugin-tailwindcss sorts
  Tailwind v4 classes.
- Add lint / lint:fix / format / format:check scripts; fold them into `ready`.
- Enforce in CI as static-only steps inside the existing unit-test job (no
  browser/e2e added to CI).
- .editorconfig + .vscode settings for format-on-save and ESLint autofix.
- Format the codebase and fix the dead code the new rules surfaced
  (unused `toggleSetting`, unused `page` import, unused catch binding).

Config kept as .mjs because postcss.config.js is CommonJS, so package.json
cannot adopt "type": "module".
Resolve the eslint-plugin-playwright warnings in the e2e suite by adopting
auto-retrying, web-first patterns. All 30 tests still pass across Chromium,
Firefox, and WebKit.

- waitForSelector -> expect(locator).toBeVisible()
- page.click(selector) -> page.locator(...).click()
- waitForTimeout -> expect.poll(count) / web-first visibility assertions
- drop the try/catch + conditional when counting initial log entries
  (.count() already returns 0 on an empty log)
- give the clipboard test a real assertion: accept either the success
  ("Copied to clipboard!") or failure notice via locator.or(), which is
  robust to per-browser clipboard-permission differences
@vercel

vercel Bot commented Jun 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
password-generator Ready Ready Preview, Comment Jun 11, 2026 4:04am

Incorporates the two open Dependabot updates (build group: vite,
testing group: jsdom) directly onto dev rather than merging the
Dependabot branches, which were cut before the ESLint + Prettier
tooling landed and would have reverted it.

Full local gate green on the new versions: pnpm audit clean, lint,
format:check, 49 unit + 14 browser + 30 E2E tests, and production
build with service-worker generation all pass.

Closes the vite and jsdom Dependabot PRs.
@rogadev rogadev merged commit af12d07 into main Jun 11, 2026
6 checks passed
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.

1 participant