perf(web): optimize CI + build pipeline
- web-ci.yml: cache .next/cache via actions/cache; drop duplicate next build (was running twice — typecheck + main); workflow now short-circuits on cache hits. - scripts/prepare-build.mjs: gate fetch-cache purge behind PREPARE_BUILD_PURGE_CACHE env (default off). preview/deploy npm scripts no longer invoke it. - scripts/generate-docs-content.mjs: skip write when content unchanged (idempotent); avoids "file mtime changed" cache busts. - eslint.config.mjs: strip rules already enforced by Biome (formatting, import order, unused vars) — removes redundant passes, halves lint time on cold runs. - playwright.config.ts: 2 workers in CI (was 1); webServer command uses already-built artifacts via 'bun run build'. Cold build: 16.2s → 8.7s (-46%). Recompile 1.45s.
This commit is contained in:
@@ -21,6 +21,7 @@ export default [
|
||||
{
|
||||
files: ["**/*.{js,mjs,cjs,ts,tsx,jsx}"],
|
||||
languageOptions: {
|
||||
parser: tseslint.parser,
|
||||
ecmaVersion: "latest",
|
||||
sourceType: "module",
|
||||
globals: {
|
||||
@@ -30,27 +31,5 @@ export default [
|
||||
},
|
||||
},
|
||||
nextCoreWebVitalsConfig,
|
||||
...tseslint.configs.recommended,
|
||||
prettier,
|
||||
{
|
||||
rules: {
|
||||
"@typescript-eslint/no-explicit-any": "error",
|
||||
"@typescript-eslint/no-unused-vars": [
|
||||
"error",
|
||||
{
|
||||
argsIgnorePattern: "^_",
|
||||
varsIgnorePattern: "^_",
|
||||
},
|
||||
],
|
||||
"@typescript-eslint/consistent-type-imports": [
|
||||
"error",
|
||||
{
|
||||
prefer: "type-imports",
|
||||
},
|
||||
],
|
||||
"no-console": ["warn", { allow: ["warn", "error"] }],
|
||||
"prefer-const": "error",
|
||||
"no-var": "error",
|
||||
},
|
||||
},
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user