ESLint Plugin for Test Selectors

JSON →
library 2.2.0 ·javascript
verified May 27, 2026

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.

total hits 64
actors 8 distinct systems
last hit 5d ago AhrefsBot
MetaBot
4
GPTBot
2
Script
1
ClaudeBot
1
Search engines
2

top countries 🇫🇷 France · 🇺🇸 United States · 🇨🇦 Canada · 🇳🇴 Norway · 🇩🇪 Germany