diff --git a/.oxfmtrc.json b/.oxfmtrc.json deleted file mode 100644 index e23e139..0000000 --- a/.oxfmtrc.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "semi": false, - "singleQuote": true, - "arrowParens": "avoid", - "quoteProps": "consistent", - "singleAttributePerLine": true, - "htmlWhitespaceSensitivity": "strict", - "ignorePatterns": [ - "docs/**", - "public/**", - "**/generated/**", - ".agents/**", - "AGENTS.md", - "pnpm-lock.yaml", - "skills-lock.json" - ] -} diff --git a/.oxlintrc.json b/.oxlintrc.json deleted file mode 100644 index 446137d..0000000 --- a/.oxlintrc.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "plugins": ["typescript", "unicorn", "oxc", "vue"], - "categories": { - "correctness": "error" - }, - "ignorePatterns": [".nuxt/**", ".output/**", ".data/**", "docs/**", "public/**", ".agents/**"] -} diff --git a/package.json b/package.json index 2dbb7dd..aefbd18 100644 --- a/package.json +++ b/package.json @@ -11,10 +11,10 @@ "prepare": "npx simple-git-hooks", "worker:dev": "pnpm --dir workers/froq-api dev", "worker:deploy": "pnpm --dir workers/froq-api deploy", - "lint": "vp lint --config .oxlintrc.json .", - "lint:fix": "vp lint --config .oxlintrc.json . --fix", - "fmt": "vp fmt --config .oxfmtrc.json .", - "fmt:check": "vp fmt --config .oxfmtrc.json . --check", + "lint": "vp lint", + "lint:fix": "vp lint --fix", + "fmt": "vp fmt", + "fmt:check": "vp fmt --check", "check": "vp run lint && vp run fmt:check", "typecheck": "nuxt typecheck" }, @@ -46,6 +46,7 @@ "@iconify-json/skill-icons": "catalog:styling", "@iconify-json/solar": "catalog:styling", "@iconify-json/twemoji": "catalog:styling", + "@liangmi/vp-config": "catalog:tooling", "@types/node": "catalog:tooling", "@unocss/extractor-mdc": "catalog:styling", "@unocss/nuxt": "catalog:styling", @@ -64,8 +65,8 @@ }, "lint-staged": { "*": [ - "vp lint --config .oxlintrc.json --fix --no-error-on-unmatched-pattern", - "vp fmt --config .oxfmtrc.json --no-error-on-unmatched-pattern" + "vp lint --fix --no-error-on-unmatched-pattern", + "vp fmt --no-error-on-unmatched-pattern" ] }, "engines": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index efad608..a6b4611 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -250,6 +250,9 @@ catalogs: specifier: ^66.6.7 version: 66.11.0 tooling: + '@liangmi/vp-config': + specifier: 1.0.0 + version: 1.0.0 '@types/node': specifier: 26.6.2 version: 26.6.2 @@ -367,6 +370,9 @@ importers: '@iconify-json/twemoji': specifier: catalog:styling version: 1.2.5 + '@liangmi/vp-config': + specifier: catalog:tooling + version: 1.0.0(oxlint@1.88.0(oxlint-tsgolint@7.0.2004)(vite-plus@1.3.0(@types/node@26.6.2)(@vitest/ui@5.0.5)(@volar/typescript@2.4.28(typescript@5.9.3))(@vue/language-core@3.3.13)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(typescript@5.9.3)(vue-tsc@3.3.13(typescript@5.9.3))(yaml@2.9.1)))(vite-plus@1.3.0(@types/node@26.6.2)(@vitest/ui@5.0.5)(@volar/typescript@2.4.28(typescript@5.9.3))(@vue/language-core@3.3.13)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(typescript@5.9.3)(vue-tsc@3.3.13(typescript@5.9.3))(yaml@2.9.1)) '@types/node': specifier: catalog:tooling version: 26.6.2 @@ -1486,6 +1492,11 @@ packages: '@jridgewell/trace-mapping@0.3.9': resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} + '@liangmi/vp-config@1.0.0': + resolution: {integrity: sha512-OmPEhx/pkwRpzu1+LX118vELdQOvTKckRk9t90dbif4h6jMi2r1Zz2XhXaae51YGSvja44dOwP6u8DPNwLNJ0A==} + peerDependencies: + vite-plus: '>=1.0.0' + '@mapbox/node-pre-gyp@2.0.3': resolution: {integrity: sha512-uwPAhccfFJlsfCxMYTwOdVfOz3xqyj8xYL3zJj8f0pb30tLohnnFPhLuqp4/qoEz8sNxe4SESZedcBojRefIzg==} engines: {node: '>=18'} @@ -2158,6 +2169,18 @@ packages: cpu: [x64] os: [win32] + '@oxlint-flat-config/composer@0.3.1': + resolution: {integrity: sha512-LGAbkgDZrwgiGc8/R4gyQCMT9aT3XugX1w5Uy86vbnmi4xGSrztPpVmie7ZqJFtlX/2BgOGW9MLi3TtFzu1LIQ==} + peerDependencies: + oxlint: '>=1.85.0' + oxlint-flat-config: ^0.4.0 + vite-plus: '>=1.0.0' + peerDependenciesMeta: + oxlint: + optional: true + vite-plus: + optional: true + '@oxlint-tsgolint/darwin-arm64@7.0.2004': resolution: {integrity: sha512-uJk3ttju7Lz+Nv8WG4CsLyewoL1qf/Ny8S8OksJ7Bm/F14Tc9gMfW6arM1PCc57IzH/X/I79YsCWTgxX1FKibQ==} cpu: [arm64] @@ -4164,6 +4187,9 @@ packages: resolution: {integrity: sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==} engines: {node: '>= 12'} + common-path-prefix@3.0.0: + resolution: {integrity: sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w==} + commondir@1.0.1: resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} @@ -4625,6 +4651,15 @@ packages: resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} engines: {node: '>=8'} + find-cache-dir@6.0.0: + resolution: {integrity: sha512-nZMBQ0IuwcMgW8jsiShHtj2WQS6ReVTOMGiSnriCdWBUN/eVsolBlE0EPXe2R5MfIWtqkpM4grjGuqimbWhUFA==} + engines: {node: '>=16'} + deprecated: Renamed to `find-cache-directory`. + + find-up@6.3.0: + resolution: {integrity: sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + flat@6.0.1: resolution: {integrity: sha512-/3FfIa8mbrg3xE7+wAhWeV+bd7L2Mof+xtZb5dRDKZ+wDvYJK4WDYeIOuOhre5Yv5aQObZrlbRmk3RTSiuQBtw==} engines: {node: '>=18'} @@ -4748,6 +4783,9 @@ packages: resolution: {integrity: sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==} engines: {node: '>= 0.4'} + get-oxlint-rules@0.3.1: + resolution: {integrity: sha512-dASXJ9xgkjEs0O/U7fmNcfJd6BUHD1rNJomFARTc/lhkqO0QnQRNuJWU5kNh2CEq9Nw8NPJnRy2yqaParVXLew==} + get-port-please@3.2.0: resolution: {integrity: sha512-I9QVvBw5U/hw3RmWpYKRumUeaDgxTPd401x364rLmWBJcOQ753eov1eTgzDqRG9bqFIfDc7gfzcQEWrUri3o1A==} @@ -4775,6 +4813,9 @@ packages: github-slugger@2.0.0: resolution: {integrity: sha512-IaOQ9puYtjrkq7Y0Ygl9KDZnrf/aiUJYUpVf89y8kyaxbRG7Y1SrX/jaumrv81vc61+kiMempujsM3Yw7w5qcw==} + glob-distribute@0.1.0: + resolution: {integrity: sha512-Z+EYFkNVV8e7BeciaFg5j6PyzyOsTQscXOH1SKmtGavMaRWjmW4U9n6+cN08VlRgyolYM1SD0gUsWL/pkQgJ+Q==} + glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} @@ -5339,6 +5380,10 @@ packages: resolution: {integrity: sha512-++gUqRDEvcnN6Zhqrr+y/CkVEHhlrR96vZn3nZZPYzMcBUyBtTKzB9NadClFIsIVSsu+3i9tfk/erqy9kAmt7Q==} engines: {node: '>=14'} + locate-path@7.2.0: + resolution: {integrity: sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + lodash@4.18.1: resolution: {integrity: sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==} @@ -5978,6 +6023,17 @@ packages: vite-plus: optional: true + oxlint-flat-config@0.4.0: + resolution: {integrity: sha512-Ts6BG501Nx5VpjKOHhRYRpRMlBMaZwD462cY7ha3gP2ri4BRmTAO/0epDeQ8CYwQADAQXp4nyqj/1rZerpCNKw==} + peerDependencies: + oxlint: '>=1.85.0' + vite-plus: '>=1.0.0' + peerDependenciesMeta: + oxlint: + optional: true + vite-plus: + optional: true + oxlint-tsgolint@7.0.2004: resolution: {integrity: sha512-vQ9WDF3fiZJvRdSDosNOflerOCOpwol6vWzVDxW76RcU19cjTh7engvkHLvmv+tzedR8fAiJUVUGr6IVZdkzXQ==} hasBin: true @@ -5995,6 +6051,14 @@ packages: vite-plus: optional: true + p-limit@4.0.0: + resolution: {integrity: sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + p-locate@6.0.0: + resolution: {integrity: sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + package-json-from-dist@1.0.1: resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} @@ -6030,6 +6094,10 @@ packages: path-data-parser@0.1.0: resolution: {integrity: sha512-NOnmBpt5Y2RWbuv0LMzsayp3lVylAHLPUTut412ZA3l+C4uw4ZVkQbjShYCQ8TCpUMdPapr4YjUqLYD6v68j+w==} + path-exists@5.0.0: + resolution: {integrity: sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + path-key@3.1.1: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} @@ -6073,6 +6141,10 @@ packages: resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} engines: {node: '>=6'} + pkg-dir@7.0.0: + resolution: {integrity: sha512-Ie9z/WINcxxLp27BKOCHGde4ITq9UklYKDzVo1nhk5sqGEXU3FpkwP5GM2voTGJkGd9B3Otl+Q4uwSOeSUtOBA==} + engines: {node: '>=14.16'} + pkg-types@1.3.1: resolution: {integrity: sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==} @@ -7482,6 +7554,10 @@ packages: resolution: {integrity: sha512-q/UYvr1gOk4XII+Cu1CW2dINjYqJJFifTzogEaIARznrvX7uOlHsdTEXcnOBMuIsrCGEEKdNxi74kyMLZlKVfw==} engines: {node: '>=16.0.0', npm: '>=8.0.0'} + yocto-queue@1.2.2: + resolution: {integrity: sha512-4LCcse/U2MHZ63HAJVE+v71o7yOdIe4cZ70Wpf8D/IyjDKYQLV5GD46B+hSTjJsvV5PztjvHoU580EftxjDZFQ==} + engines: {node: '>=12.20'} + youch-core@0.3.3: resolution: {integrity: sha512-ho7XuGjLaJ2hWHoK8yFnsUGy2Y5uDpqSTq1FkHLK4/oqKtyUU1AFbOOxY4IpC9f0fTLjwYbslUz0Po5BpD1wrA==} @@ -8445,6 +8521,14 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.6.0 + '@liangmi/vp-config@1.0.0(oxlint@1.88.0(oxlint-tsgolint@7.0.2004)(vite-plus@1.3.0(@types/node@26.6.2)(@vitest/ui@5.0.5)(@volar/typescript@2.4.28(typescript@5.9.3))(@vue/language-core@3.3.13)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(typescript@5.9.3)(vue-tsc@3.3.13(typescript@5.9.3))(yaml@2.9.1)))(vite-plus@1.3.0(@types/node@26.6.2)(@vitest/ui@5.0.5)(@volar/typescript@2.4.28(typescript@5.9.3))(@vue/language-core@3.3.13)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(typescript@5.9.3)(vue-tsc@3.3.13(typescript@5.9.3))(yaml@2.9.1))': + dependencies: + '@oxlint-flat-config/composer': 0.3.1(d959c850b4c782dc3ce2d933ee010681) + oxlint-flat-config: 0.4.0(oxlint@1.88.0(oxlint-tsgolint@7.0.2004)(vite-plus@1.3.0(@types/node@26.6.2)(@vitest/ui@5.0.5)(@volar/typescript@2.4.28(typescript@5.9.3))(@vue/language-core@3.3.13)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(typescript@5.9.3)(vue-tsc@3.3.13(typescript@5.9.3))(yaml@2.9.1)))(vite-plus@1.3.0(@types/node@26.6.2)(@vitest/ui@5.0.5)(@volar/typescript@2.4.28(typescript@5.9.3))(@vue/language-core@3.3.13)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(typescript@5.9.3)(vue-tsc@3.3.13(typescript@5.9.3))(yaml@2.9.1)) + vite-plus: 1.3.0(@types/node@26.6.2)(@vitest/ui@5.0.5)(@volar/typescript@2.4.28(typescript@5.9.3))(@vue/language-core@3.3.13)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(typescript@5.9.3)(vue-tsc@3.3.13(typescript@5.9.3))(yaml@2.9.1) + transitivePeerDependencies: + - oxlint + '@mapbox/node-pre-gyp@2.0.3(supports-color@10.2.2)': dependencies: consola: 3.4.2 @@ -9653,6 +9737,13 @@ snapshots: '@oxfmt/binding-win32-x64-msvc@0.73.0': optional: true + '@oxlint-flat-config/composer@0.3.1(d959c850b4c782dc3ce2d933ee010681)': + dependencies: + oxlint-flat-config: 0.4.0(oxlint@1.88.0(oxlint-tsgolint@7.0.2004)(vite-plus@1.3.0(@types/node@26.6.2)(@vitest/ui@5.0.5)(@volar/typescript@2.4.28(typescript@5.9.3))(@vue/language-core@3.3.13)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(typescript@5.9.3)(vue-tsc@3.3.13(typescript@5.9.3))(yaml@2.9.1)))(vite-plus@1.3.0(@types/node@26.6.2)(@vitest/ui@5.0.5)(@volar/typescript@2.4.28(typescript@5.9.3))(@vue/language-core@3.3.13)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(typescript@5.9.3)(vue-tsc@3.3.13(typescript@5.9.3))(yaml@2.9.1)) + optionalDependencies: + oxlint: 1.88.0(oxlint-tsgolint@7.0.2004)(vite-plus@1.3.0(@types/node@26.6.2)(@vitest/ui@5.0.5)(@volar/typescript@2.4.28(typescript@5.9.3))(@vue/language-core@3.3.13)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(typescript@5.9.3)(vue-tsc@3.3.13(typescript@5.9.3))(yaml@2.9.1)) + vite-plus: 1.3.0(@types/node@26.6.2)(@vitest/ui@5.0.5)(@volar/typescript@2.4.28(typescript@5.9.3))(@vue/language-core@3.3.13)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(typescript@5.9.3)(vue-tsc@3.3.13(typescript@5.9.3))(yaml@2.9.1) + '@oxlint-tsgolint/darwin-arm64@7.0.2004': optional: true @@ -11661,6 +11752,8 @@ snapshots: commander@8.3.0: {} + common-path-prefix@3.0.0: {} + commondir@1.0.1: {} compatx@0.2.0: {} @@ -12077,6 +12170,16 @@ snapshots: dependencies: to-regex-range: 5.0.1 + find-cache-dir@6.0.0: + dependencies: + common-path-prefix: 3.0.0 + pkg-dir: 7.0.0 + + find-up@6.3.0: + dependencies: + locate-path: 7.2.0 + path-exists: 5.0.0 + flat@6.0.1: {} flatted@3.4.4: {} @@ -12255,6 +12358,11 @@ snapshots: hasown: 2.0.4 math-intrinsics: 1.1.0 + get-oxlint-rules@0.3.1: + dependencies: + find-cache-dir: 6.0.0 + tinyexec: 1.3.1 + get-port-please@3.2.0: {} get-proto@1.0.1: @@ -12279,6 +12387,8 @@ snapshots: github-slugger@2.0.0: {} + glob-distribute@0.1.0: {} + glob-parent@5.1.2: dependencies: is-glob: 4.0.3 @@ -12904,6 +13014,10 @@ snapshots: pkg-types: 2.4.0 quansync: 0.2.11 + locate-path@7.2.0: + dependencies: + p-locate: 6.0.0 + lodash@4.18.1: {} log-update@6.1.0: @@ -14418,6 +14532,14 @@ snapshots: '@oxfmt/binding-win32-x64-msvc': 0.73.0 vite-plus: 1.3.0(@types/node@26.6.2)(@vitest/ui@5.0.5)(@volar/typescript@2.4.28(typescript@5.9.3))(@vue/language-core@3.3.13)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(typescript@5.9.3)(vue-tsc@3.3.13(typescript@5.9.3))(yaml@2.9.1) + oxlint-flat-config@0.4.0(oxlint@1.88.0(oxlint-tsgolint@7.0.2004)(vite-plus@1.3.0(@types/node@26.6.2)(@vitest/ui@5.0.5)(@volar/typescript@2.4.28(typescript@5.9.3))(@vue/language-core@3.3.13)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(typescript@5.9.3)(vue-tsc@3.3.13(typescript@5.9.3))(yaml@2.9.1)))(vite-plus@1.3.0(@types/node@26.6.2)(@vitest/ui@5.0.5)(@volar/typescript@2.4.28(typescript@5.9.3))(@vue/language-core@3.3.13)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(typescript@5.9.3)(vue-tsc@3.3.13(typescript@5.9.3))(yaml@2.9.1)): + dependencies: + get-oxlint-rules: 0.3.1 + glob-distribute: 0.1.0 + optionalDependencies: + oxlint: 1.88.0(oxlint-tsgolint@7.0.2004)(vite-plus@1.3.0(@types/node@26.6.2)(@vitest/ui@5.0.5)(@volar/typescript@2.4.28(typescript@5.9.3))(@vue/language-core@3.3.13)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(typescript@5.9.3)(vue-tsc@3.3.13(typescript@5.9.3))(yaml@2.9.1)) + vite-plus: 1.3.0(@types/node@26.6.2)(@vitest/ui@5.0.5)(@volar/typescript@2.4.28(typescript@5.9.3))(@vue/language-core@3.3.13)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(typescript@5.9.3)(vue-tsc@3.3.13(typescript@5.9.3))(yaml@2.9.1) + oxlint-tsgolint@7.0.2004: optionalDependencies: '@oxlint-tsgolint/darwin-arm64': 7.0.2004 @@ -14451,6 +14573,14 @@ snapshots: oxlint-tsgolint: 7.0.2004 vite-plus: 1.3.0(@types/node@26.6.2)(@vitest/ui@5.0.5)(@volar/typescript@2.4.28(typescript@5.9.3))(@vue/language-core@3.3.13)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(typescript@5.9.3)(vue-tsc@3.3.13(typescript@5.9.3))(yaml@2.9.1) + p-limit@4.0.0: + dependencies: + yocto-queue: 1.2.2 + + p-locate@6.0.0: + dependencies: + p-limit: 4.0.0 + package-json-from-dist@1.0.1: {} package-manager-detector@1.9.0: {} @@ -14490,6 +14620,8 @@ snapshots: path-data-parser@0.1.0: {} + path-exists@5.0.0: {} + path-key@3.1.1: {} path-key@4.0.0: {} @@ -14520,6 +14652,10 @@ snapshots: pify@4.0.1: {} + pkg-dir@7.0.0: + dependencies: + find-up: 6.3.0 + pkg-types@1.3.1: dependencies: confbox: 0.1.8 @@ -16290,6 +16426,8 @@ snapshots: dependencies: lib0: 0.2.119 + yocto-queue@1.2.2: {} + youch-core@0.3.3: dependencies: '@poppinss/exception': 1.2.3 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index b0794fd..6c92836 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -7,6 +7,10 @@ shellEmulator: true trustPolicy: no-downgrade trustPolicyExclude: - semver@6.3.1 + # First publish of the Oxlint flat-config toolkit; required by @liangmi/vp-config. + - '@oxlint-flat-config/composer@0.3.1' + - oxlint-flat-config@0.4.0 + - '@liangmi/vp-config@1.0.0' packages: - . @@ -72,6 +76,7 @@ catalogs: unocss: ^66.6.7 tooling: + '@liangmi/vp-config': 1.0.0 '@types/node': 26.6.2 lint-staged: ^16.1.6 nuxtseo-devtools-host: ^1 diff --git a/vite.config.ts b/vite.config.ts new file mode 100644 index 0000000..e496b36 --- /dev/null +++ b/vite.config.ts @@ -0,0 +1,114 @@ +import { liangmi } from '@liangmi/vp-config' + +// Vite+ loads lint, fmt and test from this root file. Nuxt ignores it and owns +// application Vite via `nuxt.config.ts` (the B5004 warning is expected). +const siteLintIgnores = ['.nuxt/**', '.output/**', '.data/**', 'docs/**', 'public/**', '.agents/**'] + +const siteFmtIgnores = [ + ...siteLintIgnores, + '**/generated/**', + 'AGENTS.md', + 'pnpm-lock.yaml', + 'skills-lock.json', +] + +export default liangmi({ + test: { + environment: 'node', + globals: true, + include: ['tests/**/*.{test,spec}.{js,ts}'], + }, + lint: [ + { + name: 'froq/ignores', + ignores: siteLintIgnores, + }, + { + // Preset rules that do not match this Nuxt site's existing source. + // Keep the PR on the toolchain; do not rewrite application code to the + // style/restriction allowlist in one step. + name: 'froq/compat', + rules: { + 'eqeqeq': 'off', + 'eslint/class-methods-use-this': 'off', + 'eslint/default-case': 'off', + 'eslint/max-classes-per-file': 'off', + 'eslint/no-param-reassign': 'off', + 'import/extensions': 'off', + 'import/no-cycle': 'off', + 'import/no-default-export': 'off', + 'import/no-unassigned-import': 'off', + 'no-array-for-each': 'off', + 'no-negated-condition': 'off', + 'no-underscore-dangle': 'off', + 'no-useless-assignment': 'off', + 'node/no-sync': 'off', + 'oxc/approx-constant': 'off', + 'oxc/no-map-spread': 'off', + 'prefer-import-meta-properties': 'off', + 'promise/always-return': 'off', + 'promise/no-callback-in-promise': 'off', + 'unicorn/consistent-function-scoping': 'off', + 'unicorn/explicit-length-check': 'off', + 'unicorn/no-array-reduce': 'off', + 'unicorn/no-array-reverse': 'off', + 'unicorn/no-array-sort': 'off', + 'unicorn/no-useless-undefined': 'off', + 'unicorn/prefer-array-find': 'off', + 'unicorn/prefer-array-some': 'off', + 'unicorn/prefer-code-point': 'off', + 'unicorn/prefer-dom-node-append': 'off', + 'unicorn/prefer-dom-node-dataset': 'off', + 'unicorn/prefer-query-selector': 'off', + 'unicorn/prefer-string-replace-all': 'off', + }, + }, + { + name: 'froq/scripts', + files: ['**/scripts/**'], + rules: { + 'no-console': 'off', + }, + }, + { + name: 'froq/workers', + files: ['workers/**'], + rules: { + 'no-console': 'off', + }, + }, + ], + fmt: { + quoteProps: 'consistent', + singleAttributePerLine: true, + htmlWhitespaceSensitivity: 'strict', + trailingComma: 'all', + sortImports: false, + sortPackageJson: false, + ignorePatterns: siteFmtIgnores, + }, +}) + .exclude(['pack', 'staged']) + .option([ + { + path: '.', + node: true, + browser: true, + vue: true, + react: false, + }, + { + path: 'workers/froq-api', + node: true, + browser: false, + vue: false, + react: false, + }, + ]) + .remove('liangmi/style') + .override('liangmi/options', { + options: { + typeAware: false, + typeCheck: false, + }, + }) diff --git a/vitest.config.ts b/vitest.config.ts deleted file mode 100644 index c3a16bb..0000000 --- a/vitest.config.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { resolve } from 'node:path' -import { defineConfig } from 'vite-plus' - -export default defineConfig({ - test: { - environment: 'happy-dom', - globals: true, - include: ['tests/**/*.{test,spec}.{js,ts}'], - setupFiles: ['./tests/setup.ts'], - }, - resolve: { - alias: { - '~': resolve(__dirname, 'docs/.vitepress/theme'), - '@': resolve(__dirname, 'docs/.vitepress/theme/components'), - }, - }, -})