Releases: htmlacademy/linthtml-config-htmlacademy
1.0.25
1.0.24
- 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"]
}
}]
}
1.0.23
Update dependencies. Adds a tag-forbid-attr
rule that disallows the use of specified attributes on the specified tag.
1.0.22
Added a new rule htmlacademy/req-source-width-height that requires the width
and height
attributes of <source>
, inside <picture>
.
<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>
1.0.21
Clarifies the no-blocking-script rule for the <script>
tag. You can now add modules to <head>
.
<html lang="ru">
<head>
<script src="app.js" type="module"></script>
</head>
<body>…</body>
</html>
v1.0.20
1.0.20
Updates the @linthtml/linthtml to the latest version
v1.0.19
1.0.19
Added a new rule htmlacademy/req-mailto, which requires mailto:
for email-text links.
{
"htmlacademy/req-mailto": true
}
v1.0.18
1.0.18
Added a new rule htmlacademy/req-stylesheet-link that checks for a link tag with the rel="stylesheet"
attribute inside the head tag.
{
"htmlacademy/req-stylesheet-link": true
}
<head>
<link rel="stylesheet" href="styles/style.css">
</head>
v1.0.17
1.0.17
- 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'
}
},
],
v1.0.16
1.0.16
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>