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

Template string with special character are getting inappropriately autofix to quoted string #1479

Closed
riwu opened this issue Oct 16, 2017 · 2 comments · Fixed by #1458
Closed

Comments

@riwu
Copy link

riwu commented Oct 16, 2017

<input placeholder={`line1\nline2`} ></input> gets autofix into
<input placeholder="line1\nline2" /> which treats the \n literally.

Versions:
"eslint-config-airbnb": "^16.0.0",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-jsx-a11y": "^6.0.2",
"eslint-plugin-react": "^7.4.0"

@ljharb
Copy link
Member

ljharb commented Oct 17, 2017

cc @jackyho112

@jackyho112
Copy link
Contributor

jackyho112 commented Oct 17, 2017

@ljharb Thanks for tagging me! I think this bug will be fixed in this PR because, with this update, the rule will identify the backslash and bail out instead of incorrectly fixing the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants