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

@double-great/remark-lint-alt-text

Package Overview
Dependencies
Maintainers
0
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@double-great/remark-lint-alt-text - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

7

dist/index.d.ts

@@ -0,3 +1,8 @@

import { Severity, Label } from "unified-lint-rule";
import { Config } from "@double-great/alt-text";
declare const checkAltText: import("unified").Plugin<void[] | [Config | import("unified-lint-rule").Label | import("unified-lint-rule").Severity] | [boolean | import("unified-lint-rule").Label | import("unified-lint-rule").Severity, Config], import("unist").Node, import("unist").Node>;
import { Node } from "unist";
import { VFile } from "vfile";
import { TransformCallback } from "unified";
type Plugin = (config?: Label | Severity | Config | [level: Label | Severity, option?: Config | undefined] | undefined) => ((tree: Node, file: VFile, next: TransformCallback) => undefined) | undefined;
declare const checkAltText: Plugin;
export default checkAltText;

11

dist/index.js
import { lintRule } from "unified-lint-rule";
import { visitParents } from "unist-util-visit-parents";
import altText, { defaultConfig } from "@double-great/alt-text";
import imageLink from "@double-great/alt-text/dist/clues/image-link.js";
import altText, { defaultConfig, imageLink, } from "@double-great/alt-text";
const checkAltText = lintRule("remark-lint:alt-text", (tree, file, options) => {

@@ -18,6 +17,6 @@ options = Object.assign(Object.assign({}, defaultConfig), options);

if (suggestion)
file.message(suggestion, node);
file.message(suggestion);
}
if (!alt && imageIsLink && options["image-is-link"] !== false) {
file.message(imageLink.check(), node);
file.message(imageLink.check());
}

@@ -39,5 +38,5 @@ if (!alt)

if (suggestion)
file.message(suggestion, node);
file.message(suggestion);
if (imageIsLink && !hasAltText && options["image-is-link"] !== false) {
file.message(imageLink.check(), node);
file.message(imageLink.check());
}

@@ -44,0 +43,0 @@ }

{
"name": "@double-great/remark-lint-alt-text",
"version": "1.0.0",
"version": "1.1.0",
"description": "A remark-lint plugin that finds unhelpful or missing image alt text",
"main": "dist/index.js",
"exports": "./dist/index.js",
"types": "dist/index.d.ts",
"type": "module",
"engines": {
"node": ">=18"
},
"scripts": {
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
"lint": "eslint .",
"pretest": "npm run lint",
"test": "jest",
"pretty-quick": "pretty-quick",
"prepare": "husky install",
"prepublishOnly": "tsc"
"build": "tsc",
"prepublishOnly": "npm run build",
"format": "prettier --write ."
},

@@ -19,24 +22,23 @@ "author": "@double-great",

"dependencies": {
"@double-great/alt-text": "^3.0.0",
"unified-lint-rule": "^2.1.1",
"unist-util-visit-parents": "^5.1.0"
"@double-great/alt-text": "^3.2.1",
"unified-lint-rule": "^3.0.0",
"unist-util-visit-parents": "^6.0.1"
},
"devDependencies": {
"@babel/preset-env": "^7.16.11",
"@babel/preset-typescript": "^7.16.7",
"@types/dedent": "^0.7.0",
"@types/jest": "^27.4.1",
"@types/node": "^17.0.21",
"@typescript-eslint/eslint-plugin": "^5.15.0",
"@typescript-eslint/parser": "^5.15.0",
"dedent": "^0.7.0",
"eslint": "^8.11.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-jest": "^26.1.1",
"husky": "^7.0.0",
"jest": "^27.5.1",
"prettier": "^2.5.1",
"pretty-quick": "^3.1.3",
"remark": "^14.0.2",
"typescript": "^4.6.2"
"@babel/preset-env": "^7.26.0",
"@babel/preset-typescript": "^7.26.0",
"@eslint/js": "^9.18.0",
"@types/dedent": "^0.7.2",
"@types/jest": "^29.5.14",
"@types/node": "^22.10.7",
"dedent": "^1.5.3",
"eslint": "^9.18.0",
"eslint-plugin-jest": "^28.11.0",
"jest": "^29.7.0",
"prettier": "^3.4.2",
"prettier-2": "npm:prettier@^2",
"remark": "^15.0.1",
"ts-node": "^10.9.2",
"typescript": "^5.7.3",
"typescript-eslint": "^8.20.0"
},

@@ -59,11 +61,3 @@ "directories": {

},
"homepage": "https://github.com/double-great/remark-lint-alt-text#readme",
"jest": {
"transformIgnorePatterns": [
"!node_modules/"
],
"moduleNameMapper": {
"^../index.js$": "<rootDir>/index.ts"
}
}
"homepage": "https://github.com/double-great/remark-lint-alt-text#readme"
}
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