feat(core-eslint): add no-undeclared-analytics-event ESLint rule
Adds the conformance/no-undeclared-analytics-event rule at warn severity,
mirroring no-undeclared-audit and no-undeclared-event-publish. The rule
cross-checks analytics.track("X", ...) literal slugs in *.use-case.ts
files against manifest.useCases[name].analyticsEvents, providing
sub-second editor feedback before boot-time conformance fires.
- Extends _manifest-ast.js to parse analyticsEvents arrays in both
extractUseCaseEntry helpers
- Registers rule in plugin.js and base.js at ["warn", { repoRoot }]
- RuleTester fixtures: declared pass, undeclared warn, non-literal no-op,
non-use-case file no-op, missing manifest entry no-op
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -47,6 +47,7 @@ export default [
|
||||
"conformance/required-cores-installed": ["error", { repoRoot }],
|
||||
"conformance/no-undeclared-event-publish": ["warn", { repoRoot }],
|
||||
"conformance/no-undeclared-audit": ["warn", { repoRoot }],
|
||||
"conformance/no-undeclared-analytics-event": ["warn", { repoRoot }],
|
||||
"conformance/usecase-must-be-wired": ["error", { repoRoot }],
|
||||
"conformance/component-must-have-story": "warn",
|
||||
"conformance/component-must-have-test": "warn",
|
||||
|
||||
Reference in New Issue
Block a user