Skip to content
This repository has been archived by the owner on Dec 26, 2023. It is now read-only.

Linting: Add more HTML linting #14

Open
10 tasks
sinclairnick opened this issue Mar 13, 2023 · 0 comments
Open
10 tasks

Linting: Add more HTML linting #14

sinclairnick opened this issue Mar 13, 2023 · 0 comments

Comments

@sinclairnick
Copy link
Owner

sinclairnick commented Mar 13, 2023

Currently, the ESLint plugin is largely automatic, based on the caniemail.com data.

However, there are more nuanced HTML rules that should be added, such as:

  • Prefer using <div role=“”> over unsupported semantic tags like <header>
  • Prefer html attr for width, height, align, valign, border, color or bgcolor (overloading ok)
  • ...prefer styles for rest
  • When using percentage widths, we should also set an html attr of width as fixed for OL support
  • Border="0" cellspacing="0" cellpadding="0" should be set on tables for consistency
  • Use margin and padding for spacing, multiple BRs and empty TDs should be avoided
  • Prefer Hex color (with 6 characters?)
  • Image should have alt tag
  • Image should have src
  • (Warn only) Consider setting a background color when setting a background image

More items will be added to this list over time.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant