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.

Ambiguous path is not allowed in tagged template

See original GitHub issue

When running with the new no-implicit-this rule, my test files are being picked up, for example:

test('something', async function(assert) {
  this.set('thing', {
    id: 123
  });

  await render(hbs`{{my-thing thing=thing}}`);
});

Ambiguous path 'thing' is not allowed. Use '@thing'

But the test fails if I change it to that.

It’s only complaining about a small selection of tests, despite there being many other similar tests (I’m not sure what it special about the few).

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
rwjbluecommented, Jul 27, 2018

Hmm, there are a few different pieces here I think.

  • to have the inline test templates checked I think you must be using eslint-plugin-hbs. eslint-plugin-hbs is hard coded to use the 0.8.x version of ember-template-lint (see here) which makes interop quite a bit trickier. I created https://github.com/psbanka/eslint-plugin-hbs/issues/25 to chat through that.
  • I don’t think that (in the snippet you gave) you should swap to @thing, it should instead be this.thing. Do the tests pass if you do it that way?
  • I am not sure why only some tests have the issue, can you test by copying one of the ones that work into a file of one that doesn’t, and see if it still complains?

Thanks for testing and reporting!

0reactions
amk221commented, Sep 18, 2018

Ok thanks, I’ll track that issue you linked to!

What about the other point I mentioned? Would I be right in thinking, that to create a failing test I should add:

{{helper}}

Here: https://github.com/ember-template-lint/ember-template-lint/blob/master/test/unit/rules/lint-no-implicit-this-test.js#L23 ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Secret detection CI job fails on tag pipeline - GitLab.org
Push a tag to the project, see the secret_detection fail with: fatal: ambiguous argument 'refs/remotes/origin/main... refs/remotes/origin/v3. 3.0 ...
Read more >
What is the preferred meaning of the ambiguous {path} tag? - TeX ...
First of all, note that tags are added based on what the poster of the question specifies. As such, you are not forced...
Read more >
Template function call ambiguity error - c++ - Stack Overflow
I renamed the class and it executes fine (ideone.com/ygVUcr). Not sure why min is conflicting with std::min . – Mahesh. May 15, 2015...
Read more >
Invalid Action Flow Error - OutSystems 11 Documentation
You have a Switch element in your Action that does not have the Otherwise path. Recommended action. Update the Switch element in the...
Read more >
Template literals (Template strings) - JavaScript | MDN
However, a tagged template literal may not result in a string; it can be used ... Tags allow you to parse template literals...
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