Repository: ember-template-lint/ember-template-lint (js)

Issue:
no-shadowed-elements should allow component names including a dot to start lower case
Currently this is considered a violation of `no-shadowed-elements` rule:

```
<Foo as |s|>
  <s.bar />
</Foo>
```

If local variable is a hash and therefore component is referred to be dot notation, it can't shadow elements. Therefore the hash should not be enforced to start with an uppercase char IMO.

Pull request:
element containing dot should not be considered ambiguous
Before a yielded hash had to start with uppercase char to not violate no-shadowed-elements rule even so it could not shadow any element cause having a dot in path.

Fixes #473

Patch:
diff --git a/lib/rules/lint-no-shadowed-elements.js b/lib/rules/lint-no-shadowed-elements.js
index b80922a3..d97d3305 100644
--- a/lib/rules/lint-no-shadowed-elements.js
+++ b/lib/rules/lint-no-shadowed-elements.js
@@ -21,8 +21,9 @@ module.exports = class NoShadowedElements extends Rule {
 
         let firstChar = node.tag.charAt(0);
         let startsWithUpperCase = firstChar === firstChar.toUpperCase() && firstChar !== firstChar.toLowerCase();
+        let containsDot = node.tag.includes('.');
 
-        if (!startsWithUpperCase) {
+        if (!startsWithUpperCase && !containsDot) {
           this.log({
             message: `Ambiguous element used (\`${node.tag}\`)`,
             line: node.loc && node.loc.start.line,


Test patch:
diff --git a/test/unit/rules/lint-no-shadowed-elements-test.js b/test/unit/rules/lint-no-shadowed-elements-test.js
index c5f206ee..c073a605 100644
--- a/test/unit/rules/lint-no-shadowed-elements-test.js
+++ b/test/unit/rules/lint-no-shadowed-elements-test.js
@@ -11,6 +11,7 @@ generateRuleTests({
     '{{#foo-bar as |Baz|}}<Baz />{{/foo-bar}}',
     '<FooBar as |Baz|><Baz /></FooBar>',
     '{{#with foo=(component "blah-zorz") as |Div|}}<Div></Div>{{/with}}',
+    '<Foo as |bar|><bar.baz /></Foo>',
   ],
 
   bad: [