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

`quotes` does not report template literals that contain a newline escape character #7646

not-an-aardvark opened this issue Nov 24, 2016 · 0 comments


None yet
1 participant
Copy link

commented Nov 24, 2016

Tell us about your environment

  • ESLint Version: master
  • Node Version: 7.2.0
  • npm Version: 3.10.9

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 \n.

@not-an-aardvark not-an-aardvark self-assigned this Nov 24, 2016

not-an-aardvark added a commit that referenced this issue Nov 24, 2016

not-an-aardvark added a commit that referenced this issue Nov 24, 2016

@nzakas nzakas closed this in faf5f56 Nov 25, 2016

@eslint eslint bot locked and limited conversation to collaborators Feb 6, 2018

@eslint eslint bot added the archived due to age label Feb 6, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.