question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Built-in helpers (e.g. `concat`, `array`, `hash`) should never be flagged by `no-implicit-this`

See original GitHub issue

This 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:closed
  • Created 4 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
rwjbluecommented, Feb 22, 2020

@lolmaus - Indeed it is! That is exactly what the error message you included in the original issue description tells you to do 😸

0reactions
lolmauscommented, Feb 23, 2020

I can’t figure out other built in helpers except (debugger) with use-cases without arguments.

What I found:

array
concat
debugger
hash
hasBlock
hasBlockParams
outlet
yield

Some of these seems to already have exceptions, e. g. outlet and yield do not raise the error.

hasBlock does not even have any params, even though it’s only use case is within if.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Feature request: built-in "join" helper · Issue #133
This should be modified to handle cases when context is null, the context is not an array, the delimiter is null, etc.
Read more >
The Definitive TypeScript 4.8 Guide
For example, the noImplicitAny flag, when false , will prevent the compiler from emitting warnings about untyped variables. Over time, a project ...
Read more >
https://raw.githubusercontent.com/microsoft/TypeSc...
Never, "never"); // `uniqueLiteralType` is a special `never` flagged by ... e.g. if we want to import file `foo.mts`, we should write `import...
Read more >
PyCharm 182.2574.7 Release Notes | Knowledge Base - YouTrack
JSP default package inspection incorrectly displays an error for array types. Bug, IDEA-189769, Analyze data flow from here should be available on interface ......
Read more >
npm-all-packages
We found a way for you to contribute to the project! Looks like npm-all-packages is missing a security policy. You can connect your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found