Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
`quotes` does not report template literals that contain a newline escape character #7646
Tell us about your environment
What parser (default, Babel-ESLint, etc.) are you using?
Please show your full configuration:
What did you do? Please include the actual source code causing the issue.
/* eslint quotes: [error, "single"] */ var foo = `foo\nbar`;
What did you expect to happen?
ESLint should report an error, and be able to fix the line to:
var foo = 'foo\nbar';
What actually happened? Please include the actual, raw output from ESLint.
No errors were reported.
I'm guessing this is a bug in the logic that detects multiline template literals. The rule does not report lines like this (as expected):
var foo = `foo bar`; // No error (working as intended)
But it should still report lines that literally contain