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

@linthtml/linthtml

Package Overview
Dependencies
Maintainers
1
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@linthtml/linthtml - npm Package Versions

1
10

0.9.0-alpha.0

Diff

kamikillerto
published 0.8.0 •

Changelog

Source

v0.8.0

Features 🚀

Provide Plugins

It's now possible to provide plugins to LintHTML using the property plugins in the config file. This property accept a string or an array of strings. The string values can be the name of a package or the path to a file. To learn more about Plugins read the documentation page.

Fix 🛠️

Value for settings attr-name-ignore-regex and id-class-ignore-regex are now correctly converted to regexp when coming from a json config file.

kamikillerto
published 0.8.0-beta.2 •

Changelog

Source

v0.8.0-beta.2

Fix 🛠️

Fix error in plugins docs.

kamikillerto
published 0.8.0-beta.1 •

Changelog

Source

v0.8.0-beta.1

Features 🚀

Provide Plugins

It's now possible to provide plugins to LintHTML using the property plugins in the config file. This property accept a string value or an array of string, which could be the name of package or the path to a file. To learn more about Plugins read the documentation page.

kamikillerto
published 0.7.2 •

Changelog

Source

v0.7.2

Fix 🛠️

  • Rule indent-width now longer ignore nodes that are siblings with a text node ending with an EOL char
<div>
  foo
  <span>bar</span>
  <!-- Now the previous node is correctly handle and this report an error -->
</div>
kamikillerto
published 0.6.4 •

kamikillerto
published 0.7.1 •

kamikillerto
published 0.7.0 •

Changelog

Source

v0.7.0

Breaking change ⚠️

Parser now return root node

Because of the latest version of htmlparser2, the HTML parser now return a single node instead of an array of nodes. The node returned by the parser is the root node of the HTML document parsed.

This internal change has also an impact on the new parser feature. Custom parsers will also have to return a root node to LintHTML and not an array of node.

Features 🚀

Provide a custom parser

It's now possible to provide a custom parser to the linter using the property parser in the config file. This property accept a string value, which could be the name of package or the path to a file. The file or package should expose a function that takes a string value in input (HTML to parse) and return an AST tree compatible with LintHTML.

You can have a look to @linthtml/linthtml-pug to see an example of a custom parser.

Refactor 🧰

Split rules

Move nested rules into their own folder. The code for rules like indent-width, indent-style... are no longer mixed in the files.

Remove indent property to node

Nodes no longer have the property indent. This property was used by the rules indent-* to know what type of indentation is present before a node. But this property was not necessary, a node indentation can be found by looking at the previous node. If the previous node is a text node with only spaces/tabs chars then it's an indentation node and we can use it, otherwise, it means that the node has no indentation.

Fix 🛠️

  • Correctly define --print-config option with meow
kamikillerto
published 0.7.0-beta.4 •

Changelog

Source

v0.7.0-beta.4

Breaking change ⚠️

Parser now return root node

Because of the latest version of htmlparser2 the HTML parser now return a single node instead of an array of nodes. The node returned by the parser is the root node of the HTML document parsed.

This internal change has also an impact on the new parser feature. Custom parsers will also have to return a root node to LintHTML.

Refactor 🧰

Remove indent property to node

Nodes no longer have the property indent. This property was used by the rules indent-* to know what type of indentation is present before a node. But this property was not necessary, a node indentation can be found by looking at the previous node. If the previous node is a text node with only spaces/tabs chars then it's an indentation node and we can use it, otherwise, it means that the node has no indentation.

kamikillerto
published 0.7.0-beta.3 •

Changelog

Source

v0.7.0-beta.3

Provide a custom parser

It's now possible to provide a custom parser to the linter using the property parser in the config file. This property accept a string value, which could be the name of package or the path to a file. The file or package should expose a function that takes a string value in input (HTML to parse) and return an AST tree compatible with LintHTML.

You can have a look to @linthtml/linthtml-pug to see an example of a custom parser.

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