feat(core-eslint): register conformance plugin + structural rules in base config

This commit is contained in:
2026-05-12 23:24:01 +02:00
parent 8a2c8db955
commit b9ac64b36b

View File

@@ -4,8 +4,14 @@ import tseslint from "typescript-eslint";
import turboPlugin from "eslint-plugin-turbo";
import boundaries from "eslint-plugin-boundaries";
import globals from "globals";
import conformancePlugin from "./plugin.js";
import path from "node:path";
import { fileURLToPath } from "node:url";
// <gen:realtime-rules-imports>
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const repoRoot = path.resolve(__dirname, "..", "..");
export default [
{ ignores: ["dist/**", "node_modules/**", ".next/**", ".turbo/**", "storybook-static/**"] },
js.configs.recommended,
@@ -23,6 +29,23 @@ export default [
"turbo/no-undeclared-env-vars": "warn",
},
},
{
plugins: { conformance: conformancePlugin },
rules: {
// Structural conformance rules (milestone iii.a).
// `feature-must-have-manifest` is WARN today because only auth has a manifest;
// flip to ERROR after blog/media/navigation/marketing-pages migrate.
"conformance/feature-must-have-manifest": [
"warn",
{ repoRoot },
],
"conformance/usecase-must-have-test-file": "error",
"conformance/required-cores-installed": [
"error",
{ repoRoot },
],
},
},
{
rules: {
// Honour the leading-underscore convention for intentionally-unused params/vars.