Socket
Socket
Sign inDemoInstall

remark-lint-no-inline-padding

Package Overview
Dependencies
4
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.0.1

4

index.js

@@ -7,6 +7,6 @@ /**

* @fileoverview
* Warn when inline nodes are padded with spaces between markers and
* Warn when inline nodes are padded with spaces between their markers and
* content.
*
* Warns for emphasis, strong, delete, image, and link.
* Warns for emphasis, strong, delete, images, and links.
*

@@ -13,0 +13,0 @@ * @example {"name": "valid.md"}

{
"name": "remark-lint-no-inline-padding",
"version": "1.0.0",
"version": "1.0.1",
"description": "remark-lint rule to warn when inline nodes are padded with spaces",

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

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

Warn when inline nodes are padded with spaces between markers and
Warn when inline nodes are padded with spaces between their markers and
content.
Warns for emphasis, strong, delete, image, and link.
Warns for emphasis, strong, delete, images, and links.
## Install
## Presets
```sh
npm install --save remark-lint-no-inline-padding
```
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) | |
| [`remark-preset-lint-recommended`](https://github.com/wooorm/remark-lint/tree/master/packages/remark-preset-lint-recommended) | |
## Example
When this rule is turned on, the following file
`valid.md` is ok:
##### `valid.md`
###### In
```markdown

@@ -26,5 +30,10 @@ Alpha, *bravo*, _charlie_, [delta](http://echo.fox/trot)

When this rule is turned on, the following file
`invalid.md` is **not** ok:
###### Out
No messages.
##### `invalid.md`
###### In
```markdown

@@ -34,2 +43,4 @@ Alpha, * bravo *, _ charlie _, [ delta ](http://echo.fox/trot)

###### Out
```text

@@ -41,4 +52,47 @@ 1:8-1:17: Don’t pad `emphasis` with inner spaces

## Install
```sh
npm install remark-lint-no-inline-padding
```
## Usage
You probably want to use it on the CLI through a config file:
```diff
...
"remarkConfig": {
"plugins": [
...
"lint",
+ "lint-no-inline-padding",
...
]
}
...
```
Or use it on the CLI directly
```sh
remark -u lint -u lint-no-inline-padding 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-no-inline-padding'))
.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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc