clutchski / coffeelint

Lint your CoffeeScript.
http://www.coffeelint.org
Other
1.18k stars 172 forks source link

no_unnecessary_double_quotes, shouldn't apply to "\n" #569

Closed garyking closed 8 years ago

garyking commented 8 years ago

no_unnecessary_double_quotes shouldn't apply to "\n", such as in text.split("\n").

The above code triggers when no_unnecessary_double_quotes is enabled, but it shouldn't. Same goes for "\r" I imagine.

swang commented 8 years ago

I'm not sure why it shouldn't apply? Both single quotes and double quotes are string literals in javascript so '\n' is read in as a newline by javascript.

garyking commented 8 years ago

Hm interesting, I guess I picked this up from somewhere else. I guess you're right!