Skip to content

Releases: htmlacademy/linthtml-rules-htmlacademy

Kumo oni: Ane

28 May 08:24
Compare
Choose a tag to compare

Fixes req-webp-in-picture to not check <picture> if all <source> have attribute type="image/svg+xml".

Hebi oni

23 May 20:24
Compare
Choose a tag to compare
  • Adds a req-tags-presence rule that requires the specified tags on the page.
  • Adds a req-preload-font rule that requires the preload value for the font.
  • Adds a req-webp-in-picture rule that requires webp in <picture>
  • Adds a no-class-in-container rule that checks the class 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

19 May 08:05
Compare
Choose a tag to compare

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

17 May 07:54
Compare
Choose a tag to compare

1.0.18

Fixes report in the req-source-width-height

Odō no oni

17 May 07:44
Compare
Choose a tag to compare

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

17 May 07:43
Compare
Choose a tag to compare

1.0.16

Clarifies the no-blocking-script rule for the <script> tag. You can now add modules to <head>.

Gyūtarō

23 Feb 10:34
Compare
Choose a tag to compare

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ō

22 Feb 17:20
Compare
Choose a tag to compare

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ū

21 Feb 18:57
Compare
Choose a tag to compare

1.0.13

'input': [
  {
    name: 'name',
    ignore: {
      'type': 'submit'
    }
  },
],

Shinazugawa Gen'ya

13 Jan 10:57
Compare
Choose a tag to compare

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>