Closed
Description
Similar to https://eslint.org/docs/rules/no-restricted-syntax, but for templates. Taking #308 as an example:
{
"rules": {
"@angular-eslint/template/no-restricted-syntax": [
"error",
{
"selector": "Element[name='button']:not(:has(:matches(BoundAttribute, TextAttribute)[name='type']))",
"message": "Missing an explicit type attribute for button"
},
{
"selector": "Element[name='button'] :matches(BoundAttribute, TextAttribute)[name='type'][value!=/^(button|reset|submit)$/]",
"message": "Invalid value for button type attribute"
},
]
}
}