-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Labels
Milestone
Description
Now you could write either
let a = 'hello'or
let a = `hello`And it would pass standard linter for both cases, even if in the second case the template doesn't have any interpolated variables and in fact is just a different form of a string. So you could mix both forms, something conceptually similar to mixing " and ' quotes.
ESLint allows us to prevent this behavior by adding a rule
"quotes": [2, "single"]
This rule makes ESLint to throw an error for this
let a = `hello`but don't throw any errors for this
let subject = 'world'
let a = `hello, ${world}`Also see this issue in ESLint.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done