Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aura Components Markup Linter errors on an attribute with value "{# ... }" #950

Open
eltoroit opened this issue Nov 2, 2018 · 10 comments
Open

Comments

@eltoroit
Copy link

eltoroit commented Nov 2, 2018

Summary

This code

fails linter, but is valid Aura Components markup.

Steps To Reproduce:

  1. Create an Aura component
  2. Add this markup
    <div style="{# 'background-image:url(' + v.url+ ')'}">...</div>
  3. Save the code, Linter complains

Expected result

  1. Linter should not complain

Actual result

Linter is complaining

Additional information

These are the errors I get back
screen shot 2018-11-01 at 8 16 07 pm

VS Code Version: Version 1.28.2 (1.28.2)
SFDX CLI Version: sfdx-cli/6.38.0-0d66175ccf (darwin-x64) node-v8.9.4
OS and version: Mac OSX High Sierra v. 10.13.6 (17G65)

@ntotten
Copy link
Contributor

ntotten commented Nov 5, 2018

This is a known issue in the Aura LSP. It is being worked now. I don't have an exact ETA, but it should be sometime in the next few months.

@eltoroit
Copy link
Author

Thanks @ntotten. Is there something that I can do to disable the error messages? Something like this:

// tslint:disable-next-line:no-console

@ntotten
Copy link
Contributor

ntotten commented Nov 15, 2018

@eltoroit The only thing that you can do is change the language type to either text or XML. The bad thing is that you will disable all the other HTML features.

@eltoroit
Copy link
Author

@ntotten that could be a good solution, thanks. Changing to XML could be a good idea since the Lightning Aura Components are XML files with some HTML inside. What would I lose if I treat this file as XML?

@ntotten
Copy link
Contributor

ntotten commented Nov 15, 2018

The big thing you lose is that you don't get code completion on standard HTML components (i.e. <div>, etc.)

@eltoroit
Copy link
Author

Thanks

@ntotten ntotten transferred this issue from forcedotcom/salesforcedx-vscode Jan 28, 2019
@ntotten ntotten transferred this issue from another repository Jan 28, 2019
@ntotten ntotten added this to the Backlog milestone Jan 28, 2019
@combizs
Copy link

combizs commented Mar 7, 2019

@ntotten, Thank you for linking my issue back to an existing issue. Any updates on the ETA?

@ntotten ntotten removed this from the Backlog milestone Mar 21, 2019
@ghost
Copy link

ghost commented Sep 11, 2019

The same errors (as mentioned in the issue additional info) still persist in Salesforce extension pack version 46.13.0 (dated September 5, 2019)
Does anyone has any further updates on ETA ?

@ntotten
Copy link
Contributor

ntotten commented Sep 18, 2019

This is a limitation of the HTML language in VS Code. It is related to microsoft/vscode#67871

@ntotten ntotten added the status:need vscode support Requires changes to VS Code extensibility. label Apr 9, 2020
@git2gus
Copy link

git2gus bot commented Apr 9, 2020

This issue has been linked to a new work item: W-7432033

@trinasfdx trinasfdx assigned mohanraj-r and jeffb-sfdc and unassigned mohanraj-r Mar 23, 2022
@trinasfdx trinasfdx added the status:in review pr/issue is being reviewed label Apr 1, 2022
@jeffb-sfdc jeffb-sfdc changed the title Lightning Components Markup Linter errors on an attribute with value "{# ... }" Aura Components Markup Linter errors on an attribute with value "{# ... }" Apr 1, 2022
@jeffb-sfdc jeffb-sfdc removed their assignment Apr 1, 2022
@jeffb-sfdc jeffb-sfdc removed the status:in review pr/issue is being reviewed label Apr 1, 2022
@diyer diyer removed the status:need vscode support Requires changes to VS Code extensibility. label Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants