-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[no-unescaped-entities] single quote #894
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
Comments
That's correct. You should either: |
hmm I see. But writing with curly quotes is quite painful :) |
@tleunen on a mac, ⌥-] or ⌥-}, on windows, alt 0145 or alt 0146 :-p |
I think you wanted to mention |
Naturally, there are other uses for |
Notably, ASCII 39 ( |
You can disable the rule if you don't like it. I'm finding it useful, especially because github highlighting engine goes crazy with an alone apostrophe. |
@duane english contractions and possessives should only be curly quotes too. The benefit is that curly quotes can't enclose HTML attribute values, which means the presence of a curly quote is never a bug, but the presence of a straight quote might be one. |
There are a lot of symbols that look alike. The Wikipedia page is very clear. |
@duane technically |
I understand that's how computers describe it; however, typography, not the ASCII spec, determines what a character is, and what should be used. |
See http://www.unicode.org/Public/10.0.0/ucd/NamesList.txt. The Unicode spec explicitly glosses U+2019 as the "preferred character to use for apostrophe":
|
I`m not sure there are any cases where I think it's quite fair to discourage the use of that character via lint rules, though. |
For the benefit of other people who come across this: Put |
By default, eslint warns if you use an apostrophe in JSX text (without wrapping it in a string literal). The `eslint-plugin-react` thread about it is some typography geeks arguing about the unicode standard, and reaching the conclusion that apostrophes are actually U+2019. This is clearly insane, so disable that warning. jsx-eslint/eslint-plugin-react#894
This comment has been minimized.
This comment has been minimized.
You could also just disable quotes...
Had to do it that way, because I still care about |
I did |
I'm having the
no-unescaped-entities
thrown when a single quote is used.Example
The text was updated successfully, but these errors were encountered: