43081j / eslint-plugin-lit

lit-html support for ESLint
120 stars 22 forks source link

Add rule to ensure known boolean attributes are bound using boolean binding #92

Open stramel opened 3 years ago

stramel commented 3 years ago

Add a rule to check that known boolean attributes are bound using the "boolean attribute binding", ?.

Attributes like hidden, disabled, checked etc. if bound to a variable should be using the ? binding syntax.

stramel commented 3 years ago

In the case of ?hidden=${true} or ?hidden=${false} might be worth a rule similar to no-useless-template-literals where the binding would never change and be equivalent to hidden or no attribute respectively.