mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 14:00:13 +01:00
Update .markdownlint.json to set line-length/code_blocks to false and remove unnecessary inline comments to disable/restore.
This commit is contained in:
parent
a5d9f299fe
commit
bbbb63c393
3 changed files with 3 additions and 22 deletions
|
|
@ -26,7 +26,8 @@
|
||||||
"style": "---"
|
"style": "---"
|
||||||
},
|
},
|
||||||
"line-length": {
|
"line-length": {
|
||||||
"strict": true
|
"strict": true,
|
||||||
|
"code_blocks": false
|
||||||
},
|
},
|
||||||
"no-duplicate-heading": {
|
"no-duplicate-heading": {
|
||||||
"siblings_only": true
|
"siblings_only": true
|
||||||
|
|
|
||||||
20
README.md
20
README.md
|
|
@ -510,14 +510,10 @@ specify a custom `RegExp` or use the value `null` to disable the feature.
|
||||||
|
|
||||||
The default value:
|
The default value:
|
||||||
|
|
||||||
<!-- markdownlint-disable line-length -->
|
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
/((^---\s*$[\s\S]*?^---\s*)|(^\+\+\+\s*$[\s\S]*?^(\+\+\+|\.\.\.)\s*)|(^\{\s*$[\s\S]*?^\}\s*))(\r\n|\r|\n|$)/m
|
/((^---\s*$[\s\S]*?^---\s*)|(^\+\+\+\s*$[\s\S]*?^(\+\+\+|\.\.\.)\s*)|(^\{\s*$[\s\S]*?^\}\s*))(\r\n|\r|\n|$)/m
|
||||||
```
|
```
|
||||||
|
|
||||||
<!-- markdownlint-restore -->
|
|
||||||
|
|
||||||
Ignores [YAML](https://en.wikipedia.org/wiki/YAML),
|
Ignores [YAML](https://en.wikipedia.org/wiki/YAML),
|
||||||
[TOML](https://en.wikipedia.org/wiki/TOML), and
|
[TOML](https://en.wikipedia.org/wiki/TOML), and
|
||||||
[JSON](https://en.wikipedia.org/wiki/JSON) front matter such as:
|
[JSON](https://en.wikipedia.org/wiki/JSON) front matter such as:
|
||||||
|
|
@ -778,8 +774,6 @@ markdownlint(options, function callback(err, result) {
|
||||||
|
|
||||||
Output:
|
Output:
|
||||||
|
|
||||||
<!-- markdownlint-disable line-length -->
|
|
||||||
|
|
||||||
```text
|
```text
|
||||||
bad.string: 3: MD010/no-hard-tabs Hard tabs [Column: 19]
|
bad.string: 3: MD010/no-hard-tabs Hard tabs [Column: 19]
|
||||||
bad.string: 1: MD018/no-missing-space-atx No space after hash on atx style heading [Context: "#bad.string"]
|
bad.string: 1: MD018/no-missing-space-atx No space after hash on atx style heading [Context: "#bad.string"]
|
||||||
|
|
@ -791,8 +785,6 @@ bad.md: 3: MD018/no-missing-space-atx No space after hash on atx style heading [
|
||||||
bad.md: 1: MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "#bad.md"]
|
bad.md: 1: MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "#bad.md"]
|
||||||
```
|
```
|
||||||
|
|
||||||
<!-- markdownlint-restore -->
|
|
||||||
|
|
||||||
Or invoke `markdownlint.sync` for a synchronous call:
|
Or invoke `markdownlint.sync` for a synchronous call:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
|
|
@ -812,8 +804,6 @@ markdownlint(options, function callback(err, result) {
|
||||||
|
|
||||||
Output:
|
Output:
|
||||||
|
|
||||||
<!-- markdownlint-disable line-length -->
|
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"good.md": [],
|
"good.md": [],
|
||||||
|
|
@ -850,8 +840,6 @@ Output:
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
<!-- markdownlint-restore -->
|
|
||||||
|
|
||||||
Integration with the [gulp](https://gulpjs.com/) build system is
|
Integration with the [gulp](https://gulpjs.com/) build system is
|
||||||
straightforward:
|
straightforward:
|
||||||
|
|
||||||
|
|
@ -878,8 +866,6 @@ gulp.task("markdownlint", function task() {
|
||||||
|
|
||||||
Output:
|
Output:
|
||||||
|
|
||||||
<!-- markdownlint-disable line-length -->
|
|
||||||
|
|
||||||
```text
|
```text
|
||||||
[00:00:00] Starting 'markdownlint'...
|
[00:00:00] Starting 'markdownlint'...
|
||||||
bad.md: 3: MD010/no-hard-tabs Hard tabs [Column: 17]
|
bad.md: 3: MD010/no-hard-tabs Hard tabs [Column: 17]
|
||||||
|
|
@ -889,8 +875,6 @@ bad.md: 1: MD041/first-line-heading/first-line-h1 First line in a file should be
|
||||||
[00:00:00] Finished 'markdownlint' after 10 ms
|
[00:00:00] Finished 'markdownlint' after 10 ms
|
||||||
```
|
```
|
||||||
|
|
||||||
<!-- markdownlint-restore -->
|
|
||||||
|
|
||||||
Integration with the [Grunt](https://gruntjs.com/) build system is similar:
|
Integration with the [Grunt](https://gruntjs.com/) build system is similar:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
|
|
@ -922,8 +906,6 @@ module.exports = function wrapper(grunt) {
|
||||||
|
|
||||||
Output:
|
Output:
|
||||||
|
|
||||||
<!-- markdownlint-disable line-length -->
|
|
||||||
|
|
||||||
```text
|
```text
|
||||||
Running "markdownlint:example" (markdownlint) task
|
Running "markdownlint:example" (markdownlint) task
|
||||||
Warning:
|
Warning:
|
||||||
|
|
@ -934,8 +916,6 @@ bad.md: 1: MD041/first-line-heading/first-line-h1 First line in a file should be
|
||||||
Use --force to continue.
|
Use --force to continue.
|
||||||
```
|
```
|
||||||
|
|
||||||
<!-- markdownlint-restore -->
|
|
||||||
|
|
||||||
### Fixing
|
### Fixing
|
||||||
|
|
||||||
Rules that can be fixed automatically include a `fixInfo` property which is
|
Rules that can be fixed automatically include a `fixInfo` property which is
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ assert(/^\d+\.\d+\.\d+$/.test(version));
|
||||||
|
|
||||||
function assertConfiguration(config: markdownlint.Configuration) {
|
function assertConfiguration(config: markdownlint.Configuration) {
|
||||||
assert(!!config);
|
assert(!!config);
|
||||||
assert.deepEqual(config["line-length"], { "strict": true });
|
assert.deepEqual(config["line-length"], { "strict": true, "code_blocks": false });
|
||||||
// config assignment is covered by markdownlint.Options
|
// config assignment is covered by markdownlint.Options
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue