remark-lint-no-file-name-outer-dashes
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "remark-lint-no-file-name-outer-dashes", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "remark-lint rule to warn when file names contain initial or final dashes", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -7,19 +7,22 @@ <!--This file is generated--> | ||
## Install | ||
## Presets | ||
```sh | ||
npm install --save remark-lint-no-file-name-outer-dashes | ||
``` | ||
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 | ||
`readme.md` is ok: | ||
##### `readme.md` | ||
```markdown | ||
###### Out | ||
``` | ||
No messages. | ||
When turned on is passed in, the following error is given: | ||
##### `-readme.md` | ||
###### Out | ||
```text | ||
@@ -29,4 +32,6 @@ 1:1: Do not use initial or final dashes in a file name | ||
When turned on is passed in, the following error is given: | ||
##### `readme-.md` | ||
###### Out | ||
```text | ||
@@ -36,4 +41,47 @@ 1:1: Do not use initial or final dashes in a file name | ||
## Install | ||
```sh | ||
npm install remark-lint-no-file-name-outer-dashes | ||
``` | ||
## Usage | ||
You probably want to use it on the CLI through a config file: | ||
```diff | ||
... | ||
"remarkConfig": { | ||
"plugins": [ | ||
... | ||
"lint", | ||
+ "lint-no-file-name-outer-dashes", | ||
... | ||
] | ||
} | ||
... | ||
``` | ||
Or use it on the CLI directly | ||
```sh | ||
remark -u lint -u lint-no-file-name-outer-dashes 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-file-name-outer-dashes')) | ||
.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) |
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
3054
85