@double-great/remark-lint-alt-text
Advanced tools
Comparing version 0.2.0 to 0.2.1
11
index.js
const rule = require("unified-lint-rule"); | ||
const visit = require("unist-util-visit-parents"); | ||
const altText = require("@double-great/alt-text"); | ||
const altTextRules = require("@double-great/alt-text/rules"); | ||
@@ -16,6 +17,3 @@ function checkAltText(ast, file) { | ||
if (!alt && imageIsLink) { | ||
file.message( | ||
"No alt text found: Images inside a link tag require alt text that describes the purpose of the link.", | ||
node | ||
); | ||
file.message(altTextRules.createWarning("imageLink"), node); | ||
} | ||
@@ -38,6 +36,3 @@ if (!textToNodes[alt]) { | ||
if (imageIsLink && hasAltText) { | ||
file.message( | ||
"Images inside a link tag require alt text that describes the purpose of the link.", | ||
node | ||
); | ||
file.message(altTextRules.createWarning("imageLink"), node); | ||
} | ||
@@ -44,0 +39,0 @@ }); |
{ | ||
"name": "@double-great/remark-lint-alt-text", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "A remark-lint plugin that finds unhelpful or missing image alt text", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
4087
36