[Rule Idea] Enforce Splattributes
See original GitHub issueThis rule should check that exactly one element in the template has ...attributes
attached to it.
Alternatively we could make it configurable to only error for multiple ...attributes
, but allow zero and one instances of it.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Forwarding Element Modifiers with "Splattributes" - Ember RFCs
When teaching advanced component composition patterns, we can introduce the concept of "components that invokes other components". This would be ...
Read more >ember-template-lint | Yarn - Package Manager
ember-template-lint is a library that will lint your handlebars template and return error results. For example, if the rule no-bare-strings is enabled, this ......
Read more >Transformer - IBM
Use the Transformer to implement the business logic for your use case. ... As opposed to normal records, which contain any number of...
Read more >Rules - ESLint - Pluggable JavaScript Linter
Rules in ESLint are grouped by type to help you understand their purpose. Each rule has emojis ... Enforce return statements in callbacks...
Read more >ember-template-lint: Versions | Openbase
#2731 Allow nested menuitem s in no-nested-interactive rule (@geneukum). Documentation ... #2483 Implement support for embedded templates (@ventuno).
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
hmm okay, guess then the rule should only warn if there are no splattributes at all
I think this rule should work if component has internal “wrapper” node, or component and “wrapped node inside” (only in this case), other cases looks so complex and our linting may confuse developers.
rule apply exmples:
unsupported cases:
if only one root node in template and node is not capitalized -> apply rule into this node
if only one root node and node self-closed -> apply rule into this node
if only one root node and node writeen block and capitalized and inside node level only one child node and this node is not capitalized -> apply rule into this child node
if template already has
...attributes
-> ignore rule applyother cases -> ignore rule apply