feat(core-eslint): anchors for realtime rules splice
This commit is contained in:
@@ -14,6 +14,14 @@ const ANCHORS = {
|
|||||||
"src/integrations/cms/index.ts": ["// <gen:job-tasks>"],
|
"src/integrations/cms/index.ts": ["// <gen:job-tasks>"],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
describe("// <gen:*> anchor presence in core-eslint/base.js", () => {
|
||||||
|
it("base.js contains realtime-rules-imports anchor", () => {
|
||||||
|
const baseSource = readFileSync(join(REPO_ROOT, "packages/core-eslint/base.js"), "utf8");
|
||||||
|
expect(baseSource).toContain("// <gen:realtime-rules-imports>");
|
||||||
|
expect(baseSource).toContain("// <gen:realtime-rules>");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
describe("// <gen:*> anchor presence in feature packages", () => {
|
describe("// <gen:*> anchor presence in feature packages", () => {
|
||||||
for (const feature of FEATURES) {
|
for (const feature of FEATURES) {
|
||||||
for (const [relPath, anchors] of Object.entries(ANCHORS)) {
|
for (const [relPath, anchors] of Object.entries(ANCHORS)) {
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import tseslint from "typescript-eslint";
|
|||||||
import turboPlugin from "eslint-plugin-turbo";
|
import turboPlugin from "eslint-plugin-turbo";
|
||||||
import boundaries from "eslint-plugin-boundaries";
|
import boundaries from "eslint-plugin-boundaries";
|
||||||
import globals from "globals";
|
import globals from "globals";
|
||||||
|
// <gen:realtime-rules-imports>
|
||||||
import noDirectSocketIO from "./rules/no-direct-socket-io.js";
|
import noDirectSocketIO from "./rules/no-direct-socket-io.js";
|
||||||
import noRealtimeHandlerReexport from "./rules/no-realtime-handler-reexport.js";
|
import noRealtimeHandlerReexport from "./rules/no-realtime-handler-reexport.js";
|
||||||
|
|
||||||
@@ -174,6 +175,7 @@ export default [
|
|||||||
// R2 — `socket.io` and `socket.io-client` must not be imported outside
|
// R2 — `socket.io` and `socket.io-client` must not be imported outside
|
||||||
// core-realtime/src/ and apps/*/server.ts. Use @repo/core-realtime helpers.
|
// 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.
|
// R1 (ADR-016) — Realtime handlers must not be re-exported outside bind-* files.
|
||||||
|
// <gen:realtime-rules>
|
||||||
{
|
{
|
||||||
files: ["**/*.{ts,tsx,mjs,cjs,js}"],
|
files: ["**/*.{ts,tsx,mjs,cjs,js}"],
|
||||||
plugins: {
|
plugins: {
|
||||||
|
|||||||
Reference in New Issue
Block a user