Skip to content

Migrate lint and fmt to @liangmi/vp-config - #37

Merged
0froq merged 2 commits into
mainfrom
cursor/vp-config-liangmi-4946
Oct 26, 2026
Merged

0froq merged 2 commits into
mainfrom
cursor/vp-config-liangmi-4946

Conversation

@0froq

@0froq 0froq commented Oct 26, 2026

Copy link
Copy Markdown
Owner

Replace hand-written .oxlintrc.json / .oxfmtrc.json plus vp lint --config with @liangmi/vp-config (liangmi()), following 0froq/lig#23.

What moved where

Vite+ discovers lint / fmt / test from a root vite.config.ts (not from JSON files). Nuxt still owns application Vite via nuxt.config.ts and ignores this file (B5004 is expected if it appears).

pack is excluded (this is not a library). The preset staged task (vp check --fix) is excluded: this site’s check is lint + fmt:check, not built-in vp check. lint-staged stays on simple-git-hooks.

Dependencies

  • @liangmi/vp-config@1.0.0 in the tooling catalog
  • oxlint-flat-config@0.4.0 and @oxlint-flat-config/composer@0.3.1 pulled transitively
  • Added to trustPolicyExclude (first publishes; no-downgrade otherwise blocks install)
  • Node engines and pnpm version unchanged (^24.21.0 || >=26, pnpm 12.11.2)

Scripts / hooks

Script Before After
lint / lint:fix vp lint --config .oxlintrc.json . vp lint / vp lint --fix
fmt / fmt:check vp fmt --config .oxfmtrc.json . vp fmt / vp fmt --check
check lint + fmt:check unchanged (typecheck stays separate)
lint-staged explicit JSON --config vp lint --fix + vp fmt (loads vite.config.ts)

Cached ccheck is not wired: it runs vp check (Oxlint typecheck), which does not replace nuxt typecheck on this site.

Vue / React

Vue is on (vue in dependencies, plus .option({ vue: true, browser: true, node: true }) for the root package). React is not enabled (react: false). The workers/froq-api workspace member is declared as node-only (vue: false, react: false, browser: false).

Ignores (preserved)

Lint: .nuxt/**, .output/**, .data/**, docs/**, public/**, .agents/** (plus preset bin/**).

Fmt: those plus **/generated/**, AGENTS.md, pnpm-lock.yaml, skills-lock.json.

Also kept this site’s previous fmt options: single quotes / no semis already from the preset, plus quoteProps: 'consistent', singleAttributePerLine, htmlWhitespaceSensitivity: 'strict', trailingComma: 'all'. Import / package.json sorting from the preset is off so this PR does not reformat the tree.

Tests

vitest.config.ts is folded into root vite.config.ts. vp test reads that file (verified: include is tests/**/*.{test,spec}.{js,ts}). Dropped leftover VitePress aliases (docs/.vitepress/theme, gone) and setupFiles / happy-dom (no tests/ tree, happy-dom is not a dependency). Environment is node. There are currently no test files; vp test exits 1 with “No test files found”.

Overrides (infrastructure only)

The preset is stricter than the old correctness-only Oxlint JSON. Rather than rewriting app code:

  • Oxlint typeAware / typeCheck off so CI can lint without relying on generated .nuxt types
  • .remove('liangmi/style')
  • froq/compat turns off restriction/nursery rules that fire across the existing tree (import/extensions, unicorn/prefer-array-find, promise/no-callback-in-promise, eslint/max-classes-per-file, …)
  • no-console allowed under **/scripts/** and workers/**

Verification

pnpm install
pnpm exec vp lint          # green
pnpm exec vp fmt --check   # same 6-file leftover as main (see below)
pnpm typecheck             # already failing on main; not part of `check`

Pre-commit lint-staged also ran successfully on this commit with the new vp lint / vp fmt commands.

Remaining gaps

  • fmt:check leftover matching main. pnpm check fails on the same 6 journal-wheel files that already fail on main (web run 40346703734): IssuePeekCard.vue, JournalHeat.vue, JournalMonthFolder.vue, useJournalDeck.ts, inkCursor.ts, journalHeat.ts. Confirmed with the old .oxfmtrc.json as well. Left untouched (no product/style rewrite).
  • Style/restriction rules in froq/compat can be re-enabled in a follow-up that actually formats/fixes source.
  • Oxlint type-aware checking is off; Vue types stay on nuxt typecheck. pnpm typecheck currently errors in SiteDoing / InkRailMark / ArticlePage / JournalMonthFolder — pre-existing, not this PR.
  • Other froQ sites and skills-pack are out of scope.
Open in Web Open in Cursor 

Replace hand-written Oxlint/Oxfmt JSON plus `vp lint --config` with
`liangmi()` in root vite.config.ts, matching 0froq/lig#23.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Failed ❌

View logs ↗
3b1d4a0 2026-10-26T15:55:57.376Z View logs ↗

@0froq
0froq marked this pull request as ready for review October 26, 2026 17:00
@0froq
0froq merged commit 414e360 into main Oct 26, 2026
0 of 2 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.

2 participants