ESLint Plugin for Test Selectors
JSON →eslint-plugin-test-selectors is an ESLint plugin designed to enforce the presence of specific DOM attributes, such as `data-test-id`, on interactive elements within your application's UI. This is crucial for robust UI testing, allowing test automation tools to reliably select and interact with elements. The plugin is currently on stable version `2.2.0`, with recent updates indicating active maintenance and minor feature development. It supports highly configurable test attributes, allowing users to specify single or multiple attribute names (e.g., `data-testid`, `testId`) for improved flexibility. Key differentiators include its ability to ignore disabled or readonly elements by default, and auto-fix capabilities for certain rules, like `onClick`. It integrates seamlessly with ESLint configurations, offering recommended rule sets (`recommended` and `recommendedWithErrors`) and granular control over individual rules, making it a flexible tool for improving the testability of frontend applications.
Traffic · last 30 days ↑67% vs prev 7d
top countries 🇫🇷 France · 🇺🇸 United States · 🇨🇦 Canada · 🇳🇴 Norway · 🇩🇪 Germany