eslint-plugin-lit icon indicating copy to clipboard operation
eslint-plugin-lit copied to clipboard

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

Open stramel opened this issue 4 years ago • 1 comments

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 avatar May 10 '21 16:05 stramel

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.

stramel avatar May 17 '21 19:05 stramel