[Feature] Create code action for Modern DOCTYPE hint
mliao95 opened this issue · comments
Michael Liao commented
See documentation on hint here: https://webhint.io/docs/user-guide/hints/hint-doctype/
Triggers + Code Action solutions (in HTML file):
- If the first line or lines preceding
doctype
declaration is not whitespace.- Code Action: Move existing
doctype
declaration to the top of the file.
- Code Action: Move existing
- If the user uses an old or legacy
doctype
- Code Action: Change doctype to
<!doctype html>
- Code Action: Change doctype to
- If there are multiple
doctype
declarations in the file- Code Action: Remove second doctype or allow user to choose a
doctype
declaration to keep and move to the top of the file
- Code Action: Remove second doctype or allow user to choose a
Edit: Also add this hint to activate in the default webhint config