@double-great/remark-lint-alt-text
Advanced tools
Comparing version 0.5.0 to 0.6.0
@@ -12,3 +12,3 @@ const rule = require("unified-lint-rule"); | ||
const aggregate = (node, ancestors) => { | ||
imageIsLink = ancestors.filter(a => a.type === "link").length > 0; | ||
imageIsLink = ancestors.filter((a) => a.type === "link").length > 0; | ||
const alt = node.alt || undefined; | ||
@@ -28,6 +28,6 @@ if (alt) hasAltText = true; | ||
return Object.keys(textToNodes).map(alt => { | ||
return Object.keys(textToNodes).map((alt) => { | ||
const nodes = textToNodes[alt]; | ||
if (!nodes) return; | ||
nodes.forEach(node => { | ||
nodes.forEach((node) => { | ||
if (node.alt && altText(node.alt)) { | ||
@@ -34,0 +34,0 @@ file.message(altText(node.alt), node); |
{ | ||
"name": "@double-great/remark-lint-alt-text", | ||
"version": "0.5.0", | ||
"version": "0.6.0", | ||
"description": "A remark-lint plugin that finds unhelpful or missing image alt text", | ||
@@ -9,3 +9,3 @@ "main": "index.js", | ||
"pretest": "npm run lint", | ||
"test": "tape tests/*.test.js", | ||
"test": "jest", | ||
"pretty-quick": "pretty-quick" | ||
@@ -16,3 +16,3 @@ }, | ||
"dependencies": { | ||
"@double-great/alt-text": "^0.5.0", | ||
"@double-great/alt-text": "^0.6.0", | ||
"unified-lint-rule": "^1.0.6", | ||
@@ -24,8 +24,8 @@ "unist-util-visit-parents": "^3.1.0" | ||
"dedent": "^0.7.0", | ||
"eslint": "^7.5.0", | ||
"eslint": "^7.6.0", | ||
"husky": "^4.2.5", | ||
"jest": "^26.2.2", | ||
"prettier": "^2.0.5", | ||
"pretty-quick": "^2.0.1", | ||
"remark": "^12.0.1", | ||
"tape": "^5.0.1" | ||
"remark": "^12.0.1" | ||
}, | ||
@@ -32,0 +32,0 @@ "husky": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4104
+ Added@double-great/alt-text@0.6.0(transitive)
- Removed@double-great/alt-text@0.5.0(transitive)