remark-lint-no-emphasis-as-heading
Advanced tools
Comparing version 1.0.3 to 1.0.4
10
index.js
@@ -10,3 +10,3 @@ /** | ||
* | ||
* @example {"name": "valid.md"} | ||
* @example {"name": "ok.md"} | ||
* | ||
@@ -17,3 +17,3 @@ * # Foo | ||
* | ||
* @example {"name": "invalid.md", "label": "input"} | ||
* @example {"name": "not-ok.md", "label": "input"} | ||
* | ||
@@ -28,3 +28,3 @@ * *Foo* | ||
* | ||
* @example {"name": "invalid.md", "label": "output"} | ||
* @example {"name": "not-ok.md", "label": "output"} | ||
* | ||
@@ -50,3 +50,3 @@ * 1:1-1:6: Don’t use emphasis to introduce a section, use a heading | ||
var head = node.children[0] | ||
var prev = parent.children[index - 1] | ||
var previous = parent.children[index - 1] | ||
var next = parent.children[index + 1] | ||
@@ -56,3 +56,3 @@ | ||
!generated(node) && | ||
(!prev || prev.type !== 'heading') && | ||
(!previous || previous.type !== 'heading') && | ||
next && | ||
@@ -59,0 +59,0 @@ next.type === 'paragraph' && |
{ | ||
"name": "remark-lint-no-emphasis-as-heading", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "remark-lint rule to warn when emphasis or importance is used instead of a heading", | ||
@@ -10,2 +10,3 @@ "license": "MIT", | ||
"rule", | ||
"remark-lint-rule", | ||
"emphasis", | ||
@@ -16,2 +17,6 @@ "heading" | ||
"bugs": "https://github.com/remarkjs/remark-lint/issues", | ||
"funding": { | ||
"type": "opencollective", | ||
"url": "https://opencollective.com/unified" | ||
}, | ||
"author": "Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)", | ||
@@ -18,0 +23,0 @@ "contributors": [ |
@@ -26,3 +26,3 @@ <!--This file is generated--> | ||
##### `valid.md` | ||
##### `ok.md` | ||
@@ -41,3 +41,3 @@ ###### In | ||
##### `invalid.md` | ||
##### `not-ok.md` | ||
@@ -76,12 +76,12 @@ ###### In | ||
```diff | ||
... | ||
… | ||
"remarkConfig": { | ||
"plugins": [ | ||
... | ||
… | ||
"lint", | ||
+ "lint-no-emphasis-as-heading", | ||
... | ||
… | ||
] | ||
} | ||
... | ||
… | ||
``` | ||
@@ -98,4 +98,4 @@ | ||
```diff | ||
var remark = require('remark'); | ||
var report = require('vfile-reporter'); | ||
var remark = require('remark') | ||
var report = require('vfile-reporter') | ||
@@ -106,4 +106,4 @@ remark() | ||
.process('_Emphasis_ and **importance**', function (err, file) { | ||
console.error(report(err || file)); | ||
}); | ||
console.error(report(err || file)) | ||
}) | ||
``` | ||
@@ -117,4 +117,4 @@ | ||
This project has a [Code of Conduct][coc]. | ||
By interacting with this repository, organisation, or community you agree to | ||
This project has a [code of conduct][coc]. | ||
By interacting with this repository, organization, or community you agree to | ||
abide by its terms. | ||
@@ -148,3 +148,3 @@ | ||
[chat-badge]: https://img.shields.io/badge/join%20the%20community-on%20spectrum-7b16ff.svg | ||
[chat-badge]: https://img.shields.io/badge/chat-spectrum.svg | ||
@@ -151,0 +151,0 @@ [chat]: https://spectrum.chat/unified/remark |
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
5745