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

remark-lint-no-shortcut-reference-link

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remark-lint-no-shortcut-reference-link - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

27

index.js

@@ -31,22 +31,23 @@ /**

'use strict';
'use strict'
var rule = require('unified-lint-rule');
var visit = require('unist-util-visit');
var generated = require('unist-util-generated');
var rule = require('unified-lint-rule')
var visit = require('unist-util-visit')
var generated = require('unist-util-generated')
module.exports = rule('remark-lint:no-shortcut-reference-link', noShortcutReferenceLink);
module.exports = rule(
'remark-lint:no-shortcut-reference-link',
noShortcutReferenceLink
)
function noShortcutReferenceLink(ast, file) {
visit(ast, 'linkReference', visitor);
var reason = 'Use the trailing [] on reference links'
function noShortcutReferenceLink(tree, file) {
visit(tree, 'linkReference', visitor)
function visitor(node) {
if (generated(node)) {
return;
if (!generated(node) && node.referenceType === 'shortcut') {
file.message(reason, node)
}
if (node.referenceType === 'shortcut') {
file.message('Use the trailing [] on reference links', node);
}
}
}
{
"name": "remark-lint-no-shortcut-reference-link",
"version": "1.0.2",
"version": "1.0.3",
"description": "remark-lint rule to warn when shortcut reference links are used",

@@ -14,4 +14,4 @@ "license": "MIT",

],
"repository": "https://github.com/wooorm/remark-lint/tree/master/packages/remark-lint-no-shortcut-reference-link",
"bugs": "https://github.com/wooorm/remark-lint/issues",
"repository": "https://github.com/remarkjs/remark-lint/tree/master/packages/remark-lint-no-shortcut-reference-link",
"bugs": "https://github.com/remarkjs/remark-lint/issues",
"author": "Titus Wormer <tituswormer@gmail.com> (http://wooorm.com)",

@@ -18,0 +18,0 @@ "contributors": [

@@ -18,4 +18,4 @@ <!--This file is generated-->

| ------ | ------- |
| [`remark-preset-lint-markdown-style-guide`](https://github.com/wooorm/remark-lint/tree/master/packages/remark-preset-lint-markdown-style-guide) | |
| [`remark-preset-lint-recommended`](https://github.com/wooorm/remark-lint/tree/master/packages/remark-preset-lint-recommended) | |
| [`remark-preset-lint-markdown-style-guide`](https://github.com/remarkjs/remark-lint/tree/master/packages/remark-preset-lint-markdown-style-guide) | |
| [`remark-preset-lint-recommended`](https://github.com/remarkjs/remark-lint/tree/master/packages/remark-preset-lint-recommended) | |

@@ -99,2 +99,2 @@ ## Example

[MIT](https://github.com/wooorm/remark-lint/blob/master/LICENSE) © [Titus Wormer](http://wooorm.com)
[MIT](https://github.com/remarkjs/remark-lint/blob/master/LICENSE) © [Titus Wormer](http://wooorm.com)
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