perf(client): restore bundle guardrails

This commit is contained in:
2026-07-16 19:35:51 +08:00
parent 40c6de5a06
commit 990add97f8
6 changed files with 69 additions and 17 deletions
+22
View File
@@ -5,6 +5,28 @@ import nextTs from "eslint-config-next/typescript";
const eslintConfig = defineConfig([
...nextVitals,
...nextTs,
{
files: ["src/**/*.{ts,tsx}"],
rules: {
"no-restricted-imports": [
"error",
{
paths: [
{
name: "@/data/repositories",
message:
"Import the concrete repository module so unrelated browser storage stays out of the client graph.",
},
{
name: "@/data/storage",
message:
"Import the concrete storage module so unrelated persistence code stays out of the client graph.",
},
],
},
],
},
},
{
files: ["src/app/**/*.{ts,tsx}"],
ignores: ["src/app/api/**", "src/app/**/route.ts"],