Releases: htmlacademy/linthtml-rules-htmlacademy
Kumo oni: Ane
Fixes req-webp-in-picture
to not check <picture>
if all <source>
have attribute type="image/svg+xml"
.
Hebi oni
- Adds a
req-tags-presence
rule that requires the specified tags on the page. - Adds a
req-preload-font
rule that requires thepreload
value for the font. - Adds a
req-webp-in-picture
rule that requireswebp
in<picture>
- Adds a
no-class-in-container
rule that checks theclass
attribute for child elements inside the specified container.
{
"htmlacademy/req-tags-presence": [ true, ["header", "nav", "main", "section", "h1", "footer"]],
"htmlacademy/req-preload-font": true,
"htmlacademy/req-webp-in-picture": true,
"htmlacademy/no-class-in-container": [true, {
"containers": ["content"],
"ignore": {
"tags": ["h1", "p"],
"classes": ["content__title"]
}
}]
}
Tongue Demon
Adds a tag-forbid-attr
rule that disallows the use of specified attributes on the specified tag.
{
"tag-forbid-attr": [
true,
{
"picture": [
{
"name": "class"
}
],
"body": [
{
"name": "class"
}
]
}
]
}
Te oni
1.0.18
Fixes report
in the req-source-width-height
Odō no oni
1.0.17
Added a new rule htmlacademy/req-source-width-height that requires the width
and height
attributes of <source>
, inside <picture>
.
{
"htmlacademy/req-source-width-height": true
}
<picture>
<source srcset="images/image-tablet.jpg" width="768" height="480" media="(min-width: 768px)">
<img src="images/image-mobile.jpg" width="320" height="148" alt="">
</picture>
Daki
1.0.16
Clarifies the no-blocking-script rule for the <script>
tag. You can now add modules to <head>
.
Gyūtarō
1.0.15
Added a new rule htmlacademy/req-mailto, which requires mailto:
for email-text links.
{
"htmlacademy/req-mailto": true
}
<a href="mailto:example@example.com">example@example.com</a>
Gotō
1.0.14
Добавили новое правило htmlacademy/req-stylesheet-link, которое проверяет наличие тега link с атрибутом rel="stylesheet" внутри тега head.
{
"htmlacademy/req-stylesheet-link": true
}
<head>
<link rel="stylesheet" href="styles/style.css">
</head>
Tomioka Giyū
1.0.13
- Excludes the
<input type="submit">
check from the input-req-label rule. - Adds
ignore
option for tag-req-attr
'input': [
{
name: 'name',
ignore: {
'type': 'submit'
}
},
],
Shinazugawa Gen'ya
1.0.12
Fix htmlacademy/attr-req-value
rule
Exceptions
A single <option>
in <select>
may have an empty value for the value
attribute if it is selected by default.
The following pattern is not considered a problem:
<label for="fruits">Fruits</label>
<select id="fruits" name="fruits" required>
<option value="">Select...</option>
<option value="banana">Banana</option>
<option value="apple">Apple</option>
</select>