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

markuplint

Package Overview
Dependencies
Maintainers
1
Versions
294
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

markuplint - npm Package Compare versions

Comparing version 0.17.0 to 0.18.0

1

lib/parser/index.d.ts

@@ -132,2 +132,3 @@ import Ruleset from '../ruleset';

hasAttribute(attrName: string): boolean;
matches(selector: string): boolean;
readonly id: Attribute | undefined;

@@ -134,0 +135,0 @@ readonly classList: string[];

10

lib/parser/index.js

@@ -126,2 +126,5 @@ "use strict";

}
matches(selector) {
return cssSelector_1.default(selector).match(this);
}
get id() {

@@ -408,5 +411,3 @@ return this.getAttribute('id');

else if (nodeRule.selector && node instanceof Element) {
const selector = cssSelector_1.default(nodeRule.selector);
// console.log({ m: selector.match(node), s: nodeRule.selector, n: node.raw });
if (selector.match(node)) {
if (node.matches(nodeRule.selector)) {
node.rules[ruleName] = rule;

@@ -440,4 +441,3 @@ }

else if (nodeRule.selector && node instanceof Element) {
const selector = cssSelector_1.default(nodeRule.selector);
if (selector.match(node)) {
if (node.matches(nodeRule.selector)) {
stackNodes.push([node, ruleName, rule, !!nodeRule.inheritance]);

@@ -444,0 +444,0 @@ }

@@ -16,3 +16,3 @@ "use strict";

}
if (!node.hasAttribute('src')) {
if (!node.matches('script[src]')) {
return;

@@ -19,0 +19,0 @@ }

{
"name": "markuplint",
"version": "0.17.0",
"version": "0.18.0",
"description": "HTML linter for legacy/modern HTML, Web Components, SVG, MathML, AMP HTML and more.",

@@ -51,4 +51,4 @@ "main": "lib/index.js",

"gulp-typescript": "^4.0.0-alpha.1",
"jsdom": "^11.5.1",
"markuplint-plugin-textlint": "^0.4.0",
"jsdom": "^11.6.1",
"markuplint-plugin-textlint": "^0.5.0",
"node-fetch": "^1.7.3",

@@ -55,0 +55,0 @@ "nyc": "^11.4.1",

@@ -89,2 +89,6 @@ ![markuplint](media/logo-v.svg)

## Editor Extensions
- [Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=yusukehirao.vscode-markuplint)
## Thanks

@@ -91,0 +95,0 @@

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