Rule request [no-unknown-html-attributes]
See original GitHub issueIt’s really easy to create mistake (especially for newcomers) working with arguments/attributes in Angle components.
<FlashMessage flash={{flash}} />
vs
<FlashMessage @flash={{flash}} />
And it’s likely hard to debug, because it’s impossible to get list of passed to component html attributes (even in ember inspector) cc @chancancode
I wondering, is it make sence to have all list of possible attributes, and produce error if developer trying to specify invalid html attribute for Angle component?
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
[no-unknown-property] data-* attributes should be allowed to ...
Technically HTML tags and their attributes are case insensitive [1]. But React types generally prevent usage of the uppercase/mixed case ...
Read more >HTML attribute reference - HTML: HyperText Markup Language
Attribute Name Elements Description
accept‑charset List of supported charsets.
align, , , , , , , , , , , , , Specifies the horizontal...
Read more >Available rules - HTML-validate
Available rules ; attr-delimiter, Disallow whitespace between attribute key and value ; attr-spacing, Require attributes to be separated by whitespace ; close-attr ...
Read more >Is it OK to use unknown HTML tags? - Stack Overflow
The rule for custom elements is that you need to use a hyphen in the name. If you do that, you're guaranteed to...
Read more >Rules | Stylelint
Disallow unknown things with these no-unknown rules. ... selector-attribute-quotes : Require or disallow quotes for attribute values (Autofixable).
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I don’t think so. This technique would mean that we start with a non-trivial number of invalid errors being flagged. That just isn’t a good trade off.
See, told you it was easy 😉
one more list: https://github.com/iandevlin/html-attributes