Repository navigation
Migrate lint and fmt to @liangmi/vp-config - #37
Merged
Merged
Conversation
Replace hand-written Oxlint/Oxfmt JSON plus `vp lint --config` with `liangmi()` in root vite.config.ts, matching 0froq/lig#23.
🚀 Deploying Preview to Cloudflare 🚀Preview Deployments by commit
|
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.
Replace hand-written
.oxlintrc.json/.oxfmtrc.jsonplusvp lint --configwith@liangmi/vp-config(liangmi()), following 0froq/lig#23.What moved where
Vite+ discovers
lint/fmt/testfrom a rootvite.config.ts(not from JSON files). Nuxt still owns application Vite vianuxt.config.tsand ignores this file (B5004 is expected if it appears).packis excluded (this is not a library). The presetstagedtask (vp check --fix) is excluded: this site’scheckis lint + fmt:check, not built-invp check.lint-stagedstays onsimple-git-hooks.Dependencies
@liangmi/vp-config@1.0.0in thetoolingcatalogoxlint-flat-config@0.4.0and@oxlint-flat-config/composer@0.3.1pulled transitivelytrustPolicyExclude(first publishes;no-downgradeotherwise blocks install)^24.21.0 || >=26, pnpm 12.11.2)Scripts / hooks
lint/lint:fixvp lint --config .oxlintrc.json .vp lint/vp lint --fixfmt/fmt:checkvp fmt --config .oxfmtrc.json .vp fmt/vp fmt --checkcheck--configvp lint --fix+vp fmt(loadsvite.config.ts)Cached
ccheckis not wired: it runsvp check(Oxlint typecheck), which does not replacenuxt typecheckon this site.Vue / React
Vue is on (
vuein dependencies, plus.option({ vue: true, browser: true, node: true })for the root package). React is not enabled (react: false). Theworkers/froq-apiworkspace member is declared as node-only (vue: false,react: false,browser: false).Ignores (preserved)
Lint:
.nuxt/**,.output/**,.data/**,docs/**,public/**,.agents/**(plus presetbin/**).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.jsonsorting from the preset is off so this PR does not reformat the tree.Tests
vitest.config.tsis folded into rootvite.config.ts.vp testreads that file (verified: include istests/**/*.{test,spec}.{js,ts}). Dropped leftover VitePress aliases (docs/.vitepress/theme, gone) andsetupFiles/happy-dom(notests/tree,happy-domis not a dependency). Environment isnode. There are currently no test files;vp testexits 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:
typeAware/typeCheckoff so CI can lint without relying on generated.nuxttypes.remove('liangmi/style')froq/compatturns 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-consoleallowed under**/scripts/**andworkers/**Verification
Pre-commit lint-staged also ran successfully on this commit with the new
vp lint/vp fmtcommands.Remaining gaps
pnpm checkfails on the same 6 journal-wheel files that already fail onmain(web run 40346703734):IssuePeekCard.vue,JournalHeat.vue,JournalMonthFolder.vue,useJournalDeck.ts,inkCursor.ts,journalHeat.ts. Confirmed with the old.oxfmtrc.jsonas well. Left untouched (no product/style rewrite).froq/compatcan be re-enabled in a follow-up that actually formats/fixes source.nuxt typecheck.pnpm typecheckcurrently errors in SiteDoing / InkRailMark / ArticlePage / JournalMonthFolder — pre-existing, not this PR.