Socket
Socket
Sign inDemoInstall

remark-lint-definition-spacing

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remark-lint-definition-spacing - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

4

index.js

@@ -15,3 +15,3 @@ /**

*
* [example domain]: http://example.com "Example Domain"
* [example····domain]: http://example.com "Example Domain"
*

@@ -40,4 +40,2 @@ * @example {"name": "invalid.md", "label": "output"}

return;
function validate(node) {

@@ -44,0 +42,0 @@ var start = position.start(node).offset;

{
"name": "remark-lint-definition-spacing",
"version": "1.0.0",
"version": "1.0.1",
"description": "remark-lint rule to warn when consecutive white space is used in a definition",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -7,13 +7,16 @@ <!--This file is generated-->

## Install
## Presets
```sh
npm install --save remark-lint-definition-spacing
```
This rule is included in the following presets:
| Preset | Setting |
| ------ | ------- |
| [`remark-preset-lint-markdown-style-guide`](https://github.com/wooorm/remark-lint/tree/master/packages/remark-preset-lint-markdown-style-guide) | |
## Example
When this rule is turned on, the following file
`valid.md` is ok:
##### `valid.md`
###### In
```markdown

@@ -23,9 +26,18 @@ [example domain]: http://example.com "Example Domain"

When this rule is turned on, the following file
`invalid.md` is **not** ok:
###### Out
No messages.
##### `invalid.md`
###### In
Note: `·` represents a space.
```markdown
[example domain]: http://example.com "Example Domain"
[example····domain]: http://example.com "Example Domain"
```
###### Out
```text

@@ -35,4 +47,47 @@ 1:1-1:57: Do not use consecutive white-space in definition labels

## Install
```sh
npm install remark-lint-definition-spacing
```
## Usage
You probably want to use it on the CLI through a config file:
```diff
...
"remarkConfig": {
"plugins": [
...
"lint",
+ "lint-definition-spacing",
...
]
}
...
```
Or use it on the CLI directly
```sh
remark -u lint -u lint-definition-spacing readme.md
```
Or use this on the API:
```diff
var remark = require('remark');
var report = require('vfile-reporter');
remark()
.use(require('remark-lint'))
+ .use(require('remark-lint-definition-spacing'))
.process('_Emphasis_ and **importance**', function (err, file) {
console.error(report(err || file));
});
```
## License
[MIT](https://github.com/wooorm/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