Built-in helpers (e.g. `concat`, `array`, `hash`) should never be flagged by `no-implicit-this`
See original GitHub issueThis is a perfectly valid template:
<Foo/>
{{~concat~}}
<Bar/>
The concat
helper should produce no output, since it has no arguments. But the tildes should remove whitespace around it.
It does not matter which helper I use for this purpose, it just has to be a helper that does nothing without arguments. concat
, though, seems to be giving a hint of what’s going on. 🔧✨
This does work.
But the linter complains with:
Ambiguous path ‘concat’ is not allowed. Use ‘@concat’ if it is a named argument or ‘this.concat’ if it is a property on ‘this’. If it is a helper or component that has no arguments you must manually add it to the ‘no-implicit-this’ rule configuration, e.g. ‘no-implicit-this’: { allow: [‘concat’] }.
Obviously, the leading tilde prevents the rule from recognizing that concat
is a helper.
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (4 by maintainers)
Top GitHub Comments
@lolmaus - Indeed it is! That is exactly what the error message you included in the original issue description tells you to do 😸
What I found:
Some of these seems to already have exceptions, e. g.
outlet
andyield
do not raise the error.hasBlock
does not even have any params, even though it’s only use case is withinif
.