Extends the conformance ESLint layer with the consent-check rule:
- `no-undeclared-consent-check` (warn): `consent.isGranted("X")` in a
use-case file must match a category declared in `manifest.requiresConsent`;
also warns when requiresConsent is declared but no isGranted call is found.
- `_manifest-ast.js`: adds `parseManifestFully` which extracts top-level
`name`, `requiredCores`, `requiresConsent`, and per-use-case maps from the
manifest AST; `requiresConsent` extraction tested in `_manifest-ast.test.js`.
- `_rule-context.js` / `_rule-schema.js`: shared helpers extracted from the
existing per-rule files so the new rule can resolve use-case name + feature
root without duplication.
- Existing rules (`no-undeclared-audit`, `no-undeclared-event-publish`,
`no-undeclared-analytics-event`) updated to use the shared helpers.
- `plugin.js` + `base.js` register the rule at warn severity.
- CLAUDE.md + conformance-quickref.md: rule count advanced from 11 → 12.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
65 lines
1.6 KiB
JSON
65 lines
1.6 KiB
JSON
{
|
|
"$schema": "https://raw.githubusercontent.com/fallow-rs/fallow/main/schema.json",
|
|
"ignorePatterns": [
|
|
"**/node_modules/**",
|
|
"**/dist/**",
|
|
"**/.next/**",
|
|
"**/.turbo/**",
|
|
"**/storybook-static/**",
|
|
"**/__snapshots__/**",
|
|
"**/turbo/generators/templates/**",
|
|
"**/*.generated.ts",
|
|
"**/*.d.ts"
|
|
],
|
|
"dynamicallyLoaded": [
|
|
"packages/**/__factories__/**",
|
|
"packages/**/__seeds__/**",
|
|
"apps/**/instrumentation.ts",
|
|
"apps/**/instrumentation-client.ts",
|
|
"apps/storybook/test-runner.config.ts",
|
|
"scripts/**/*.mjs"
|
|
],
|
|
"publicPackages": ["@repo/core-*"],
|
|
"ignoreDependencies": [
|
|
"@payloadcms/ui",
|
|
"sass",
|
|
"sharp",
|
|
"@tanstack/react-query",
|
|
"@trpc/server",
|
|
"superjson",
|
|
"@repo/blog",
|
|
"@repo/core-api",
|
|
"@repo/marketing-pages",
|
|
"@repo/navigation",
|
|
"@repo/core-testing",
|
|
"http-server",
|
|
"wait-on",
|
|
"@opentelemetry/api-logs",
|
|
"@typescript-eslint/eslint-plugin",
|
|
"@testing-library/user-event",
|
|
"zod",
|
|
"@eslint/js",
|
|
"@opentelemetry/sdk-node",
|
|
"@sentry/opentelemetry",
|
|
"@stryker-mutator/core",
|
|
"@stryker-mutator/vitest-runner"
|
|
],
|
|
"ignoreExportsUsedInFile": true,
|
|
"rules": {
|
|
"unused-files": "warn",
|
|
"unused-exports": "warn",
|
|
"unused-types": "off",
|
|
"unused-class-members": "warn",
|
|
"unused-dependencies": "warn",
|
|
"unused-dev-dependencies": "warn",
|
|
"unlisted-dependencies": "warn",
|
|
"circular-dependencies": "error",
|
|
"duplicate-code": "warn"
|
|
},
|
|
"health": {
|
|
"maxCyclomatic": 25,
|
|
"maxCognitive": 30,
|
|
"maxCrap": 400
|
|
}
|
|
}
|