Commit 7da211d
committed
Fix template-no-unbound false positive in GJS/GTS
`unbound` is an ambient strict-mode keyword in Glimmer/Ember (registered
in STRICT_MODE_KEYWORDS, backed by BUILTIN_KEYWORD_HELPERS.unbound), so
`{{unbound foo}}` works in .gjs/.gts templates without an import. The
rule should still flag those uses everywhere — but skip cases where
`unbound` resolves to a JS import/const or a template block param.
ember-eslint-parser registers template block params in scope, so a
single sourceCode.getScope walk covers both JS bindings and block
params. Also updates templateMode from 'loose' to 'both' to reflect
that the rule now runs in strict mode.1 parent 56f913d commit 7da211d
File tree
8 files changed
+279
-364
lines changed- docs/rules
- lib/rules
- tests/lib/rules
8 files changed
+279
-364
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
286 | | - | |
| 286 | + | |
287 | 287 | | |
288 | 288 | | |
289 | 289 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | 3 | | |
6 | 4 | | |
7 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | 3 | | |
6 | 4 | | |
7 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
21 | 43 | | |
22 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
23 | 49 | | |
24 | 50 | | |
25 | 51 | | |
26 | 52 | | |
27 | 53 | | |
28 | 54 | | |
29 | 55 | | |
| 56 | + | |
30 | 57 | | |
31 | | - | |
32 | 58 | | |
| 59 | + | |
33 | 60 | | |
34 | 61 | | |
35 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
| |||
59 | 58 | | |
60 | 59 | | |
61 | 60 | | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | 61 | | |
121 | 62 | | |
122 | 63 | | |
| |||
137 | 78 | | |
138 | 79 | | |
139 | 80 | | |
140 | | - | |
141 | 81 | | |
142 | 82 | | |
143 | 83 | | |
| |||
149 | 89 | | |
150 | 90 | | |
151 | 91 | | |
152 | | - | |
153 | 92 | | |
154 | 93 | | |
155 | 94 | | |
| |||
161 | 100 | | |
162 | 101 | | |
163 | 102 | | |
164 | | - | |
165 | 103 | | |
166 | 104 | | |
167 | 105 | | |
| |||
190 | 128 | | |
191 | 129 | | |
192 | 130 | | |
193 | | - | |
194 | 131 | | |
195 | 132 | | |
196 | 133 | | |
197 | 134 | | |
198 | 135 | | |
199 | | - | |
| 136 | + | |
200 | 137 | | |
201 | 138 | | |
202 | 139 | | |
203 | | - | |
204 | 140 | | |
205 | 141 | | |
206 | 142 | | |
207 | | - | |
| 143 | + | |
208 | 144 | | |
209 | 145 | | |
210 | 146 | | |
| |||
0 commit comments