T-HUB/eslint.config.mjs
glass beadian aa5e262f3a Tactical Media Broadcast Hub — initial release
Self-hosted multi-platform broadcast newsroom for activist collectives:
publishing pipeline with group approval and DST-proof scheduling, TweetDeck-style
column wall with hostile-content-safe rendering, live control room with Auto
Director, bridged chat governance with polls and quorum, distributed sandboxed
transcode workers, encrypted content-addressed archive, monthly analytics.

MIT licensed. See README.md and docs/.
2026-10-10 11:56:42 +00:00

48 lines
1.5 KiB
JavaScript

import tseslint from "typescript-eslint";
const PROVIDER_IDS =
"youtube|facebook|instagram|threads|linkedin|mastodon|bluesky|reddit|tiktok|twitch|peertube|discord|slack|telegram";
/** Provider branching belongs in connector packages only — never in core/app code. */
const noProviderBranching = {
files: ["**/*.ts", "**/*.tsx"],
ignores: [
"packages/connector-*/**",
"packages/testing/**",
// apps/web/src/lib is the mock-registry boundary: manifest-shaped data that
// stands in for ConnectorRegistry until the real registry feeds the UI —
// same standing as packages/testing. Pages must import from here, never
// declare provider literals inline.
"apps/web/src/lib/**",
"**/*.test.ts",
],
rules: {
"no-restricted-syntax": [
"error",
{
selector: `Literal[value=/${PROVIDER_IDS}/]`,
message:
"Provider string literal outside a connector package — resolve via ConnectorRegistry instead of branching on provider names.",
},
],
},
};
export default tseslint.config(
{ ignores: ["**/dist/**", "**/.next/**", "**/*.config.mjs"] },
...tseslint.configs.recommended.map((config) => ({
...config,
files: ["**/*.ts", "**/*.tsx"],
})),
{
files: ["**/*.ts", "**/*.tsx"],
rules: {
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-unused-vars": [
"error",
{ argsIgnorePattern: "^_" },
],
},
},
noProviderBranching,
);