Closed Seirdy closed 1 year ago
Google style guide reference for this: https://google.github.io/styleguide/htmlcssguide.html#Entity_References
There is no need to use entity references like —, ”, or ☺, assuming the same encoding (UTF-8) is used for files and editors as well as among teams.
This is somewhat vague, but I think I can add a check for this.
MDN page for this one: https://developer.mozilla.org/en-US/docs/Glossary/Entity
This links to the "official" list of named entities: https://html.spec.whatwg.org/multipage/named-characters.html#named-character-references
I've gone with a regular expression to find the entities and a warning for this one.
Characters such as
“”’
are perfectly valid in HTML, and don't need HTML entities. The Google Style Guide recommends only using entities where reasonable, and I am inclined to agree: they make the HTML source less readable and larger.