-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Tagged Template Strings are not linting correctly #2000
Comments
I guess I'll take a look even though I look and feel like i've been hit by a truck right now :> |
yeah, if I had to bet i'd say this is a regression --- but I can't be certain. specifically something related to our block parsing code. @jugglinmike you might be in a better position to look at this right now, otherwise I'll get to it when I can |
I checked out the earliest commit related to template strings --- b4be350 to be exact, and it still complains on tagged templates. Does not look like regression to me. |
The same issue occurs without the tag: var testStr = 'bar';
function foo() {
return `some
${testStr} here`;
}
/* "Missing semicolon" and "Expected an assignment or function call
and instead saw an expression" */ Also, a different error occurs when using a generator function as follows: function* foo() {
yield `some
string here`;
}
/* "Bad line breaking before 'some string here'" */ |
this bug was fixed iirc... are you still able to reproduce on newer versions? let me dig up the commit. |
I tried it on 2.6.0 and noticed that tagged template strings throw out the missing semicolon error. |
yeah, it's fixed just not released yet, i guess it's been a while since the last patch update =) |
Ah, nice, I had to temporarily disable jshint on pre commit 😥 was considering giving it a try, but happy to test with master :) |
@caitp Yup, I'm using 2.6.0. Thanks for the update! |
@caitp master is still not working with tagged template strings. |
okay, could you file another bug about that? I'll take a look tonight |
Hm, I believe this issue already tracks the error with tagged template strings. The example posted by @KevinGrandon still throws an error when using master. Do you still want me to open a new issue?
Output:
|
function TAG() {}
var str = (TAG`foo${bar}baz`); This is not passing, in current master (as of 278ad75). |
I'm getting a
Missing semicolon.
error when using a tagged template string. If I have time I'll try to submit a test case for this soon.My code looks roughly like:
The text was updated successfully, but these errors were encountered: