Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

remark-lint-linebreak-style

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remark-lint-linebreak-style - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

15

index.js

@@ -9,6 +9,5 @@ /**

*
* Options: `string`, either `'unix'` (for `\n`, denoted as ␊), `'windows'`
* (for `\r\n`, denoted as ␍␊), or `consistent` (to detect the first used
* linebreak in a file).
* Default: `'consistent'`.
* Options: either `'unix'` (for `\n`, denoted as `␊`), `'windows'` (for `\r\n`,
* denoted as `␍␊`), or `'consistent'` (to detect the first used linebreak in
* a file). Default: `'consistent'`.
*

@@ -40,10 +39,2 @@ * @example {"name": "valid-consistent-as-windows.md"}

* 1:6: Expected linebreaks to be windows (`\r\n`), not unix (`\n`)
*
* @example {"name": "valid-unix.md", "setting": "unix"}
*
* Alpha␊
*
* @example {"name": "valid-windows.md", "setting": "windows"}
*
* Alpha␍␊
*/

@@ -50,0 +41,0 @@

2

package.json
{
"name": "remark-lint-linebreak-style",
"version": "1.0.0",
"version": "1.0.1",
"description": "remark-lint rule to warn when linebreaks violate a given or detected style",

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

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

Options: `string`, either `'unix'` (for `\n`, denoted as ␊), `'windows'`
(for `\r\n`, denoted as ␍␊), or `consistent` (to detect the first used
linebreak in a file).
Default: `'consistent'`.
Options: either `'unix'` (for `\n`, denoted as `␊`), `'windows'` (for `\r\n`,
denoted as `␍␊`), or `'consistent'` (to detect the first used linebreak in
a file). Default: `'consistent'`.
## Install
## Presets
```sh
npm install --save remark-lint-linebreak-style
```
This rule is not included in any default preset
## Example
When this rule is turned on, the following file
`valid-consistent-as-windows.md` is ok:
##### `valid-consistent-as-windows.md`
###### In
Note: `␍␊` represents a carriage return and a line feed.
```markdown

@@ -29,5 +29,12 @@ Alpha␍␊

When this rule is turned on, the following file
`valid-consistent-as-unix.md` is ok:
###### Out
No messages.
##### `valid-consistent-as-unix.md`
###### In
Note: `␊` represents a line feed.
```markdown

@@ -38,5 +45,14 @@ Alpha␊

When this rule is `'unix'`, the following file
`invalid-unix.md` is **not** ok:
###### Out
No messages.
##### `invalid-unix.md`
When configured with `'unix'`.
###### In
Note: `␍␊` represents a carriage return and a line feed.
```markdown

@@ -46,2 +62,4 @@ Alpha␍␊

###### Out
```text

@@ -51,12 +69,10 @@ 1:7: Expected linebreaks to be unix (`\n`), not windows (`\r\n`)

When this rule is `'unix'`, the following file
`valid-unix.md` is ok:
##### `invalid-windows.md`
```markdown
Alpha␊
```
When configured with `'windows'`.
When this rule is `'windows'`, the following file
`invalid-windows.md` is **not** ok:
###### In
Note: `␊` represents a line feed.
```markdown

@@ -66,2 +82,4 @@ Alpha␊

###### Out
```text

@@ -71,11 +89,47 @@ 1:6: Expected linebreaks to be windows (`\r\n`), not unix (`\n`)

When this rule is `'windows'`, the following file
`valid-windows.md` is ok:
## Install
```markdown
Alpha␍␊
```sh
npm install remark-lint-linebreak-style
```
## Usage
You probably want to use it on the CLI through a config file:
```diff
...
"remarkConfig": {
"plugins": [
...
"lint",
+ "lint-linebreak-style",
...
]
}
...
```
Or use it on the CLI directly
```sh
remark -u lint -u lint-linebreak-style 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-linebreak-style'))
.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