recommended
config.
🔧 This rule is automatically fixable by the --fix
CLI option.
{
"generate-test-id/jsx": ["error", { "attributes": "data-test-id" }]
}
{
"generate-test-id/jsx": ["error", { "attributes": ["data-test-id", "data-qa-id"], "length": 16 }]
}
attributes
- An array of attribute names or an attribute name, filled with generated id. Default is['data-test-id', 'data-testid']
.length
- The length of the generated id value. Defaults to8
.