mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-22 05:40:48 +02: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": "---"
|
||||
},
|
||||
"line-length": {
|
||||
"strict": true
|
||||
"strict": true,
|
||||
"code_blocks": false
|
||||
},
|
||||
"no-duplicate-heading": {
|
||||
"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:
|
||||
|
||||
<!-- markdownlint-disable line-length -->
|
||||
|
||||
```javascript
|
||||
/((^---\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),
|
||||
[TOML](https://en.wikipedia.org/wiki/TOML), and
|
||||
[JSON](https://en.wikipedia.org/wiki/JSON) front matter such as:
|
||||
|
@ -778,8 +774,6 @@ markdownlint(options, function callback(err, result) {
|
|||
|
||||
Output:
|
||||
|
||||
<!-- markdownlint-disable line-length -->
|
||||
|
||||
```text
|
||||
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"]
|
||||
|
@ -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"]
|
||||
```
|
||||
|
||||
<!-- markdownlint-restore -->
|
||||
|
||||
Or invoke `markdownlint.sync` for a synchronous call:
|
||||
|
||||
```javascript
|
||||
|
@ -812,8 +804,6 @@ markdownlint(options, function callback(err, result) {
|
|||
|
||||
Output:
|
||||
|
||||
<!-- markdownlint-disable line-length -->
|
||||
|
||||
```json
|
||||
{
|
||||
"good.md": [],
|
||||
|
@ -850,8 +840,6 @@ Output:
|
|||
}
|
||||
```
|
||||
|
||||
<!-- markdownlint-restore -->
|
||||
|
||||
Integration with the [gulp](https://gulpjs.com/) build system is
|
||||
straightforward:
|
||||
|
||||
|
@ -878,8 +866,6 @@ gulp.task("markdownlint", function task() {
|
|||
|
||||
Output:
|
||||
|
||||
<!-- markdownlint-disable line-length -->
|
||||
|
||||
```text
|
||||
[00:00:00] Starting 'markdownlint'...
|
||||
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
|
||||
```
|
||||
|
||||
<!-- markdownlint-restore -->
|
||||
|
||||
Integration with the [Grunt](https://gruntjs.com/) build system is similar:
|
||||
|
||||
```javascript
|
||||
|
@ -922,8 +906,6 @@ module.exports = function wrapper(grunt) {
|
|||
|
||||
Output:
|
||||
|
||||
<!-- markdownlint-disable line-length -->
|
||||
|
||||
```text
|
||||
Running "markdownlint:example" (markdownlint) task
|
||||
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.
|
||||
```
|
||||
|
||||
<!-- markdownlint-restore -->
|
||||
|
||||
### Fixing
|
||||
|
||||
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) {
|
||||
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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue