-
Notifications
You must be signed in to change notification settings - Fork 0
Add ESLint plugin for annotation enforcement #6
Copy link
Copy link
Open
Description
Branch: feat/add-eslint-plugin
Priority: Low
Estimate: 4-5 hours
Parent Epic: #1
Dependencies: #2
Description
Create ESLint plugin to enforce annotation best practices at lint time. This prevents common mistakes like missing annotations, incorrect naming patterns, and duplicate test case IDs. It provides immediate feedback during development rather than at runtime.
Acceptance Criteria
- Linter catches missing
testSuiteName,journeyId, ortestCaseIdannotations - Linter validates annotation naming patterns and hierarchy
- Linter detects duplicate
testCaseIdvalues across test files - Can be configured in
eslint.config.jswith custom rules - Documentation includes setup guide and rule configuration options
- Unit tests for each rule cover common scenarios
Technical Requirements
- Create plugin structure in
packages/annotations/src/eslint-plugin/ - Implement
require-test-annotationsrule (error if missing) - Implement
valid-annotation-formatrule (warn for naming issues) - Implement
no-duplicate-test-case-idrule (error on duplicates) - Write comprehensive tests for each rule
- Export plugin from
@lytics/playwright-annotations/eslint - Add configuration examples to README
New Files
packages/annotations/src/eslint-plugin/index.tspackages/annotations/src/eslint-plugin/rules/require-test-annotations.tspackages/annotations/src/eslint-plugin/rules/valid-annotation-format.tspackages/annotations/src/eslint-plugin/rules/no-duplicate-test-case-id.ts
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels