-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
no-implicit-coercion
does not check template literals
#7062
Labels
accepted
There is consensus among the team that this change meets the criteria for inclusion
archived due to age
This issue has been archived; please open a new issue for any further discussion
enhancement
This change enhances an existing feature of ESLint
rule
Relates to ESLint's core rules
Comments
kaicataldo
added
enhancement
This change enhances an existing feature of ESLint
rule
Relates to ESLint's core rules
evaluating
The team will evaluate this issue to decide whether it meets the criteria for inclusion
and removed
triage
An ESLint team member will look at this issue soon
labels
Sep 6, 2016
👍 from me. |
👍!! |
@eslint/eslint-team Any other thoughts on this? Could use one more supporter/would love to hear any arguments against. |
It's a bug if it's not checking Template Literals. Should probably also check tagged template literals too. 👍 |
Err, I guess not for tagged template expressions because those could return non strings. Nvm. |
kaicataldo
added
accepted
There is consensus among the team that this change meets the criteria for inclusion
enhancement
This change enhances an existing feature of ESLint
and removed
enhancement
This change enhances an existing feature of ESLint
evaluating
The team will evaluate this issue to decide whether it meets the criteria for inclusion
labels
Sep 11, 2016
👍 |
Thanks all - I'll put together a PR |
kaicataldo
added a commit
that referenced
this issue
Sep 11, 2016
kaicataldo
added a commit
that referenced
this issue
Sep 11, 2016
eslint-deprecated
bot
added
the
archived due to age
This issue has been archived; please open a new issue for any further discussion
label
Feb 6, 2018
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
accepted
There is consensus among the team that this change meets the criteria for inclusion
archived due to age
This issue has been archived; please open a new issue for any further discussion
enhancement
This change enhances an existing feature of ESLint
rule
Relates to ESLint's core rules
The version of ESLint you are using
Master
The problem you want to solve.
While working on #7060 I noticed that
no-implicit-coercion
does not check for implicit coercion using template literals. While this isn't a common practice, I think we should add it for the sake of completeness.Your take on the correct solution to problem.
no-implicit-coercion
should warn when it finds the following patterns:I have a local branch with an implementation and tests and am happy to make a PR once #7060 has been merged.
The text was updated successfully, but these errors were encountered: