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

Contradictions from no-potential-path-strings and no-unnecessary-curly-strings #3057

Open
ijlee2 opened this issue Apr 25, 2024 · 1 comment

Comments

@ijlee2
Copy link

ijlee2 commented Apr 25, 2024

I'd like to pass a string that starts with @ to an argument:

<Ui::Demo @title="@my-org/my-package">
  ...
</Ui::Demo>

In ember-template-lint@v5, the code above caused no-potential-path-strings to fail. So I used double curly braces to avoid false positives.

<Ui::Demo @title={{"@my-org/my-package"}}>
  ...
</Ui::Demo>

In ember-template-lint@v6.0.0, using double curlies for string causes no-unnecessary-curly-strings to fail. And without double curlies, no-potential-path-strings still marks the code as an issue.

error  Potential path in attribute string detected. Did you mean {{@my-org/my-package}}?  no-potential-path-strings

Could either/both rule(s) be reviewed for accuracy and/or relevance?

@ijlee2
Copy link
Author

ijlee2 commented Apr 25, 2024

Looking at #1457, I feel like no-potential-path-strings had been added to account for rare cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant