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
indent issue with tagged template literals #12122
Comments
For clarity's sake, can you add comments in the example that show us exactly which lines the errors are being reported on? |
Done. |
This is interesting. In this case, regardless of the template literal's end position, it seems we should be enforcing 4 spaces and 2 spaces on those lines simply due to being inside the @not-an-aardvark @kaicataldo Is there any reason this shouldn't be considered a bug? |
This looks like a bug to me. |
I've also been able to verify this using our demo. |
It might take some time to get familiar with inner workings Eslint but I am interested in taking this up. |
Sorry I started looking into the issue but something crop up that I had to attend. Once I get that competed I will come back to this. I thought it will be good to drop a note here in case someone else wants to pick this up before that. |
Unfortunately, it looks like there wasn't enough interest from the team Thanks for contributing to ESLint and we appreciate your understanding. |
Reopening and assigning to myself so it doesn't get auto closed again. |
It's still closed though ;) |
Whoops, sorry. Reopened now! |
…slint#12596) * Fix: check tag in tagged template literal in indent (fixes eslint#12122) * refactor, add test cases * rename variable name, delete comment * change test case * change offsetToken to token before the node.callee.quasi * refactor code, add more test cases * use token for consistency
Tell us about your environment
What parser (default, Babel-ESLint, etc.) are you using? default
Please show your full configuration:
Configuration
What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.
eslint .
What did you expect to happen?
I would expect the code indentation to be valid.
What actually happened? Please include the actual, raw output from ESLint.
Following eslint errors are displayed:
I've created a small repo where you can easily reproduce the issue.
https://github.com/msvab/eslint-tagged-literal-indent-bug
Are you willing to submit a pull request to fix this bug?
I can try, but I have zero knowledge on eslint internals.
The text was updated successfully, but these errors were encountered: