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.

Disable `no-curly-component-invocation` rule in `octane` configuration

See original GitHub issue

The no-curly-component-invocation rule in the octane configuration is creating a lot of false positives as it has no knowledge of what is a helper or component and in some cases it also flags regular {{foo}} values as components.

To avoid this unnecessary noise for Octane users we should disable the rule until we figure these issues out.

The second issue is clearly a bug, the first one can’t really be solved, but we could still use a better heuristic and e.g. consider curlies with positional args as helpers.

/cc @rwjblue @lifeart

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
rwjbluecommented, Nov 17, 2019

@patocallaghan - Thanks for offering to work on it!

I think these two are “ready” for implementation work:

Do not flag invocations with positional params (straight forward to understand) Do not flag ambiguous mustaches as component invocations

Then we can see where things settle and decide if we need another config option for strict (it’s still not 100% clear what this would mean, so fixing the first two would help clarify).

in this context what does ambiguous look like?

Ambiguous specifically means:

A MustacheStatement (does not apply to BlockStatements as they are never ambiguous), with no positional arguments and no named arguments. They would look like:

{{foo}}
0reactions
patocallaghancommented, Nov 26, 2019

@rwjblue I’ve finally got some time to work on these fixes. I just have a clarification question.

We previously shipped a fix in https://github.com/ember-template-lint/ember-template-lint/pull/861 which implemented the following logic:

We could tweak things a bit so that the rule does not apply to block params when used without any arguments (e.g. {{foo}} vs either {{foo whatever}} or {{foo some=thing}}).

So this slightly contradicts the feedback above (or maybe it doesn’t 🤔)

Do not flag invocations with positional params (straight forward to understand)

Does the change I’m making here, Do not flag invocations with positional params apply to be block params and non-block params, or just to non-block params? Do I need to refactor the previous change we shipped?

Read more comments on GitHub >

github_iconTop Results From Across the Web

[BUG] `no-curly-component-invocation` rule throwing ... - GitHub
After enabling this rule, in my template files I'm seeing yielded ... the rule but it's turned to requireDash: false for the Octane...
Read more >
Rule examples - ADM Help Centers - Micro Focus
Action: POST ALM Octane entity information to the endpoint URL: http://myServer:8081/myAPI. For details on setting up Trigger Webhook rules to POST information ...
Read more >
@clark/ember-template-lint-config - npm
This config extends clark:octane and disables a few rules, so that the linter does not go crazy on code that was written pre-Octane....
Read more >
ember-template-lint/README.md - UNPKG
123, Running a single rule, disabling inline configuration ... extends the `recommended` preset by enabling Ember Octane rules |.
Read more >
Turn off business rule during flow execution - ServiceNow
I am updating multiple records thru flow designer. Since Business rules are set on the fields which are getting updated, i am not...
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