New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

html-validate

Package Overview
Dependencies
Maintainers
1
Versions
282
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

html-validate - npm Package Versions

1
28

0.22.0

Diff

Changelog

Source

0.22.0 (2019-02-24)

Breaking changes

  • HtmlElement direct access to attr is replaced with attributes. The former was an key-value object and the latter is a flattened array of Attribute.

Features

  • exposes Source and AttributeData in shim.
  • HtmlElement will now store duplicated (or aliased) attributes. The biggest change this introduces is that classList will now contain a merged list of all classes. This is needed when combining a static class attribute with a dynamic one.
  • DOM Attribute got two flags isStatic and isDynamic to easily tell if the value is static or dynamic.
  • more verbose exception when a transformer fails. (fixes #37)
  • allow processAttribute hook to yield multiple attributes, typically used when adding aliased attributes such as :class. By adding both the alias and the original the latter can be validated as well (e.g. no-dup-attr can trigger for multiple uses of :class). (fixes #36)
  • allow setting hooks when using HtmlValidate.validateString, makes it easier to write tests which requires hooks, e.g. processing attributes.

Bugfixes

  • [attr] selector now matches boolean attributes.
  • attribute-boolean-style and no-dup-attr now handles when dynamic attributes is used to alias other attributes, e.g :required="foo" no longer triggers an boolean style and class=".." combined with :class=".." no longer triggers duplicate attributes. (fixes #35)
  • attribute-allowed-values now ignores boolean attributes with dynamic values. (partially fixes #35)
ext
published 0.21.0 •

Changelog

Source

0.21.0 (2019-02-17)

Breaking changes

  • button-type is replaced with element-required-attributes.

Features

  • new rule element-required-attributes replaces button-type and allows any element to contain requiredAttributes metadata.
  • support foreign elements. The body of the foreign element will be discarded from the DOM tree and not trigger any rules.
  • CLI write a more verbose message when unhandled exceptions are raised.
  • --dump-events output reduced by hiding element metadata and compacting location data.
  • use jest snapshots to test element metadata as it is more maintainable.

Bugfixes

  • allow <area shape="default"> (fixes #31)
ext
published 0.20.1 •

Changelog

Source

0.20.1 (2019-02-06)

Bugfixes

  • fix #33: ensure wcag/h37 and wcag/h67 checks if node exists before testing tagname.
  • handle boolean attributes in attribute-allowed-values.
ext
published 0.20.0 •

Changelog

Source

0.20.0 (2019-01-29)

Features

  • update codeframe formatter to show not just start location but also end.

Bugfixes

  • Fixes html-validate-angular#1 by handling both regular and arrow functions.
ext
published 0.19.0 •

Changelog

Source

0.19.0 (2019-01-27)

Breaking changes

  • img-req-alt has been renamed wcag/h37.

Features

  • new rule prefer-button.
  • Attribute now stores location of value.
  • new rules wcag/h32 and wcag/h67.
  • move location and isRootElement to DOMNode and add new nodeType property.
  • add Attribute.valueMatches to test attribute value. Handles DynamicValue.
  • querySelector now handles selector lists (comma-separated selectors)
ext
published 0.18.2 •

Changelog

Source

0.18.2 (2019-01-14)

Bugfixes

  • fix issue when calling getAttributeValue on a boolean attribute.
  • handle DynamicValue in DOMTokenList and id-pattern.
ext
published 0.18.1 •

Changelog

Source

0.18.1 (2019-01-12)

Features

  • CLI learned --print-config to output configuration for a given file.
ext
published 0.18.0 •

Changelog

Source

0.18.0 (2019-01-10)

Features

  • add support for dynamic attribute values, that is the value is marked as being set but has no known value. Rules are expected to assume the value exists and is valid. The primary usage for this is in combination with the parseAttribute hook, e.g :id="..." can yield attribute id with a dynamic value.
  • add support for transformer hooks, currently the only hook is parseAttribute allowing the transformer to alter the attribute before any events are emitted, e.g. it can pick up the vuejs :id attribute and pass it as id to allow other rules to continue just as if id was typed.

Bugfixes

  • fix ConfigLoader tests when running on windows.
ext
published 0.17.0 •

Changelog

Source

0.17.0 (2019-01-09)

Breaking changes

  • DOMNode has been renamed HtmlElement and there is instead a new base class DOMnode which HtmlElement extends from. Rules using DOMNode need to be changed to use HtmlElement.

Features

  • use Prettier for formatting sources.
  • add HtmlValidate.getRuleDocumentation() API for IDEs to fetch contextual rule documentation.
  • add codeframe formatter (from eslint).
  • add HtmlValidate.flushConfigCache to allow flushing the config loader cache.
  • add TemplateExtractor.createSource as a quick way to create a source from filename.
  • add typescript definition for shim.js
  • add validateSource to HtmlValidate allowing to manually passing a source.
  • HtmlValidate.getConfigFor is now part of public API.

Bugfixes

  • Directives can now enable/disable rules working with dom:ready event.
  • HtmlElement location is now shifted by 1.
ext
published 0.16.1 •

Changelog

Source

0.16.1 (2018-12-16)

Bugfixes

  • Message now passes size property from Location
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc