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
Rule proposal: text-encoding-identifier-case
#1690
Comments
I prefer |
I also think the rule name should be |
I'm fine with |
utf-8-encoding-case
utf8-encoding-case
Does Node.js accept |
For reference, here are the spec details on the TextEncoder argument: |
I think the rule should be called |
I don't really see the point of complicating the rule with any possible encoding. The 99.99% case is UTF-8. |
There are still many cases where one has to deal with |
So only |
I'm fine with including |
My plan is to report all string literals that looks like a |
|
I would go with |
Accepted |
utf8-encoding-case
text-encoding-identifier-case
I found something in the WHATWG spec, I hope use
|
I am getting false positives in my jest test definitions with this rule:
It would probably be good to only apply this rule for specific function calls. |
According to WhatWG, in HTML spec the This is causing conflicts in our React code (in return <html lang="en">
<head>
<link rel="icon" type="image/x-icon" href={favicon} />
<meta charSet="utf-8" /> |
Yeah I'm facing the same issue like @pcorpet - is there a way to make the rule aware to not apply this to JSX / meta charset? |
I'll fix that. |
Thanks a bunch! |
Description
Enforce consistent style
of "UTF-8"
encoding.In many repos,
'utf8'
and'utf-8'
both used. I'm not sure what's the best choice, I believeUTF-8
is the standard name, but Node.js docs recommendedutf8
in many places. Maybe configurable?Fail
Pass
The text was updated successfully, but these errors were encountered: