Skip to content

Commit

Permalink
Add snippets for markdownlint inline configuration (fixes #82).
Browse files Browse the repository at this point in the history
  • Loading branch information
travisclagrone authored and DavidAnson committed Jul 24, 2019
1 parent a676bb4 commit 4b1ed91
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@
"url": "./node_modules/markdownlint/schema/markdownlint-config-schema.json"
}
],
"snippets": [
{
"language": "markdown",
"path": "./snippets.json"
}
],
"configuration": {
"title": "markdownlint",
"type": "object",
Expand Down
23 changes: 23 additions & 0 deletions snippets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"insertMarkdownLintDisableComment": {
"prefix": "markdownlint-disable",
"body": "<!-- markdownlint-disable $1 -->",
"description": "Disables one or more markdownlint rules by name (e.g. MD013), alias (e.g. first-heading-h1), or tag (e.g. indentation). Multiple rules are space-delimited (e.g. MD018 MD019). If no rules are specified, then all rules are disabled unconditionally. Takes effect starting with the line this comment is on."
},
"insertMarkdownLintEnableComment": {
"prefix": "markdownlint-enable",
"body": "<!-- markdownlint-enable $1 -->",
"description": "Enables one or more markdownlint rules by name (e.g. MD013), alias (e.g. first-heading-h1), or tag (e.g. indentation). Multiple rules are space-delimited (e.g. MD018 MD019). If no rules are specified, then all rules are enabled unconditionally. Takes effect starting with the line this comment is on."
},

"insertMarkdownLintCaptureComment": {
"prefix": "markdownlint-capture",
"body": "<!-- markdownlint-capture -->",
"description": "Captures the current markdownlint rule configuration. Takes effect on the line this comment is on."
},
"insertMarkdownLintRestoreComment": {
"prefix": "markdownlint-restore",
"body": "<!-- markdownlint-restore -->",
"description": "Restores the most recently captured markdownlint rule configuration, which by default is the document's initial configuration (i.e. as if every document started with `<!-- markdownlint-capture -->`). Takes effect on the line this comment is on."
},
}

0 comments on commit 4b1ed91

Please sign in to comment.