Commit d6b0d19
committed
refactor: align component check with ember-cli#2724 canonical (lists + scope)
Replace the inline PascalCase-regex isComponentInvocation heuristic with
the lists + scope pattern established by @NullVoxPopuli in ember-cli#2689 and
canonicalised by ember-cli#2724. The new lib/utils/is-native-element.js mirrors
without conflict — whichever lands first introduces the file; the other
rebases to a no-op on it.
Heuristic approaches (PascalCase regex, `tag.includes('.')`, etc.) were
explicitly rejected in ember-cli#2689 because lowercase tags CAN be components in
GJS/GTS when the name is shadowed by a scope binding
(`const div = MyComponent; <div />`). Scope analysis catches this;
regex heuristics don't.
Call site now uses `!isNativeElement(node, sourceCode)` directly to
match the canonical usage pattern in ember-cli#2724's migrated rules.1 parent 0341bad commit d6b0d19
3 files changed
Lines changed: 7 additions & 97 deletions
File tree
- lib
- rules
- utils
- tests/lib/utils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
107 | 108 | | |
108 | 109 | | |
109 | 110 | | |
110 | | - | |
111 | | - | |
112 | | - | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
113 | 115 | | |
114 | | - | |
| 116 | + | |
115 | 117 | | |
116 | 118 | | |
117 | 119 | | |
| |||
This file was deleted.
This file was deleted.
0 commit comments