Socket
Book a DemoInstallSign in
Socket

remark-lint-no-paragraph-content-indent

Package Overview
Dependencies
Maintainers
2
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remark-lint-no-paragraph-content-indent - npm Package Compare versions

Comparing version

to
4.1.1

4

index.d.ts
export default remarkLintNoParagraphContentIndent
export type Root = import('mdast').Root
declare const remarkLintNoParagraphContentIndent: import('unified').Plugin<
| void[]
| [unknown]
| void[]
| [
(
| boolean
| import('unified-lint-rule').Label
| import('unified-lint-rule').Severity
| import('unified-lint-rule').Label
),

@@ -12,0 +12,0 @@ unknown

/**
* ## When should I use this?
*
* You can use this package to check that content in paragraphs is not
* indented.
*
* ## API
*
* There are no options.
*
* ## Recommendation
*
* Indenting further lines in a paragraph has no effect.
* Due to this, it’s recommended to turn this rule on.
*
* @module no-paragraph-content-indent
* @summary
* remark-lint rule to warn when content in paragraphs is indented.
* @author Titus Wormer
* @copyright 2017 Titus Wormer
* @license MIT
* @module no-paragraph-content-indent
* @fileoverview
* Warn when the content in paragraphs is indented.
*
* @example

@@ -10,0 +23,0 @@ * {"name": "ok.md"}

{
"name": "remark-lint-no-paragraph-content-indent",
"version": "4.1.0",
"version": "4.1.1",
"description": "remark-lint rule to warn when the content in paragraphs are indented",

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

@@ -13,10 +13,120 @@ <!--This file is generated-->

Warn when the content in paragraphs is indented.
[`remark-lint`][mono] rule to warn when content in paragraphs is indented.
## Contents
* [What is this?](#what-is-this)
* [When should I use this?](#when-should-i-use-this)
* [Presets](#presets)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`unified().use(remarkLintNoParagraphContentIndent[, config])`](#unifieduseremarklintnoparagraphcontentindent-config)
* [Recommendation](#recommendation)
* [Examples](#examples)
* [Compatibility](#compatibility)
* [Contribute](#contribute)
* [License](#license)
## What is this?
This package is a [unified][] ([remark][]) plugin, specifically a `remark-lint`
rule.
Lint rules check markdown code style.
## When should I use this?
You can use this package to check that content in paragraphs is not
indented.
## Presets
This rule is not included in any default preset
This rule is not included in a preset maintained here.
## Example
## Install
This package is [ESM only][esm].
In Node.js (version 12.20+, 14.14+, or 16.0+), install with [npm][]:
```sh
npm install remark-lint-no-paragraph-content-indent
```
In Deno with [Skypack][]:
```js
import remarkLintNoParagraphContentIndent from 'https://cdn.skypack.dev/remark-lint-no-paragraph-content-indent@4?dts'
```
In browsers with [Skypack][]:
```html
<script type="module">
import remarkLintNoParagraphContentIndent from 'https://cdn.skypack.dev/remark-lint-no-paragraph-content-indent@4?min'
</script>
```
## Use
On the API:
```js
import {read} from 'to-vfile'
import {reporter} from 'vfile-reporter'
import {remark} from 'remark'
import remarkLint from 'remark-lint'
import remarkLintNoParagraphContentIndent from 'remark-lint-no-paragraph-content-indent'
main()
async function main() {
const file = await remark()
.use(remarkLint)
.use(remarkLintNoParagraphContentIndent)
.process(await read('example.md'))
console.error(reporter(file))
}
```
On the CLI:
```sh
remark --use remark-lint --use remark-lint-no-paragraph-content-indent example.md
```
On the CLI in a config file (here a `package.json`):
```diff
"remarkConfig": {
"plugins": [
"remark-lint",
+ "remark-lint-no-paragraph-content-indent",
]
}
```
## API
This package exports no identifiers.
The default export is `remarkLintNoParagraphContentIndent`.
### `unified().use(remarkLintNoParagraphContentIndent[, config])`
This rule supports standard configuration that all remark lint rules accept
(such as `false` to turn it off or `[1, options]` to configure it).
There are no options.
## Recommendation
Indenting further lines in a paragraph has no effect.
Due to this, it’s recommended to turn this rule on.
## Examples
##### `ok.md`

@@ -62,3 +172,3 @@

Note: `·` represents a space.
> 👉 **Note**: `·` represents a space.

@@ -103,56 +213,9 @@ ```markdown

## Install
## Compatibility
This package is [ESM only][esm]:
Node 12+ is needed to use it and it must be `imported`ed instead of `required`d.
Projects maintained by the unified collective are compatible with all maintained
versions of Node.js.
As of now, that is Node.js 12.20+, 14.14+, and 16.0+.
Our projects sometimes work with older versions, but this is not guaranteed.
[npm][]:
```sh
npm install remark-lint-no-paragraph-content-indent
```
This package exports no identifiers.
The default export is `remarkLintNoParagraphContentIndent`.
## Use
You probably want to use it on the CLI through a config file:
```diff
"remarkConfig": {
"plugins": [
"lint",
+ "lint-no-paragraph-content-indent",
]
}
```
Or use it on the CLI directly
```sh
remark -u lint -u lint-no-paragraph-content-indent readme.md
```
Or use this on the API:
```diff
import {remark} from 'remark'
import {reporter} from 'vfile-reporter'
import remarkLint from 'remark-lint'
import remarkLintNoParagraphContentIndent from 'remark-lint-no-paragraph-content-indent'
remark()
.use(remarkLint)
+ .use(remarkLintNoParagraphContentIndent)
.process('_Emphasis_ and **importance**')
.then((file) => {
console.error(reporter(file))
})
```
## Contribute

@@ -198,4 +261,12 @@

[unified]: https://github.com/unifiedjs/unified
[remark]: https://github.com/remarkjs/remark
[mono]: https://github.com/remarkjs/remark-lint
[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
[skypack]: https://www.skypack.dev
[npm]: https://docs.npmjs.com/cli/install

@@ -205,7 +276,7 @@

[contributing]: https://github.com/remarkjs/.github/blob/HEAD/contributing.md
[contributing]: https://github.com/remarkjs/.github/blob/main/contributing.md
[support]: https://github.com/remarkjs/.github/blob/HEAD/support.md
[support]: https://github.com/remarkjs/.github/blob/main/support.md
[coc]: https://github.com/remarkjs/.github/blob/HEAD/code-of-conduct.md
[coc]: https://github.com/remarkjs/.github/blob/main/code-of-conduct.md

@@ -212,0 +283,0 @@ [license]: https://github.com/remarkjs/remark-lint/blob/main/license