Skip to content

Latest commit

 

History

History
265 lines (221 loc) · 6.05 KB

CHANGELOG.md

File metadata and controls

265 lines (221 loc) · 6.05 KB

Changelog

1.0.21

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

1.0.20

  • 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"]
    }
  }]
}

1.0.19

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"
        }
      ]
    }
  ]
}

1.0.18

Fixes report in the req-source-width-height

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>

1.0.16

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>

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>

1.0.14

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> 

1.0.13

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

will not require a name attribute for <input> with type="submit"

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>

1.0.11

Added htmlacademy/space-between-comments

rules: {
  "htmlacademy/space-between-comments": [true, "space" | "no-space]
}
<!-- Comment --> // space
<!--Comment--> // no-space

1.0.10

attr-req-value can now accept regex for ignore

1.0.9

Fixed req-charset-utf rule

1.0.8

  • Refines the list of interactive elements for aria-label-misuse
    • Adds <label>

1.0.7

Added so many new rules:

1.0.6

Adds new rule htmlacademy/attr-req-value: the attribute cannot be empty, except for the list from ignore

{
  "htmlacademy/attr-req-value": [true, { ignore: ["alt"]}]
}
<button class="foo"></button>
<button disabled></button>
<img src="images/image.jpg" width="100" height="100" alt="">

1.0.5

Adds new rule htmlacademy/section-has-heading

 <section>
  <h2>title</h2>
</section>

 <section>
   <div>
      <h2>title</h2>
   </div>
</section>

1.0.4

Fixed name for head-meta-charset

1.0.3

  • Rename head-req-charset-utf to req-charset-utf
  • Rename head-req-meta to head-meta-charset
  • Adds a description of the rules
  • Adds htmlacademy/charset-position
<head>
  <meta charset="utf-8">
  <title>Title</title>
</head>
  • Adds form-action-attribute
<form action="https://echo.htmlacademy.ru"></form>
  • Adds img-svg-req-dimensions
<img src="images/image.jpg" width="500" height="300" alt="">

<svg width="200" height="100" viewBox="0 0 200 100" xmlns="http://www.w3.org/2000/svg">
  <rect x="0" y="0"></rect>
</svg>
  • Adds no-double-br
<p>Lorem ipsum <br>dolor <br>sit amet.</p>
<p>Lorem ipsum <br>dolor sit amet.</p>
<p><br>sit amet.</p>
  • Adds a-target-rel
<a href="https://htmlacademy.pro" target="_blank" rel="noreferrer noopener">Link</a>

1.0.2

  • removes attr-value-style;
  • takes the rules to the components.

1.0.1

Three rules were added:

  • Class attribute location;
  • Charset;
  • Attribute value style.

1.0.0

Init rules