refactor: remove core-realtime from main (scaffoldable via gen core-package realtime)
This commit is contained in:
@@ -5,8 +5,6 @@ import turboPlugin from "eslint-plugin-turbo";
|
||||
import boundaries from "eslint-plugin-boundaries";
|
||||
import globals from "globals";
|
||||
// <gen:realtime-rules-imports>
|
||||
import noDirectSocketIO from "./rules/no-direct-socket-io.js";
|
||||
import noRealtimeHandlerReexport from "./rules/no-realtime-handler-reexport.js";
|
||||
|
||||
export default [
|
||||
{ ignores: ["dist/**", "node_modules/**", ".next/**", ".turbo/**", "storybook-static/**"] },
|
||||
@@ -48,10 +46,6 @@ export default [
|
||||
{ type: "tooling", pattern: "packages/core-testing" },
|
||||
{ type: "core-composition", pattern: "packages/core-api" },
|
||||
{ type: "core-composition", pattern: "packages/core-cms" },
|
||||
// Explicit entry placed before the catch-all so its `mode: "folder"`
|
||||
// is preferred — needed for boundaries-plugin to resolve element root
|
||||
// by directory rather than by package.json name.
|
||||
{ type: "core", pattern: "packages/core-realtime", mode: "folder" },
|
||||
{ type: "core", pattern: "packages/core-*" },
|
||||
{ type: "feature", pattern: "packages/!(core-*)" },
|
||||
],
|
||||
@@ -172,23 +166,8 @@ export default [
|
||||
],
|
||||
},
|
||||
},
|
||||
// R2 — `socket.io` and `socket.io-client` must not be imported outside
|
||||
// core-realtime/src/ and apps/*/server.ts. Use @repo/core-realtime helpers.
|
||||
// R1 (ADR-016) — Realtime handlers must not be re-exported outside bind-* files.
|
||||
// R2 / R1 (ADR-016) — realtime-specific ESLint rules (no-direct-socket-io,
|
||||
// no-realtime-handler-reexport) are added here when @repo/core-realtime is
|
||||
// scaffolded via `pnpm turbo gen core-package realtime`.
|
||||
// <gen:realtime-rules>
|
||||
{
|
||||
files: ["**/*.{ts,tsx,mjs,cjs,js}"],
|
||||
plugins: {
|
||||
"repo-rules": {
|
||||
rules: {
|
||||
"no-direct-socket-io": noDirectSocketIO,
|
||||
"no-realtime-handler-reexport": noRealtimeHandlerReexport,
|
||||
},
|
||||
},
|
||||
},
|
||||
rules: {
|
||||
"repo-rules/no-direct-socket-io": "error",
|
||||
"repo-rules/no-realtime-handler-reexport": "error",
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user