Automatická kontrola chyb při psaní HTML ve VSCode - nvbach91/4IZ268-2022-2023-ZS GitHub Wiki
Automatická kontrola chyb při psaní HTML ve VSCode
- nainstalujte si ve VSCode Plugin - HTMLHint
- do kořenové složky (
4IZ268
) si vytvořte soubor .htmlhintrc
a s následujícím obsahem:
{
"tagname-lowercase": true,
"attr-lowercase": true,
"attr-value-double-quotes": true,
"attr-value-not-empty": true,
"attr-no-duplication": true,
"doctype-first": true,
"tag-pair": true,
"tag-self-close": false,
"spec-char-escape": true,
"id-unique": true,
"src-not-empty": true,
"title-require": true,
"alt-require": true,
"doctype-html5": true,
"id-class-value": "dash",
"style-disabled": true,
"inline-style-disabled": true,
"inline-script-disabled": true,
"space-tab-mixed-disabled": "space",
"id-class-ad-disabled": true,
"href-abs-or-rel": false,
"attr-unsafe-chars": true
}
- poté automatická kontrola chyb začne fungovat
![image](https://user-images.githubusercontent.com/20724910/65822992-09211400-e24e-11e9-9c13-418ebf870080.png)
- tento plugin nezachytává úplně všechny chyby
- HTML validátor https://validator.w3.org/ lze také instalovat jako plugin v VSCode
![image](https://user-images.githubusercontent.com/20724910/211028523-94b7115c-ad28-4ef7-ad08-56954a518170.png)
![image](https://user-images.githubusercontent.com/20724910/211028883-01854f11-0467-4790-baea-3399d1f951ec.png)
![image](https://user-images.githubusercontent.com/20724910/66257497-52b3b680-e79a-11e9-8049-0063993e0855.png)