feat(core-eslint): rule no-realtime-handler-reexport
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,7 @@ import turboPlugin from "eslint-plugin-turbo";
|
||||
import boundaries from "eslint-plugin-boundaries";
|
||||
import globals from "globals";
|
||||
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/**"] },
|
||||
@@ -172,11 +173,20 @@ 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.
|
||||
{
|
||||
files: ["**/*.{ts,tsx,mjs,cjs,js}"],
|
||||
plugins: { "repo-rules": { rules: { "no-direct-socket-io": noDirectSocketIO } } },
|
||||
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