diff --git a/packages/core-eslint/base.js b/packages/core-eslint/base.js index bab3131..0b4ba59 100644 --- a/packages/core-eslint/base.js +++ b/packages/core-eslint/base.js @@ -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"; // +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.