mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-19 23:40:12 +01:00
Merge branch 'next'
This commit is contained in:
commit
a852407c88
73 changed files with 4436 additions and 2020 deletions
|
|
@ -39,7 +39,7 @@
|
||||||
"max-depth": "off",
|
"max-depth": "off",
|
||||||
"max-lines": "off",
|
"max-lines": "off",
|
||||||
"max-lines-per-function": "off",
|
"max-lines-per-function": "off",
|
||||||
"max-params": ["error", 10],
|
"max-params": ["off"],
|
||||||
"max-statements": "off",
|
"max-statements": "off",
|
||||||
"multiline-comment-style": ["error", "separate-lines"],
|
"multiline-comment-style": ["error", "separate-lines"],
|
||||||
"multiline-ternary": "off",
|
"multiline-ternary": "off",
|
||||||
|
|
@ -70,15 +70,47 @@
|
||||||
"vars-on-top": "off",
|
"vars-on-top": "off",
|
||||||
"wrap-regex": "off",
|
"wrap-regex": "off",
|
||||||
|
|
||||||
|
"jsdoc/check-access": "error",
|
||||||
|
"jsdoc/check-alignment": "error",
|
||||||
"jsdoc/check-examples": "error",
|
"jsdoc/check-examples": "error",
|
||||||
"jsdoc/check-indentation": "error",
|
"jsdoc/check-indentation": "error",
|
||||||
"jsdoc/check-line-alignment": "error",
|
"jsdoc/check-line-alignment": "error",
|
||||||
|
"jsdoc/check-param-names": "error",
|
||||||
|
"jsdoc/check-property-names": "error",
|
||||||
"jsdoc/check-syntax": "error",
|
"jsdoc/check-syntax": "error",
|
||||||
|
"jsdoc/check-tag-names": "error",
|
||||||
|
"jsdoc/check-types": "error",
|
||||||
|
"jsdoc/check-values": "error",
|
||||||
|
"jsdoc/empty-tags": "error",
|
||||||
|
"jsdoc/implements-on-classes": "error",
|
||||||
"jsdoc/match-description": "error",
|
"jsdoc/match-description": "error",
|
||||||
|
"jsdoc/multiline-blocks": "error",
|
||||||
|
"jsdoc/newline-after-description": "error",
|
||||||
"jsdoc/no-bad-blocks": "error",
|
"jsdoc/no-bad-blocks": "error",
|
||||||
"jsdoc/no-defaults": "error",
|
"jsdoc/no-defaults": "error",
|
||||||
|
"jsdoc/no-multi-asterisks": "error",
|
||||||
|
"jsdoc/no-undefined-types": "error",
|
||||||
|
"jsdoc/require-asterisk-prefix": "error",
|
||||||
"jsdoc/require-description": "error",
|
"jsdoc/require-description": "error",
|
||||||
"jsdoc/require-description-complete-sentence": "error",
|
"jsdoc/require-description-complete-sentence": "error",
|
||||||
|
"jsdoc/require-jsdoc": "error",
|
||||||
|
"jsdoc/require-param": "error",
|
||||||
|
"jsdoc/require-param-description": "error",
|
||||||
|
"jsdoc/require-param-name": "error",
|
||||||
|
"jsdoc/require-param-type": "error",
|
||||||
|
"jsdoc/require-property": "error",
|
||||||
|
"jsdoc/require-property-description": "error",
|
||||||
|
"jsdoc/require-property-name": "error",
|
||||||
|
"jsdoc/require-property-type": "error",
|
||||||
|
"jsdoc/require-returns": "error",
|
||||||
|
"jsdoc/require-returns-check": "error",
|
||||||
|
"jsdoc/require-returns-description": "error",
|
||||||
|
"jsdoc/require-returns-type": "error",
|
||||||
|
"jsdoc/require-throws": "error",
|
||||||
|
"jsdoc/require-yields": "error",
|
||||||
|
"jsdoc/require-yields-check": "error",
|
||||||
|
"jsdoc/tag-lines": "error",
|
||||||
|
"jsdoc/valid-types": "error",
|
||||||
|
|
||||||
"node/handle-callback-err": "error",
|
"node/handle-callback-err": "error",
|
||||||
"node/no-callback-literal": "error",
|
"node/no-callback-literal": "error",
|
||||||
|
|
@ -139,9 +171,11 @@
|
||||||
"unicorn/no-abusive-eslint-disable": "error",
|
"unicorn/no-abusive-eslint-disable": "error",
|
||||||
"unicorn/no-array-callback-reference": "off",
|
"unicorn/no-array-callback-reference": "off",
|
||||||
"unicorn/no-array-for-each": "off",
|
"unicorn/no-array-for-each": "off",
|
||||||
|
"unicorn/no-array-method-this-argument": "error",
|
||||||
"unicorn/no-array-push-push": "error",
|
"unicorn/no-array-push-push": "error",
|
||||||
"unicorn/no-array-reduce": "error",
|
"unicorn/no-array-reduce": "error",
|
||||||
"unicorn/no-console-spaces": "error",
|
"unicorn/no-console-spaces": "error",
|
||||||
|
"unicorn/no-document-cookie": "error",
|
||||||
"unicorn/no-for-loop": "error",
|
"unicorn/no-for-loop": "error",
|
||||||
"unicorn/no-hex-escape": "error",
|
"unicorn/no-hex-escape": "error",
|
||||||
"unicorn/no-instanceof-array": "error",
|
"unicorn/no-instanceof-array": "error",
|
||||||
|
|
@ -153,19 +187,24 @@
|
||||||
"unicorn/no-null": "off",
|
"unicorn/no-null": "off",
|
||||||
"unicorn/no-object-as-default-parameter": "error",
|
"unicorn/no-object-as-default-parameter": "error",
|
||||||
"unicorn/no-process-exit": "error",
|
"unicorn/no-process-exit": "error",
|
||||||
|
"unicorn/no-static-only-class": "error",
|
||||||
"unicorn/no-this-assignment": "error",
|
"unicorn/no-this-assignment": "error",
|
||||||
"unicorn/no-unreadable-array-destructuring": "error",
|
"unicorn/no-unreadable-array-destructuring": "error",
|
||||||
"unicorn/no-unsafe-regex": "off",
|
"unicorn/no-unsafe-regex": "off",
|
||||||
"unicorn/no-unused-properties": "error",
|
"unicorn/no-unused-properties": "error",
|
||||||
|
"unicorn/no-useless-length-check": "error",
|
||||||
|
"unicorn/no-useless-spread": "error",
|
||||||
"unicorn/no-useless-undefined": "error",
|
"unicorn/no-useless-undefined": "error",
|
||||||
"unicorn/no-zero-fractions": "error",
|
"unicorn/no-zero-fractions": "error",
|
||||||
"unicorn/number-literal-case": "error",
|
"unicorn/number-literal-case": "error",
|
||||||
"unicorn/numeric-separators-style": "error",
|
"unicorn/numeric-separators-style": "error",
|
||||||
"unicorn/prefer-add-event-listener": "error",
|
"unicorn/prefer-add-event-listener": "error",
|
||||||
"unicorn/prefer-array-find": "error",
|
"unicorn/prefer-array-find": "error",
|
||||||
|
"unicorn/prefer-array-flat": "error",
|
||||||
"unicorn/prefer-array-flat-map": "error",
|
"unicorn/prefer-array-flat-map": "error",
|
||||||
"unicorn/prefer-array-index-of": "error",
|
"unicorn/prefer-array-index-of": "error",
|
||||||
"unicorn/prefer-array-some": "error",
|
"unicorn/prefer-array-some": "error",
|
||||||
|
"unicorn/prefer-at": "off",
|
||||||
"unicorn/prefer-date-now": "error",
|
"unicorn/prefer-date-now": "error",
|
||||||
"unicorn/prefer-default-parameters": "error",
|
"unicorn/prefer-default-parameters": "error",
|
||||||
"unicorn/prefer-dom-node-append": "error",
|
"unicorn/prefer-dom-node-append": "error",
|
||||||
|
|
@ -176,9 +215,14 @@
|
||||||
"unicorn/prefer-keyboard-event-key": "error",
|
"unicorn/prefer-keyboard-event-key": "error",
|
||||||
"unicorn/prefer-math-trunc": "error",
|
"unicorn/prefer-math-trunc": "error",
|
||||||
"unicorn/prefer-modern-dom-apis": "error",
|
"unicorn/prefer-modern-dom-apis": "error",
|
||||||
|
"unicorn/prefer-module": "off",
|
||||||
"unicorn/prefer-negative-index": "error",
|
"unicorn/prefer-negative-index": "error",
|
||||||
|
"unicorn/prefer-node-protocol": "error",
|
||||||
"unicorn/prefer-number-properties": "error",
|
"unicorn/prefer-number-properties": "error",
|
||||||
|
"unicorn/prefer-object-from-entries": "error",
|
||||||
|
"unicorn/prefer-object-has-own": "error",
|
||||||
"unicorn/prefer-optional-catch-binding": "error",
|
"unicorn/prefer-optional-catch-binding": "error",
|
||||||
|
"unicorn/prefer-prototype-methods": "error",
|
||||||
"unicorn/prefer-query-selector": "error",
|
"unicorn/prefer-query-selector": "error",
|
||||||
"unicorn/prefer-reflect-apply": "error",
|
"unicorn/prefer-reflect-apply": "error",
|
||||||
"unicorn/prefer-regexp-test": "error",
|
"unicorn/prefer-regexp-test": "error",
|
||||||
|
|
@ -188,9 +232,14 @@
|
||||||
"unicorn/prefer-string-slice": "off",
|
"unicorn/prefer-string-slice": "off",
|
||||||
"unicorn/prefer-string-starts-ends-with": "error",
|
"unicorn/prefer-string-starts-ends-with": "error",
|
||||||
"unicorn/prefer-string-trim-start-end": "error",
|
"unicorn/prefer-string-trim-start-end": "error",
|
||||||
|
"unicorn/prefer-switch": "off",
|
||||||
"unicorn/prefer-ternary": "error",
|
"unicorn/prefer-ternary": "error",
|
||||||
|
"unicorn/prefer-top-level-await": "error",
|
||||||
"unicorn/prefer-type-error": "error",
|
"unicorn/prefer-type-error": "error",
|
||||||
"unicorn/prevent-abbreviations": "off",
|
"unicorn/prevent-abbreviations": "off",
|
||||||
|
"unicorn/require-array-join-separator": "error",
|
||||||
|
"unicorn/require-number-to-fixed-digits-argument": "error",
|
||||||
|
"unicorn/require-post-message-target-origin": "error",
|
||||||
"unicorn/string-content": "error",
|
"unicorn/string-content": "error",
|
||||||
"unicorn/throw-new-error": "error"
|
"unicorn/throw-new-error": "error"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
|
|
@ -16,12 +16,12 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-latest, ubuntu-latest, windows-latest]
|
os: [macos-latest, ubuntu-latest, windows-latest]
|
||||||
node-version: [10.x, 12.x, 14.x, 15.x]
|
node-version: [12.x, 14.x, 16.x]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
|
|
|
||||||
5
.github/workflows/codeql-analysis.yml
vendored
5
.github/workflows/codeql-analysis.yml
vendored
|
|
@ -20,11 +20,6 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
|
||||||
fetch-depth: 2
|
|
||||||
|
|
||||||
- run: git checkout HEAD^2
|
|
||||||
if: ${{ github.event_name == 'pull_request' }}
|
|
||||||
|
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v1
|
uses: github/codeql-action/init@v1
|
||||||
|
|
|
||||||
2
.github/workflows/test-repos.yml
vendored
2
.github/workflows/test-repos.yml
vendored
|
|
@ -18,7 +18,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
|
|
|
||||||
45
README.md
45
README.md
|
|
@ -3,7 +3,6 @@
|
||||||
> A Node.js style checker and lint tool for Markdown/CommonMark files.
|
> A Node.js style checker and lint tool for Markdown/CommonMark files.
|
||||||
|
|
||||||
[![npm version][npm-image]][npm-url]
|
[![npm version][npm-image]][npm-url]
|
||||||
[![CI Status][ci-image]][ci-url]
|
|
||||||
[![License][license-image]][license-url]
|
[![License][license-image]][license-url]
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
@ -295,7 +294,8 @@ function markdownlint(options) { ... }
|
||||||
|
|
||||||
Type: `Object`
|
Type: `Object`
|
||||||
|
|
||||||
Configures the function.
|
Configures the function. All properties are optional, but at least one
|
||||||
|
of `files` or `strings` should be set to provide input.
|
||||||
|
|
||||||
##### options.customRules
|
##### options.customRules
|
||||||
|
|
||||||
|
|
@ -535,6 +535,16 @@ Each item in the top-level `Array` should be of the form:
|
||||||
[ require("markdown-it-plugin"), plugin_param_0, plugin_param_1, ... ]
|
[ require("markdown-it-plugin"), plugin_param_0, plugin_param_1, ... ]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
##### options.fs
|
||||||
|
|
||||||
|
Type: `Object` implementing the [file system API](https://nodejs.org/api/fs.html)
|
||||||
|
|
||||||
|
In advanced scenarios, it may be desirable to bypass the default file system API.
|
||||||
|
If a custom file system implementation is provided, `markdownlint` will use that
|
||||||
|
instead of invoking `require("fs")`.
|
||||||
|
|
||||||
|
Note: The only methods called are `readFile` and `readFileSync`.
|
||||||
|
|
||||||
#### callback
|
#### callback
|
||||||
|
|
||||||
Type: `Function` taking (`Error`, `Object`)
|
Type: `Function` taking (`Error`, `Object`)
|
||||||
|
|
@ -567,10 +577,11 @@ Asynchronous API:
|
||||||
*
|
*
|
||||||
* @param {string} file Configuration file name.
|
* @param {string} file Configuration file name.
|
||||||
* @param {ConfigurationParser[] | ReadConfigCallback} parsers Parsing function(s).
|
* @param {ConfigurationParser[] | ReadConfigCallback} parsers Parsing function(s).
|
||||||
|
* @param {Object} [fs] File system implementation.
|
||||||
* @param {ReadConfigCallback} [callback] Callback (err, result) function.
|
* @param {ReadConfigCallback} [callback] Callback (err, result) function.
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
function readConfig(file, parsers, callback) { ... }
|
function readConfig(file, parsers, fs, callback) { ... }
|
||||||
```
|
```
|
||||||
|
|
||||||
Synchronous API:
|
Synchronous API:
|
||||||
|
|
@ -581,13 +592,14 @@ Synchronous API:
|
||||||
*
|
*
|
||||||
* @param {string} file Configuration file name.
|
* @param {string} file Configuration file name.
|
||||||
* @param {ConfigurationParser[]} [parsers] Parsing function(s).
|
* @param {ConfigurationParser[]} [parsers] Parsing function(s).
|
||||||
|
* @param {Object} [fs] File system implementation.
|
||||||
* @returns {Configuration} Configuration object.
|
* @returns {Configuration} Configuration object.
|
||||||
*/
|
*/
|
||||||
function readConfigSync(file, parsers) { ... }
|
function readConfigSync(file, parsers, fs) { ... }
|
||||||
```
|
```
|
||||||
|
|
||||||
Promise API (in the `promises` namespace like Node.js's
|
Promise API (in the `promises` namespace like Node.js's
|
||||||
[`fs` Promises API](https://nodejs.org/api/fs.html#fs_fs_promises_api)):
|
[`fs` Promises API](https://nodejs.org/api/fs.html#fs_promises_api)):
|
||||||
|
|
||||||
```js
|
```js
|
||||||
/**
|
/**
|
||||||
|
|
@ -595,9 +607,10 @@ Promise API (in the `promises` namespace like Node.js's
|
||||||
*
|
*
|
||||||
* @param {string} file Configuration file name.
|
* @param {string} file Configuration file name.
|
||||||
* @param {ConfigurationParser[]} [parsers] Parsing function(s).
|
* @param {ConfigurationParser[]} [parsers] Parsing function(s).
|
||||||
|
* @param {Object} [fs] File system implementation.
|
||||||
* @returns {Promise<Configuration>} Configuration object.
|
* @returns {Promise<Configuration>} Configuration object.
|
||||||
*/
|
*/
|
||||||
function readConfig(file, parsers) { ... }
|
function readConfig(file, parsers, fs) { ... }
|
||||||
```
|
```
|
||||||
|
|
||||||
#### file
|
#### file
|
||||||
|
|
@ -628,6 +641,16 @@ For example:
|
||||||
[ JSON.parse, require("toml").parse, require("js-yaml").load ]
|
[ JSON.parse, require("toml").parse, require("js-yaml").load ]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### fs
|
||||||
|
|
||||||
|
Type: *Optional* `Object` implementing the [file system API](https://nodejs.org/api/fs.html)
|
||||||
|
|
||||||
|
In advanced scenarios, it may be desirable to bypass the default file system API.
|
||||||
|
If a custom file system implementation is provided, `markdownlint` will use that
|
||||||
|
instead of invoking `require("fs")`.
|
||||||
|
|
||||||
|
Note: The only methods called are `readFile`, `readFileSync`, `access`, and `accessSync`.
|
||||||
|
|
||||||
#### callback
|
#### callback
|
||||||
|
|
||||||
Type: `Function` taking (`Error`, `Object`)
|
Type: `Function` taking (`Error`, `Object`)
|
||||||
|
|
@ -835,7 +858,8 @@ const results = window.markdownlint.sync(options).toString();
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
For ideas how to integrate `markdownlint` into your workflow, refer to the following projects:
|
For ideas how to integrate `markdownlint` into your workflow, refer to the
|
||||||
|
following projects or one of the tools in the [Related section](#Related):
|
||||||
|
|
||||||
* [.NET Documentation](https://docs.microsoft.com/en-us/dotnet/) ([Search repository](https://github.com/dotnet/docs/search?q=markdownlint))
|
* [.NET Documentation](https://docs.microsoft.com/en-us/dotnet/) ([Search repository](https://github.com/dotnet/docs/search?q=markdownlint))
|
||||||
* [ally.js](https://allyjs.io/) ([Search repository](https://github.com/medialize/ally.js/search?q=markdownlint))
|
* [ally.js](https://allyjs.io/) ([Search repository](https://github.com/medialize/ally.js/search?q=markdownlint))
|
||||||
|
|
@ -843,12 +867,12 @@ For ideas how to integrate `markdownlint` into your workflow, refer to the follo
|
||||||
* [CodiMD](https://github.com/hackmdio/codimd) ([Search repository](https://github.com/hackmdio/codimd/search?q=markdownlint))
|
* [CodiMD](https://github.com/hackmdio/codimd) ([Search repository](https://github.com/hackmdio/codimd/search?q=markdownlint))
|
||||||
* [ESLint](https://eslint.org/) ([Search repository](https://github.com/eslint/eslint/search?q=markdownlint))
|
* [ESLint](https://eslint.org/) ([Search repository](https://github.com/eslint/eslint/search?q=markdownlint))
|
||||||
* [Garden React Components](https://zendeskgarden.github.io/react-components/) ([Search repository](https://github.com/zendeskgarden/react-components/search?q=markdownlint))
|
* [Garden React Components](https://zendeskgarden.github.io/react-components/) ([Search repository](https://github.com/zendeskgarden/react-components/search?q=markdownlint))
|
||||||
|
* [MDN Web Docs](https://developer.mozilla.org/) ([Search repository](https://github.com/mdn/content/search?q=markdownlint))
|
||||||
* [MkDocs](https://www.mkdocs.org/) ([Search repository](https://github.com/mkdocs/mkdocs/search?q=markdownlint))
|
* [MkDocs](https://www.mkdocs.org/) ([Search repository](https://github.com/mkdocs/mkdocs/search?q=markdownlint))
|
||||||
* [Mocha](https://mochajs.org/) ([Search repository](https://github.com/mochajs/mocha/search?q=markdownlint))
|
* [Mocha](https://mochajs.org/) ([Search repository](https://github.com/mochajs/mocha/search?q=markdownlint))
|
||||||
* [Reactable](https://glittershark.github.io/reactable/) ([Search repository](https://github.com/glittershark/reactable/search?q=markdownlint))
|
* [Reactable](https://glittershark.github.io/reactable/) ([Search repository](https://github.com/glittershark/reactable/search?q=markdownlint))
|
||||||
* [Sinon.JS](https://sinonjs.org/) ([Search repository](https://github.com/sinonjs/sinon/search?q=markdownlint))
|
* [Sinon.JS](https://sinonjs.org/) ([Search repository](https://github.com/sinonjs/sinon/search?q=markdownlint))
|
||||||
* [TestCafe](https://devexpress.github.io/testcafe/) ([Search repository](https://github.com/DevExpress/testcafe/search?q=markdownlint))
|
* [TestCafe](https://devexpress.github.io/testcafe/) ([Search repository](https://github.com/DevExpress/testcafe/search?q=markdownlint))
|
||||||
* [TypeScript Handbook](https://www.typescriptlang.org/docs/handbook/basic-types.html) ([Search repository](https://github.com/Microsoft/TypeScript-Handbook/search?q=markdownlint))
|
|
||||||
* [V8](https://v8.dev/) ([Search repository](https://github.com/v8/v8.dev/search?q=markdownlint))
|
* [V8](https://v8.dev/) ([Search repository](https://github.com/v8/v8.dev/search?q=markdownlint))
|
||||||
* [webhint](https://webhint.io/) ([Search repository](https://github.com/webhintio/hint/search?q=markdownlint))
|
* [webhint](https://webhint.io/) ([Search repository](https://github.com/webhintio/hint/search?q=markdownlint))
|
||||||
* [webpack](https://webpack.js.org/) ([Search repository](https://github.com/webpack/webpack.js.org/search?q=markdownlint))
|
* [webpack](https://webpack.js.org/) ([Search repository](https://github.com/webpack/webpack.js.org/search?q=markdownlint))
|
||||||
|
|
@ -941,10 +965,11 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for more information.
|
||||||
information for MD004/ul-style, improve MD018/MD019/MD020/MD021/MD037/MD041, improve
|
information for MD004/ul-style, improve MD018/MD019/MD020/MD021/MD037/MD041, improve
|
||||||
HTML comment handling, update test runner and test suite, update dependencies.
|
HTML comment handling, update test runner and test suite, update dependencies.
|
||||||
* 0.23.1 - Work around lack of webpack support for dynamic calls to `require` (`.resolve`).
|
* 0.23.1 - Work around lack of webpack support for dynamic calls to `require` (`.resolve`).
|
||||||
|
* 0.24.0 - Remove support for end-of-life Node version 10, add support for custom file system
|
||||||
|
module, improve MD010/MD011/MD037/MD043/MD044, improve TypeScript declaration file
|
||||||
|
and JSON schema, update dependencies.
|
||||||
|
|
||||||
[npm-image]: https://img.shields.io/npm/v/markdownlint.svg
|
[npm-image]: https://img.shields.io/npm/v/markdownlint.svg
|
||||||
[npm-url]: https://www.npmjs.com/package/markdownlint
|
[npm-url]: https://www.npmjs.com/package/markdownlint
|
||||||
[ci-image]: https://github.com/DavidAnson/markdownlint/workflows/CI/badge.svg?branch=main
|
|
||||||
[ci-url]: https://github.com/DavidAnson/markdownlint/actions?query=branch%3Amain
|
|
||||||
[license-image]: https://img.shields.io/npm/l/markdownlint.svg
|
[license-image]: https://img.shields.io/npm/l/markdownlint.svg
|
||||||
[license-url]: https://opensource.org/licenses/MIT
|
[license-url]: https://opensource.org/licenses/MIT
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*! markdownlint 0.23.1 https://github.com/DavidAnson/markdownlint @license MIT */
|
/*! markdownlint 0.24.0 https://github.com/DavidAnson/markdownlint @license MIT */
|
||||||
var markdownlint;markdownlint =
|
var markdownlint;
|
||||||
/******/ (() => { // webpackBootstrap
|
/******/ (() => { // webpackBootstrap
|
||||||
/******/ var __webpack_modules__ = ({
|
/******/ var __webpack_modules__ = ({
|
||||||
|
|
||||||
|
|
@ -30,7 +30,7 @@ module.exports = webpackEmptyContext;
|
||||||
"use strict";
|
"use strict";
|
||||||
// @ts-check
|
// @ts-check
|
||||||
|
|
||||||
var os = __webpack_require__(/*! os */ "?5533");
|
var os = __webpack_require__(/*! os */ "?591e");
|
||||||
// Regular expression for matching common newline characters
|
// Regular expression for matching common newline characters
|
||||||
// See NEWLINES_RE in markdown-it/lib/rules_core/normalize.js
|
// See NEWLINES_RE in markdown-it/lib/rules_core/normalize.js
|
||||||
var newLineRe = /\r\n?|\n/g;
|
var newLineRe = /\r\n?|\n/g;
|
||||||
|
|
@ -51,7 +51,10 @@ module.exports.orderedListItemMarkerRe = /^[\s>]*0*(\d+)[.)]/;
|
||||||
// Regular expression for all instances of emphasis markers
|
// Regular expression for all instances of emphasis markers
|
||||||
var emphasisMarkersRe = /[_*]/g;
|
var emphasisMarkersRe = /[_*]/g;
|
||||||
// Regular expression for inline links and shortcut reference links
|
// Regular expression for inline links and shortcut reference links
|
||||||
var linkRe = /\[(?:[^[\]]|\[[^\]]*\])*\](?:\(\S*\))?/g;
|
var linkRe = /(\[(?:[^[\]]|\[[^\]]*\])*\])(\(\S*\)|\[\S*\])?/g;
|
||||||
|
module.exports.linkRe = linkRe;
|
||||||
|
// Regular expression for link reference definition lines
|
||||||
|
module.exports.linkReferenceRe = /^ {0,3}\[[^\]]+]:\s.*$/;
|
||||||
// All punctuation characters (normal and full-width)
|
// All punctuation characters (normal and full-width)
|
||||||
var allPunctuation = ".,;:!?。,;:!?";
|
var allPunctuation = ".,;:!?。,;:!?";
|
||||||
module.exports.allPunctuation = allPunctuation;
|
module.exports.allPunctuation = allPunctuation;
|
||||||
|
|
@ -298,14 +301,14 @@ module.exports.forEachLine = function forEachLine(lineMetadata, handler) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
// Returns (nested) lists as a flat array (in order)
|
// Returns (nested) lists as a flat array (in order)
|
||||||
module.exports.flattenLists = function flattenLists(params) {
|
module.exports.flattenLists = function flattenLists(tokens) {
|
||||||
var flattenedLists = [];
|
var flattenedLists = [];
|
||||||
var stack = [];
|
var stack = [];
|
||||||
var current = null;
|
var current = null;
|
||||||
var nesting = 0;
|
var nesting = 0;
|
||||||
var nestingStack = [];
|
var nestingStack = [];
|
||||||
var lastWithMap = { "map": [0, 1] };
|
var lastWithMap = { "map": [0, 1] };
|
||||||
params.tokens.forEach(function (token) {
|
tokens.forEach(function (token) {
|
||||||
if (isMathBlock(token) && token.map[1]) {
|
if (isMathBlock(token) && token.map[1]) {
|
||||||
// markdown-it-texmath plugin does not account for math_block_end
|
// markdown-it-texmath plugin does not account for math_block_end
|
||||||
token.map[1]++;
|
token.map[1]++;
|
||||||
|
|
@ -514,6 +517,36 @@ module.exports.addErrorContext = function addErrorContext(onError, lineNumber, c
|
||||||
}
|
}
|
||||||
addError(onError, lineNumber, null, context, range, fixInfo);
|
addError(onError, lineNumber, null, context, range, fixInfo);
|
||||||
};
|
};
|
||||||
|
/**
|
||||||
|
* Returns an array of code span ranges.
|
||||||
|
*
|
||||||
|
* @param {string[]} lines Lines to scan for code span ranges.
|
||||||
|
* @returns {number[][]} Array of ranges (line, index, length).
|
||||||
|
*/
|
||||||
|
module.exports.inlineCodeSpanRanges = function (lines) {
|
||||||
|
var exclusions = [];
|
||||||
|
forEachInlineCodeSpan(lines.join("\n"), function (code, lineIndex, columnIndex) {
|
||||||
|
var codeLines = code.split(newLineRe);
|
||||||
|
// eslint-disable-next-line unicorn/no-for-loop
|
||||||
|
for (var i = 0; i < codeLines.length; i++) {
|
||||||
|
exclusions.push([lineIndex + i, columnIndex, codeLines[i].length]);
|
||||||
|
columnIndex = 0;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return exclusions;
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* Determines whether the specified range overlaps another range.
|
||||||
|
*
|
||||||
|
* @param {number[][]} ranges Array of ranges (line, index, length).
|
||||||
|
* @param {number} lineIndex Line index to check.
|
||||||
|
* @param {number} index Index to check.
|
||||||
|
* @param {number} length Length to check.
|
||||||
|
* @returns {boolean} True iff the specified range overlaps.
|
||||||
|
*/
|
||||||
|
module.exports.overlapsAnyRange = function (ranges, lineIndex, index, length) { return (!ranges.every(function (span) { return ((lineIndex !== span[0]) ||
|
||||||
|
(index + length < span[1]) ||
|
||||||
|
(index > span[1] + span[2])); })); };
|
||||||
// Returns a range object for a line by applying a RegExp
|
// Returns a range object for a line by applying a RegExp
|
||||||
module.exports.rangeFromRegExp = function rangeFromRegExp(line, regexp) {
|
module.exports.rangeFromRegExp = function rangeFromRegExp(line, regexp) {
|
||||||
var range = null;
|
var range = null;
|
||||||
|
|
@ -725,13 +758,6 @@ module.exports.applyFixes = function applyFixes(input, errors) {
|
||||||
"use strict";
|
"use strict";
|
||||||
// @ts-check
|
// @ts-check
|
||||||
|
|
||||||
var lineMetadata = null;
|
|
||||||
module.exports.lineMetadata = function (value) {
|
|
||||||
if (value) {
|
|
||||||
lineMetadata = value;
|
|
||||||
}
|
|
||||||
return lineMetadata;
|
|
||||||
};
|
|
||||||
var flattenedLists = null;
|
var flattenedLists = null;
|
||||||
module.exports.flattenedLists = function (value) {
|
module.exports.flattenedLists = function (value) {
|
||||||
if (value) {
|
if (value) {
|
||||||
|
|
@ -739,9 +765,24 @@ module.exports.flattenedLists = function (value) {
|
||||||
}
|
}
|
||||||
return flattenedLists;
|
return flattenedLists;
|
||||||
};
|
};
|
||||||
|
var inlineCodeSpanRanges = null;
|
||||||
|
module.exports.inlineCodeSpanRanges = function (value) {
|
||||||
|
if (value) {
|
||||||
|
inlineCodeSpanRanges = value;
|
||||||
|
}
|
||||||
|
return inlineCodeSpanRanges;
|
||||||
|
};
|
||||||
|
var lineMetadata = null;
|
||||||
|
module.exports.lineMetadata = function (value) {
|
||||||
|
if (value) {
|
||||||
|
lineMetadata = value;
|
||||||
|
}
|
||||||
|
return lineMetadata;
|
||||||
|
};
|
||||||
module.exports.clear = function () {
|
module.exports.clear = function () {
|
||||||
lineMetadata = null;
|
|
||||||
flattenedLists = null;
|
flattenedLists = null;
|
||||||
|
inlineCodeSpanRanges = null;
|
||||||
|
lineMetadata = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -767,16 +808,13 @@ var __assign = (this && this.__assign) || function () {
|
||||||
};
|
};
|
||||||
return __assign.apply(this, arguments);
|
return __assign.apply(this, arguments);
|
||||||
};
|
};
|
||||||
var __spreadArrays = (this && this.__spreadArrays) || function () {
|
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
||||||
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
||||||
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
to[j] = from[i];
|
||||||
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
return to;
|
||||||
r[k] = a[j];
|
|
||||||
return r;
|
|
||||||
};
|
};
|
||||||
var fs = __webpack_require__(/*! fs */ "?65c5");
|
var path = __webpack_require__(/*! path */ "?b85c");
|
||||||
var path = __webpack_require__(/*! path */ "?0f27");
|
var promisify = __webpack_require__(/*! util */ "?96a2").promisify;
|
||||||
var promisify = __webpack_require__(/*! util */ "?0bed").promisify;
|
|
||||||
var markdownIt = __webpack_require__(/*! markdown-it */ "markdown-it");
|
var markdownIt = __webpack_require__(/*! markdown-it */ "markdown-it");
|
||||||
var rules = __webpack_require__(/*! ./rules */ "../lib/rules.js");
|
var rules = __webpack_require__(/*! ./rules */ "../lib/rules.js");
|
||||||
var helpers = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js");
|
var helpers = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js");
|
||||||
|
|
@ -950,7 +988,7 @@ function annotateTokens(tokens, lines) {
|
||||||
// Handle missing maps for table head/body
|
// Handle missing maps for table head/body
|
||||||
if ((token.type === "thead_open") ||
|
if ((token.type === "thead_open") ||
|
||||||
(token.type === "tbody_open")) {
|
(token.type === "tbody_open")) {
|
||||||
tableMap = token.map.slice();
|
tableMap = __spreadArray([], token.map);
|
||||||
}
|
}
|
||||||
else if ((token.type === "tr_close") &&
|
else if ((token.type === "tr_close") &&
|
||||||
tableMap) {
|
tableMap) {
|
||||||
|
|
@ -961,7 +999,7 @@ function annotateTokens(tokens, lines) {
|
||||||
tableMap = null;
|
tableMap = null;
|
||||||
}
|
}
|
||||||
if (tableMap && !token.map) {
|
if (tableMap && !token.map) {
|
||||||
token.map = tableMap.slice();
|
token.map = __spreadArray([], tableMap);
|
||||||
}
|
}
|
||||||
// Update token metadata
|
// Update token metadata
|
||||||
if (token.map) {
|
if (token.map) {
|
||||||
|
|
@ -1235,7 +1273,8 @@ function lintContent(ruleList, name, content, md, config, frontMatter, handleRul
|
||||||
frontMatterLines: frontMatterLines
|
frontMatterLines: frontMatterLines
|
||||||
};
|
};
|
||||||
cache.lineMetadata(helpers.getLineMetadata(params));
|
cache.lineMetadata(helpers.getLineMetadata(params));
|
||||||
cache.flattenedLists(helpers.flattenLists(params));
|
cache.flattenedLists(helpers.flattenLists(params.tokens));
|
||||||
|
cache.inlineCodeSpanRanges(helpers.inlineCodeSpanRanges(params.lines));
|
||||||
// Function to run for each rule
|
// Function to run for each rule
|
||||||
var result = (resultVersion === 0) ? {} : [];
|
var result = (resultVersion === 0) ? {} : [];
|
||||||
// eslint-disable-next-line jsdoc/require-jsdoc
|
// eslint-disable-next-line jsdoc/require-jsdoc
|
||||||
|
|
@ -1321,7 +1360,7 @@ function lintContent(ruleList, name, content, md, config, frontMatter, handleRul
|
||||||
"lineNumber": errorInfo.lineNumber + frontMatterLines.length,
|
"lineNumber": errorInfo.lineNumber + frontMatterLines.length,
|
||||||
"detail": errorInfo.detail || null,
|
"detail": errorInfo.detail || null,
|
||||||
"context": errorInfo.context || null,
|
"context": errorInfo.context || null,
|
||||||
"range": errorInfo.range ? __spreadArrays(errorInfo.range) : null,
|
"range": errorInfo.range ? __spreadArray([], errorInfo.range) : null,
|
||||||
"fixInfo": fixInfo ? cleanFixInfo : null
|
"fixInfo": fixInfo ? cleanFixInfo : null
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -1406,11 +1445,12 @@ function lintContent(ruleList, name, content, md, config, frontMatter, handleRul
|
||||||
* @param {boolean} handleRuleFailures Whether to handle exceptions in rules.
|
* @param {boolean} handleRuleFailures Whether to handle exceptions in rules.
|
||||||
* @param {boolean} noInlineConfig Whether to allow inline configuration.
|
* @param {boolean} noInlineConfig Whether to allow inline configuration.
|
||||||
* @param {number} resultVersion Version of the LintResults object to return.
|
* @param {number} resultVersion Version of the LintResults object to return.
|
||||||
|
* @param {Object} fs File system implementation.
|
||||||
* @param {boolean} synchronous Whether to execute synchronously.
|
* @param {boolean} synchronous Whether to execute synchronously.
|
||||||
* @param {Function} callback Callback (err, result) function.
|
* @param {Function} callback Callback (err, result) function.
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
function lintFile(ruleList, file, md, config, frontMatter, handleRuleFailures, noInlineConfig, resultVersion, synchronous, callback) {
|
function lintFile(ruleList, file, md, config, frontMatter, handleRuleFailures, noInlineConfig, resultVersion, fs, synchronous, callback) {
|
||||||
// eslint-disable-next-line jsdoc/require-jsdoc
|
// eslint-disable-next-line jsdoc/require-jsdoc
|
||||||
function lintContentWrapper(err, content) {
|
function lintContentWrapper(err, content) {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
|
@ -1420,7 +1460,6 @@ function lintFile(ruleList, file, md, config, frontMatter, handleRuleFailures, n
|
||||||
}
|
}
|
||||||
// Make a/synchronous call to read file
|
// Make a/synchronous call to read file
|
||||||
if (synchronous) {
|
if (synchronous) {
|
||||||
// @ts-ignore
|
|
||||||
lintContentWrapper(null, fs.readFileSync(file, "utf8"));
|
lintContentWrapper(null, fs.readFileSync(file, "utf8"));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
@ -1447,7 +1486,7 @@ function lintInput(options, synchronous, callback) {
|
||||||
}
|
}
|
||||||
var files = [];
|
var files = [];
|
||||||
if (Array.isArray(options.files)) {
|
if (Array.isArray(options.files)) {
|
||||||
files = options.files.slice();
|
files = __spreadArray([], options.files);
|
||||||
}
|
}
|
||||||
else if (options.files) {
|
else if (options.files) {
|
||||||
files = [String(options.files)];
|
files = [String(options.files)];
|
||||||
|
|
@ -1467,6 +1506,7 @@ function lintInput(options, synchronous, callback) {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
md.use.apply(md, plugin);
|
md.use.apply(md, plugin);
|
||||||
});
|
});
|
||||||
|
var fs = options.fs || __webpack_require__(/*! fs */ "?ec0a");
|
||||||
var results = newResults(ruleList);
|
var results = newResults(ruleList);
|
||||||
var done = false;
|
var done = false;
|
||||||
// Linting of strings is always synchronous
|
// Linting of strings is always synchronous
|
||||||
|
|
@ -1486,7 +1526,7 @@ function lintInput(options, synchronous, callback) {
|
||||||
if (synchronous) {
|
if (synchronous) {
|
||||||
// Lint files synchronously
|
// Lint files synchronously
|
||||||
while (!done && (syncItem = files.shift())) {
|
while (!done && (syncItem = files.shift())) {
|
||||||
lintFile(ruleList, syncItem, md, config, frontMatter, handleRuleFailures, noInlineConfig, resultVersion, synchronous, syncCallback);
|
lintFile(ruleList, syncItem, md, config, frontMatter, handleRuleFailures, noInlineConfig, resultVersion, fs, synchronous, syncCallback);
|
||||||
}
|
}
|
||||||
return done || callback(null, results);
|
return done || callback(null, results);
|
||||||
}
|
}
|
||||||
|
|
@ -1500,7 +1540,7 @@ function lintInput(options, synchronous, callback) {
|
||||||
}
|
}
|
||||||
else if (asyncItem) {
|
else if (asyncItem) {
|
||||||
concurrency++;
|
concurrency++;
|
||||||
lintFile(ruleList, asyncItem, md, config, frontMatter, handleRuleFailures, noInlineConfig, resultVersion, synchronous, function (err, result) {
|
lintFile(ruleList, asyncItem, md, config, frontMatter, handleRuleFailures, noInlineConfig, resultVersion, fs, synchronous, function (err, result) {
|
||||||
concurrency--;
|
concurrency--;
|
||||||
if (err) {
|
if (err) {
|
||||||
done = true;
|
done = true;
|
||||||
|
|
@ -1604,24 +1644,51 @@ function parseConfiguration(name, content, parsers) {
|
||||||
*
|
*
|
||||||
* @param {string} configFile Configuration file name.
|
* @param {string} configFile Configuration file name.
|
||||||
* @param {string} referenceId Referenced identifier to resolve.
|
* @param {string} referenceId Referenced identifier to resolve.
|
||||||
|
* @param {Object} fs File system implementation.
|
||||||
|
* @param {ResolveConfigExtendsCallback} [callback] Callback (err, result)
|
||||||
|
* function.
|
||||||
|
* @returns {void}
|
||||||
|
*/
|
||||||
|
function resolveConfigExtends(configFile, referenceId, fs, callback) {
|
||||||
|
var configFileDirname = path.dirname(configFile);
|
||||||
|
var resolvedExtendsFile = path.resolve(configFileDirname, referenceId);
|
||||||
|
fs.access(resolvedExtendsFile, function (err) {
|
||||||
|
if (err) {
|
||||||
|
// Not a file, try require.resolve
|
||||||
|
try {
|
||||||
|
return callback(null, dynamicRequire.resolve(referenceId, { "paths": [configFileDirname] }));
|
||||||
|
}
|
||||||
|
catch (_a) {
|
||||||
|
// Unable to resolve, use resolvedExtendsFile
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return callback(null, resolvedExtendsFile);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Resolve referenced "extends" path in a configuration file
|
||||||
|
* using path.resolve() with require.resolve() as a fallback.
|
||||||
|
*
|
||||||
|
* @param {string} configFile Configuration file name.
|
||||||
|
* @param {string} referenceId Referenced identifier to resolve.
|
||||||
|
* @param {Object} fs File system implementation.
|
||||||
* @returns {string} Resolved path to file.
|
* @returns {string} Resolved path to file.
|
||||||
*/
|
*/
|
||||||
function resolveConfigExtends(configFile, referenceId) {
|
function resolveConfigExtendsSync(configFile, referenceId, fs) {
|
||||||
var configFileDirname = path.dirname(configFile);
|
var configFileDirname = path.dirname(configFile);
|
||||||
var resolvedExtendsFile = path.resolve(configFileDirname, referenceId);
|
var resolvedExtendsFile = path.resolve(configFileDirname, referenceId);
|
||||||
try {
|
try {
|
||||||
if (fs.statSync(resolvedExtendsFile).isFile()) {
|
fs.accessSync(resolvedExtendsFile);
|
||||||
return resolvedExtendsFile;
|
return resolvedExtendsFile;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
catch (_a) {
|
catch (_a) {
|
||||||
// If not a file or fs.statSync throws, try require.resolve
|
// Not a file, try require.resolve
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
return dynamicRequire.resolve(referenceId, { "paths": [configFileDirname] });
|
return dynamicRequire.resolve(referenceId, { "paths": [configFileDirname] });
|
||||||
}
|
}
|
||||||
catch (_b) {
|
catch (_b) {
|
||||||
// If require.resolve throws, return resolvedExtendsFile
|
// Unable to resolve, return resolvedExtendsFile
|
||||||
}
|
}
|
||||||
return resolvedExtendsFile;
|
return resolvedExtendsFile;
|
||||||
}
|
}
|
||||||
|
|
@ -1631,15 +1698,25 @@ function resolveConfigExtends(configFile, referenceId) {
|
||||||
* @param {string} file Configuration file name.
|
* @param {string} file Configuration file name.
|
||||||
* @param {ConfigurationParser[] | ReadConfigCallback} parsers Parsing
|
* @param {ConfigurationParser[] | ReadConfigCallback} parsers Parsing
|
||||||
* function(s).
|
* function(s).
|
||||||
|
* @param {Object} [fs] File system implementation.
|
||||||
* @param {ReadConfigCallback} [callback] Callback (err, result) function.
|
* @param {ReadConfigCallback} [callback] Callback (err, result) function.
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
function readConfig(file, parsers, callback) {
|
function readConfig(file, parsers, fs, callback) {
|
||||||
if (!callback) {
|
if (!callback) {
|
||||||
|
if (fs) {
|
||||||
|
callback = fs;
|
||||||
|
fs = null;
|
||||||
|
}
|
||||||
|
else {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
callback = parsers;
|
callback = parsers;
|
||||||
parsers = null;
|
parsers = null;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (!fs) {
|
||||||
|
fs = __webpack_require__(/*! fs */ "?ec0a");
|
||||||
|
}
|
||||||
// Read file
|
// Read file
|
||||||
fs.readFile(file, "utf8", function (err, content) {
|
fs.readFile(file, "utf8", function (err, content) {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
|
@ -1655,13 +1732,12 @@ function readConfig(file, parsers, callback) {
|
||||||
var configExtends = config["extends"];
|
var configExtends = config["extends"];
|
||||||
if (configExtends) {
|
if (configExtends) {
|
||||||
delete config["extends"];
|
delete config["extends"];
|
||||||
var resolvedExtends = resolveConfigExtends(file, configExtends);
|
return resolveConfigExtends(file, configExtends, fs, function (_, resolvedExtends) { return readConfig(resolvedExtends, parsers, fs, function (errr, extendsConfig) {
|
||||||
return readConfig(resolvedExtends, parsers, function (errr, extendsConfig) {
|
|
||||||
if (errr) {
|
if (errr) {
|
||||||
return callback(errr);
|
return callback(errr);
|
||||||
}
|
}
|
||||||
return callback(null, __assign(__assign({}, extendsConfig), config));
|
return callback(null, __assign(__assign({}, extendsConfig), config));
|
||||||
});
|
}); });
|
||||||
}
|
}
|
||||||
return callback(null, config);
|
return callback(null, config);
|
||||||
});
|
});
|
||||||
|
|
@ -1672,22 +1748,27 @@ var readConfigPromisify = promisify && promisify(readConfig);
|
||||||
*
|
*
|
||||||
* @param {string} file Configuration file name.
|
* @param {string} file Configuration file name.
|
||||||
* @param {ConfigurationParser[]} [parsers] Parsing function(s).
|
* @param {ConfigurationParser[]} [parsers] Parsing function(s).
|
||||||
|
* @param {Object} [fs] File system implementation.
|
||||||
* @returns {Promise<Configuration>} Configuration object.
|
* @returns {Promise<Configuration>} Configuration object.
|
||||||
*/
|
*/
|
||||||
function readConfigPromise(file, parsers) {
|
function readConfigPromise(file, parsers, fs) {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
return readConfigPromisify(file, parsers);
|
return readConfigPromisify(file, parsers, fs);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Read specified configuration file synchronously.
|
* Read specified configuration file synchronously.
|
||||||
*
|
*
|
||||||
* @param {string} file Configuration file name.
|
* @param {string} file Configuration file name.
|
||||||
* @param {ConfigurationParser[]} [parsers] Parsing function(s).
|
* @param {ConfigurationParser[]} [parsers] Parsing function(s).
|
||||||
|
* @param {Object} [fs] File system implementation.
|
||||||
* @returns {Configuration} Configuration object.
|
* @returns {Configuration} Configuration object.
|
||||||
|
* @throws An Error if processing fails.
|
||||||
*/
|
*/
|
||||||
function readConfigSync(file, parsers) {
|
function readConfigSync(file, parsers, fs) {
|
||||||
|
if (!fs) {
|
||||||
|
fs = __webpack_require__(/*! fs */ "?ec0a");
|
||||||
|
}
|
||||||
// Read file
|
// Read file
|
||||||
// @ts-ignore
|
|
||||||
var content = fs.readFileSync(file, "utf8");
|
var content = fs.readFileSync(file, "utf8");
|
||||||
// Try to parse file
|
// Try to parse file
|
||||||
var _a = parseConfiguration(file, content, parsers), config = _a.config, message = _a.message;
|
var _a = parseConfiguration(file, content, parsers), config = _a.config, message = _a.message;
|
||||||
|
|
@ -1698,8 +1779,8 @@ function readConfigSync(file, parsers) {
|
||||||
var configExtends = config["extends"];
|
var configExtends = config["extends"];
|
||||||
if (configExtends) {
|
if (configExtends) {
|
||||||
delete config["extends"];
|
delete config["extends"];
|
||||||
var resolvedExtends = resolveConfigExtends(file, configExtends);
|
var resolvedExtends = resolveConfigExtendsSync(file, configExtends, fs);
|
||||||
return __assign(__assign({}, readConfigSync(resolvedExtends, parsers)), config);
|
return __assign(__assign({}, readConfigSync(resolvedExtends, parsers, fs)), config);
|
||||||
}
|
}
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
|
@ -2141,6 +2222,10 @@ module.exports = {
|
||||||
"function": function MD010(params, onError) {
|
"function": function MD010(params, onError) {
|
||||||
var codeBlocks = params.config.code_blocks;
|
var codeBlocks = params.config.code_blocks;
|
||||||
var includeCodeBlocks = (codeBlocks === undefined) ? true : !!codeBlocks;
|
var includeCodeBlocks = (codeBlocks === undefined) ? true : !!codeBlocks;
|
||||||
|
var spacesPerTab = params.config.spaces_per_tab;
|
||||||
|
var spaceMultiplier = (spacesPerTab === undefined) ?
|
||||||
|
1 :
|
||||||
|
Math.max(0, Number(spacesPerTab));
|
||||||
forEachLine(lineMetadata(), function (line, lineIndex, inCode) {
|
forEachLine(lineMetadata(), function (line, lineIndex, inCode) {
|
||||||
if (!inCode || includeCodeBlocks) {
|
if (!inCode || includeCodeBlocks) {
|
||||||
var match = null;
|
var match = null;
|
||||||
|
|
@ -2150,7 +2235,7 @@ module.exports = {
|
||||||
addError(onError, lineIndex + 1, "Column: " + column, null, [column, length_1], {
|
addError(onError, lineIndex + 1, "Column: " + column, null, [column, length_1], {
|
||||||
"editColumn": column,
|
"editColumn": column,
|
||||||
"deleteCount": length_1,
|
"deleteCount": length_1,
|
||||||
"insertText": "".padEnd(length_1)
|
"insertText": "".padEnd(length_1 * spaceMultiplier)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -2170,30 +2255,32 @@ module.exports = {
|
||||||
"use strict";
|
"use strict";
|
||||||
// @ts-check
|
// @ts-check
|
||||||
|
|
||||||
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addError = _a.addError, forEachInlineChild = _a.forEachInlineChild, unescapeMarkdown = _a.unescapeMarkdown;
|
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addError = _a.addError, forEachLine = _a.forEachLine, overlapsAnyRange = _a.overlapsAnyRange;
|
||||||
var reversedLinkRe = /\(([^)]+)\)\[([^\]^][^\]]*)]/g;
|
var _b = __webpack_require__(/*! ./cache */ "../lib/cache.js"), inlineCodeSpanRanges = _b.inlineCodeSpanRanges, lineMetadata = _b.lineMetadata;
|
||||||
|
var reversedLinkRe = /(^|[^\\])\(([^)]+)\)\[([^\]^][^\]]*)](?!\()/g;
|
||||||
module.exports = {
|
module.exports = {
|
||||||
"names": ["MD011", "no-reversed-links"],
|
"names": ["MD011", "no-reversed-links"],
|
||||||
"description": "Reversed link syntax",
|
"description": "Reversed link syntax",
|
||||||
"tags": ["links"],
|
"tags": ["links"],
|
||||||
"function": function MD011(params, onError) {
|
"function": function MD011(params, onError) {
|
||||||
forEachInlineChild(params, "text", function (token) {
|
var exclusions = inlineCodeSpanRanges();
|
||||||
var lineNumber = token.lineNumber, content = token.content;
|
forEachLine(lineMetadata(), function (line, lineIndex, inCode, onFence) {
|
||||||
|
if (!inCode && !onFence) {
|
||||||
var match = null;
|
var match = null;
|
||||||
while ((match = reversedLinkRe.exec(content)) !== null) {
|
while ((match = reversedLinkRe.exec(line)) !== null) {
|
||||||
var reversedLink = match[0], linkText = match[1], linkDestination = match[2];
|
var reversedLink = match[0], preChar = match[1], linkText = match[2], linkDestination = match[3];
|
||||||
var line = params.lines[lineNumber - 1];
|
var index = match.index + preChar.length;
|
||||||
var column = unescapeMarkdown(line).indexOf(reversedLink) + 1;
|
var length_1 = match[0].length - preChar.length;
|
||||||
var length_1 = reversedLink.length;
|
if (!linkText.endsWith("\\") &&
|
||||||
var range = column ? [column, length_1] : null;
|
!linkDestination.endsWith("\\") &&
|
||||||
var fixInfo = column ?
|
!overlapsAnyRange(exclusions, lineIndex, index, length_1)) {
|
||||||
{
|
addError(onError, lineIndex + 1, reversedLink.slice(preChar.length), null, [index + 1, length_1], {
|
||||||
"editColumn": column,
|
"editColumn": index + 1,
|
||||||
"deleteCount": length_1,
|
"deleteCount": length_1,
|
||||||
"insertText": "[" + linkText + "](" + linkDestination + ")"
|
"insertText": "[" + linkText + "](" + linkDestination + ")"
|
||||||
} :
|
});
|
||||||
null;
|
}
|
||||||
addError(onError, lineNumber, reversedLink, null, range, fixInfo);
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -3328,11 +3415,19 @@ module.exports = {
|
||||||
resetRunTracking();
|
resetRunTracking();
|
||||||
forEachLine(lineMetadata(), function (line, lineIndex, inCode, onFence, inTable, inItem, onBreak, inMath) {
|
forEachLine(lineMetadata(), function (line, lineIndex, inCode, onFence, inTable, inItem, onBreak, inMath) {
|
||||||
var onItemStart = (inItem === 1);
|
var onItemStart = (inItem === 1);
|
||||||
if (inCode || inTable || onBreak || onItemStart || isBlankLine(line)) {
|
if (inCode ||
|
||||||
|
onFence ||
|
||||||
|
inTable ||
|
||||||
|
onBreak ||
|
||||||
|
onItemStart ||
|
||||||
|
isBlankLine(line)) {
|
||||||
// Emphasis resets when leaving a block
|
// Emphasis resets when leaving a block
|
||||||
resetRunTracking();
|
resetRunTracking();
|
||||||
}
|
}
|
||||||
if (inCode || onBreak || inMath) {
|
if (inCode ||
|
||||||
|
onFence ||
|
||||||
|
onBreak ||
|
||||||
|
inMath) {
|
||||||
// Emphasis has no meaning here
|
// Emphasis has no meaning here
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -3697,8 +3792,11 @@ module.exports = {
|
||||||
var actual = levels_1[heading.tag] + " " + content;
|
var actual = levels_1[heading.tag] + " " + content;
|
||||||
var expected = getExpected_1();
|
var expected = getExpected_1();
|
||||||
if (expected === "*") {
|
if (expected === "*") {
|
||||||
|
var nextExpected = getExpected_1();
|
||||||
|
if (nextExpected.toLowerCase() !== actual.toLowerCase()) {
|
||||||
matchAny_1 = true;
|
matchAny_1 = true;
|
||||||
getExpected_1();
|
i_1--;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (expected === "+") {
|
else if (expected === "+") {
|
||||||
matchAny_1 = true;
|
matchAny_1 = true;
|
||||||
|
|
@ -3715,8 +3813,10 @@ module.exports = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
var extraHeadings = requiredHeadings.length - i_1;
|
||||||
if (!hasError_1 &&
|
if (!hasError_1 &&
|
||||||
(i_1 < requiredHeadings.length) &&
|
((extraHeadings > 1) ||
|
||||||
|
((extraHeadings === 1) && (requiredHeadings[i_1] !== "*"))) &&
|
||||||
(anyHeadings_1 || !requiredHeadings.every(function (heading) { return heading === "*"; }))) {
|
(anyHeadings_1 || !requiredHeadings.every(function (heading) { return heading === "*"; }))) {
|
||||||
addErrorContext(onError, params.lines.length, requiredHeadings[i_1]);
|
addErrorContext(onError, params.lines.length, requiredHeadings[i_1]);
|
||||||
}
|
}
|
||||||
|
|
@ -3736,9 +3836,8 @@ module.exports = {
|
||||||
"use strict";
|
"use strict";
|
||||||
// @ts-check
|
// @ts-check
|
||||||
|
|
||||||
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorDetailIf = _a.addErrorDetailIf, bareUrlRe = _a.bareUrlRe, escapeForRegExp = _a.escapeForRegExp, filterTokens = _a.filterTokens, forEachInlineChild = _a.forEachInlineChild, newLineRe = _a.newLineRe;
|
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorDetailIf = _a.addErrorDetailIf, bareUrlRe = _a.bareUrlRe, escapeForRegExp = _a.escapeForRegExp, forEachLine = _a.forEachLine, overlapsAnyRange = _a.overlapsAnyRange, linkRe = _a.linkRe, linkReferenceRe = _a.linkReferenceRe;
|
||||||
var startNonWordRe = /^\W/;
|
var _b = __webpack_require__(/*! ./cache */ "../lib/cache.js"), inlineCodeSpanRanges = _b.inlineCodeSpanRanges, lineMetadata = _b.lineMetadata;
|
||||||
var endNonWordRe = /\W$/;
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
"names": ["MD044", "proper-names"],
|
"names": ["MD044", "proper-names"],
|
||||||
"description": "Proper names should have the correct capitalization",
|
"description": "Proper names should have the correct capitalization",
|
||||||
|
|
@ -3746,74 +3845,60 @@ module.exports = {
|
||||||
"function": function MD044(params, onError) {
|
"function": function MD044(params, onError) {
|
||||||
var names = params.config.names;
|
var names = params.config.names;
|
||||||
names = Array.isArray(names) ? names : [];
|
names = Array.isArray(names) ? names : [];
|
||||||
|
names.sort(function (a, b) { return (b.length - a.length) || a.localeCompare(b); });
|
||||||
var codeBlocks = params.config.code_blocks;
|
var codeBlocks = params.config.code_blocks;
|
||||||
var includeCodeBlocks = (codeBlocks === undefined) ? true : !!codeBlocks;
|
var includeCodeBlocks = (codeBlocks === undefined) ? true : !!codeBlocks;
|
||||||
// Text of automatic hyperlinks is implicitly a URL
|
var exclusions = [];
|
||||||
var autolinkText = new Set();
|
forEachLine(lineMetadata(), function (line, lineIndex) {
|
||||||
filterTokens(params, "inline", function (token) {
|
if (linkReferenceRe.test(line)) {
|
||||||
var inAutoLink = false;
|
exclusions.push([lineIndex, 0, line.length]);
|
||||||
token.children.forEach(function (child) {
|
|
||||||
var info = child.info, type = child.type;
|
|
||||||
if ((type === "link_open") && (info === "auto")) {
|
|
||||||
inAutoLink = true;
|
|
||||||
}
|
}
|
||||||
else if (type === "link_close") {
|
else {
|
||||||
inAutoLink = false;
|
|
||||||
}
|
|
||||||
else if ((type === "text") && inAutoLink) {
|
|
||||||
autolinkText.add(child);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
// For each proper name...
|
|
||||||
names.forEach(function (name) {
|
|
||||||
var escapedName = escapeForRegExp(name);
|
|
||||||
var startNamePattern = startNonWordRe.test(name) ? "" : "\\S*\\b";
|
|
||||||
var endNamePattern = endNonWordRe.test(name) ? "" : "\\b\\S*";
|
|
||||||
var namePattern = "(" + startNamePattern + ")(" + escapedName + ")(" + endNamePattern + ")";
|
|
||||||
var anyNameRe = new RegExp(namePattern, "gi");
|
|
||||||
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
||||||
function forToken(token) {
|
|
||||||
if (!autolinkText.has(token)) {
|
|
||||||
var fenceOffset_1 = (token.type === "fence") ? 1 : 0;
|
|
||||||
token.content.split(newLineRe).forEach(function (line, index) {
|
|
||||||
var match = null;
|
var match = null;
|
||||||
while ((match = anyNameRe.exec(line)) !== null) {
|
while ((match = bareUrlRe.exec(line)) !== null) {
|
||||||
var fullMatch = match[0], leftMatch = match[1], nameMatch = match[2], rightMatch = match[3];
|
exclusions.push([lineIndex, match.index, match[0].length]);
|
||||||
if (fullMatch.search(bareUrlRe) === -1) {
|
}
|
||||||
var wordMatch = fullMatch
|
while ((match = linkRe.exec(line)) !== null) {
|
||||||
.replace(new RegExp("^\\W{0," + leftMatch.length + "}"), "")
|
var text = match[1], destination = match[2];
|
||||||
.replace(new RegExp("\\W{0," + rightMatch.length + "}$"), "");
|
if (destination) {
|
||||||
if (!names.includes(wordMatch)) {
|
exclusions.push([lineIndex, match.index + text.length, destination.length]);
|
||||||
var lineNumber = token.lineNumber + index + fenceOffset_1;
|
}
|
||||||
var fullLine = params.lines[lineNumber - 1];
|
}
|
||||||
var matchLength = wordMatch.length;
|
}
|
||||||
var matchIndex = fullLine.indexOf(wordMatch);
|
});
|
||||||
var range = (matchIndex === -1) ?
|
if (!includeCodeBlocks) {
|
||||||
null :
|
exclusions.push.apply(exclusions, inlineCodeSpanRanges());
|
||||||
[matchIndex + 1, matchLength];
|
}
|
||||||
var fixInfo = (matchIndex === -1) ?
|
var _loop_1 = function (name_1) {
|
||||||
null :
|
var escapedName = escapeForRegExp(name_1);
|
||||||
{
|
var startNamePattern = /^\W/.test(name_1) ? "" : "\\b_*";
|
||||||
"editColumn": matchIndex + 1,
|
var endNamePattern = /\W$/.test(name_1) ? "" : "_*\\b";
|
||||||
"deleteCount": matchLength,
|
var namePattern = "(" + startNamePattern + ")(" + escapedName + ")" + endNamePattern;
|
||||||
"insertText": name
|
var nameRe = new RegExp(namePattern, "gi");
|
||||||
|
forEachLine(lineMetadata(), function (line, lineIndex, inCode, onFence) {
|
||||||
|
if (includeCodeBlocks || (!inCode && !onFence)) {
|
||||||
|
var match = null;
|
||||||
|
while ((match = nameRe.exec(line)) !== null) {
|
||||||
|
var leftMatch = match[1], nameMatch = match[2];
|
||||||
|
var index = match.index + leftMatch.length;
|
||||||
|
var length_1 = nameMatch.length;
|
||||||
|
if (!overlapsAnyRange(exclusions, lineIndex, index, length_1)) {
|
||||||
|
addErrorDetailIf(onError, lineIndex + 1, name_1, nameMatch, null, null, [index + 1, length_1], {
|
||||||
|
"editColumn": index + 1,
|
||||||
|
"deleteCount": length_1,
|
||||||
|
"insertText": name_1
|
||||||
|
});
|
||||||
|
}
|
||||||
|
exclusions.push([lineIndex, index, length_1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
};
|
};
|
||||||
addErrorDetailIf(onError, lineNumber, name, nameMatch, null, null, range, fixInfo);
|
for (var _i = 0, names_1 = names; _i < names_1.length; _i++) {
|
||||||
|
var name_1 = names_1[_i];
|
||||||
|
_loop_1(name_1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
forEachInlineChild(params, "text", forToken);
|
|
||||||
if (includeCodeBlocks) {
|
|
||||||
forEachInlineChild(params, "code_inline", forToken);
|
|
||||||
filterTokens(params, "code_block", forToken);
|
|
||||||
filterTokens(params, "fence", forToken);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -4008,17 +4093,6 @@ rules.forEach(function (rule) {
|
||||||
module.exports = rules;
|
module.exports = rules;
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ "../package.json":
|
|
||||||
/*!***********************!*\
|
|
||||||
!*** ../package.json ***!
|
|
||||||
\***********************/
|
|
||||||
/***/ ((module) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
module.exports = JSON.parse("{\"name\":\"markdownlint\",\"version\":\"0.23.1\",\"description\":\"A Node.js style checker and lint tool for Markdown/CommonMark files.\",\"main\":\"lib/markdownlint.js\",\"types\":\"lib/markdownlint.d.ts\",\"author\":\"David Anson (https://dlaa.me/)\",\"license\":\"MIT\",\"homepage\":\"https://github.com/DavidAnson/markdownlint\",\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/DavidAnson/markdownlint.git\"},\"bugs\":\"https://github.com/DavidAnson/markdownlint/issues\",\"scripts\":{\"build-config\":\"npm run build-config-schema && npm run build-config-example\",\"build-config-example\":\"node schema/build-config-example.js\",\"build-config-schema\":\"node schema/build-config-schema.js\",\"build-declaration\":\"tsc --allowJs --declaration --emitDeclarationOnly --resolveJsonModule lib/markdownlint.js && rimraf 'lib/{c,md,r}*.d.ts' 'helpers/*.d.ts'\",\"build-demo\":\"cpy node_modules/markdown-it/dist/markdown-it.min.js demo && cd demo && rimraf markdownlint-browser.* && webpack --no-stats\",\"build-example\":\"npm install --no-save --ignore-scripts grunt grunt-cli gulp through2\",\"ci\":\"npm-run-all --continue-on-error --parallel test-cover lint declaration build-config build-demo && git diff --exit-code\",\"clean-test-repos\":\"rimraf test-repos\",\"clone-test-repos\":\"mkdir test-repos && cd test-repos && git clone https://github.com/eslint/eslint eslint-eslint --depth 1 --no-tags --quiet && git clone https://github.com/mkdocs/mkdocs mkdocs-mkdocs --depth 1 --no-tags --quiet && git clone https://github.com/pi-hole/docs pi-hole-docs --depth 1 --no-tags --quiet\",\"clone-test-repos-large\":\"npm run clone-test-repos && cd test-repos && git clone https://github.com/dotnet/docs dotnet-docs --depth 1 --no-tags --quiet\",\"declaration\":\"npm run build-declaration && npm run test-declaration\",\"example\":\"cd example && node standalone.js && grunt markdownlint --force && gulp markdownlint\",\"lint\":\"eslint --max-warnings 0 .\",\"lint-test-repos\":\"ava --timeout=5m test/markdownlint-test-repos.js\",\"test\":\"ava test/markdownlint-test.js test/markdownlint-test-custom-rules.js test/markdownlint-test-helpers.js test/markdownlint-test-result-object.js test/markdownlint-test-scenarios.js\",\"test-cover\":\"c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 npm test\",\"test-declaration\":\"cd example/typescript && tsc && node type-check.js\",\"test-extra\":\"ava --timeout=5m test/markdownlint-test-extra.js\"},\"engines\":{\"node\":\">=10\"},\"dependencies\":{\"markdown-it\":\"12.0.4\"},\"devDependencies\":{\"ava\":\"~3.15.0\",\"c8\":\"~7.5.0\",\"cpy-cli\":\"~3.1.1\",\"eslint\":\"~7.19.0\",\"eslint-plugin-jsdoc\":\"~31.6.0\",\"eslint-plugin-node\":\"~11.1.0\",\"eslint-plugin-unicorn\":\"~27.0.0\",\"globby\":\"~11.0.2\",\"js-yaml\":\"~4.0.0\",\"markdown-it-for-inline\":\"~0.1.1\",\"markdown-it-sub\":\"~1.0.0\",\"markdown-it-sup\":\"~1.0.0\",\"markdown-it-texmath\":\"~0.8.0\",\"markdownlint-rule-helpers\":\"~0.13.0\",\"npm-run-all\":\"~4.1.5\",\"rimraf\":\"~3.0.2\",\"strip-json-comments\":\"~3.1.1\",\"toml\":\"~3.0.0\",\"ts-loader\":\"~8.0.15\",\"tv4\":\"~1.3.0\",\"typescript\":\"~4.1.3\",\"webpack\":\"~5.21.1\",\"webpack-cli\":\"~4.5.0\"},\"keywords\":[\"markdown\",\"lint\",\"md\",\"CommonMark\",\"markdownlint\"]}");
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "markdown-it":
|
/***/ "markdown-it":
|
||||||
|
|
@ -4032,17 +4106,7 @@ module.exports = markdownit;
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "?65c5":
|
/***/ "?591e":
|
||||||
/*!********************!*\
|
|
||||||
!*** fs (ignored) ***!
|
|
||||||
\********************/
|
|
||||||
/***/ (() => {
|
|
||||||
|
|
||||||
/* (ignored) */
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ "?5533":
|
|
||||||
/*!********************!*\
|
/*!********************!*\
|
||||||
!*** os (ignored) ***!
|
!*** os (ignored) ***!
|
||||||
\********************/
|
\********************/
|
||||||
|
|
@ -4052,7 +4116,17 @@ module.exports = markdownit;
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "?0f27":
|
/***/ "?ec0a":
|
||||||
|
/*!********************!*\
|
||||||
|
!*** fs (ignored) ***!
|
||||||
|
\********************/
|
||||||
|
/***/ (() => {
|
||||||
|
|
||||||
|
/* (ignored) */
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "?b85c":
|
||||||
/*!**********************!*\
|
/*!**********************!*\
|
||||||
!*** path (ignored) ***!
|
!*** path (ignored) ***!
|
||||||
\**********************/
|
\**********************/
|
||||||
|
|
@ -4062,7 +4136,7 @@ module.exports = markdownit;
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "?0bed":
|
/***/ "?96a2":
|
||||||
/*!**********************!*\
|
/*!**********************!*\
|
||||||
!*** util (ignored) ***!
|
!*** util (ignored) ***!
|
||||||
\**********************/
|
\**********************/
|
||||||
|
|
@ -4070,6 +4144,17 @@ module.exports = markdownit;
|
||||||
|
|
||||||
/* (ignored) */
|
/* (ignored) */
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "../package.json":
|
||||||
|
/*!***********************!*\
|
||||||
|
!*** ../package.json ***!
|
||||||
|
\***********************/
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
module.exports = JSON.parse('{"name":"markdownlint","version":"0.24.0","description":"A Node.js style checker and lint tool for Markdown/CommonMark files.","main":"lib/markdownlint.js","types":"lib/markdownlint.d.ts","author":"David Anson (https://dlaa.me/)","license":"MIT","homepage":"https://github.com/DavidAnson/markdownlint","repository":{"type":"git","url":"https://github.com/DavidAnson/markdownlint.git"},"bugs":"https://github.com/DavidAnson/markdownlint/issues","scripts":{"build-config":"npm run build-config-schema && npm run build-config-example","build-config-example":"node schema/build-config-example.js","build-config-schema":"node schema/build-config-schema.js","build-declaration":"tsc --allowJs --declaration --emitDeclarationOnly --resolveJsonModule lib/markdownlint.js && rimraf \'lib/{c,md,r}*.d.ts\' \'helpers/*.d.ts\'","build-demo":"cpy node_modules/markdown-it/dist/markdown-it.min.js demo && cd demo && rimraf markdownlint-browser.* && webpack --no-stats","build-example":"npm install --no-save --ignore-scripts grunt grunt-cli gulp through2","ci":"npm-run-all --continue-on-error --parallel test-cover lint declaration build-config build-demo && git diff --exit-code","clean-test-repos":"rimraf test-repos","clone-test-repos-dotnet-docs":"cd test-repos && git clone https://github.com/dotnet/docs dotnet-docs --depth 1 --no-tags --quiet","clone-test-repos-eslint-eslint":"cd test-repos && git clone https://github.com/eslint/eslint eslint-eslint --depth 1 --no-tags --quiet","clone-test-repos-mkdocs-mkdocs":"cd test-repos && git clone https://github.com/mkdocs/mkdocs mkdocs-mkdocs --depth 1 --no-tags --quiet","clone-test-repos-mochajs-mocha":"cd test-repos && git clone https://github.com/mochajs/mocha mochajs-mocha --depth 1 --no-tags --quiet","clone-test-repos-pi-hole-docs":"cd test-repos && git clone https://github.com/pi-hole/docs pi-hole-docs --depth 1 --no-tags --quiet","clone-test-repos-v8-v8-dev":"cd test-repos && git clone https://github.com/v8/v8.dev v8-v8-dev --depth 1 --no-tags --quiet","clone-test-repos-webhintio-hint":"cd test-repos && git clone https://github.com/webhintio/hint webhintio-hint --depth 1 --no-tags --quiet","clone-test-repos-webpack-webpack-js-org":"cd test-repos && git clone https://github.com/webpack/webpack.js.org webpack-webpack-js-org --depth 1 --no-tags --quiet","clone-test-repos":"mkdir test-repos && cd test-repos && npm run clone-test-repos-eslint-eslint && npm run clone-test-repos-mkdocs-mkdocs && npm run clone-test-repos-mochajs-mocha && npm run clone-test-repos-pi-hole-docs && npm run clone-test-repos-webhintio-hint && npm run clone-test-repos-webpack-webpack-js-org","clone-test-repos-large":"npm run clone-test-repos && cd test-repos && npm run clone-test-repos-dotnet-docs && npm run clone-test-repos-v8-v8-dev","declaration":"npm run build-declaration && npm run test-declaration","example":"cd example && node standalone.js && grunt markdownlint --force && gulp markdownlint","lint":"eslint --max-warnings 0 .","lint-test-repos":"ava --timeout=5m test/markdownlint-test-repos.js","test":"ava test/markdownlint-test.js test/markdownlint-test-custom-rules.js test/markdownlint-test-helpers.js test/markdownlint-test-result-object.js test/markdownlint-test-scenarios.js","test-cover":"c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 npm test","test-declaration":"cd example/typescript && tsc && node type-check.js","test-extra":"ava --timeout=5m test/markdownlint-test-extra.js"},"engines":{"node":">=10"},"dependencies":{"markdown-it":"12.2.0"},"devDependencies":{"ava":"~3.15.0","c8":"~7.8.0","cpy-cli":"~3.1.1","eslint":"~7.32.0","eslint-plugin-jsdoc":"~36.0.7","eslint-plugin-node":"~11.1.0","eslint-plugin-unicorn":"~35.0.0","globby":"~11.0.4","js-yaml":"~4.1.0","markdown-it-for-inline":"~0.1.1","markdown-it-sub":"~1.0.0","markdown-it-sup":"~1.0.0","markdown-it-texmath":"~0.9.1","markdownlint-rule-helpers":"~0.14.0","npm-run-all":"~4.1.5","rimraf":"~3.0.2","strip-json-comments":"~3.1.1","toml":"~3.0.0","ts-loader":"~9.2.5","tv4":"~1.3.0","typescript":"~4.3.5","webpack":"~5.51.1","webpack-cli":"~4.8.0"},"keywords":["markdown","lint","md","CommonMark","markdownlint"]}');
|
||||||
|
|
||||||
/***/ })
|
/***/ })
|
||||||
|
|
||||||
/******/ });
|
/******/ });
|
||||||
|
|
@ -4080,8 +4165,9 @@ module.exports = markdownit;
|
||||||
/******/ // The require function
|
/******/ // The require function
|
||||||
/******/ function __webpack_require__(moduleId) {
|
/******/ function __webpack_require__(moduleId) {
|
||||||
/******/ // Check if module is in cache
|
/******/ // Check if module is in cache
|
||||||
/******/ if(__webpack_module_cache__[moduleId]) {
|
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
||||||
/******/ return __webpack_module_cache__[moduleId].exports;
|
/******/ if (cachedModule !== undefined) {
|
||||||
|
/******/ return cachedModule.exports;
|
||||||
/******/ }
|
/******/ }
|
||||||
/******/ // Create a new module (and put it into the cache)
|
/******/ // Create a new module (and put it into the cache)
|
||||||
/******/ var module = __webpack_module_cache__[moduleId] = {
|
/******/ var module = __webpack_module_cache__[moduleId] = {
|
||||||
|
|
@ -4104,9 +4190,12 @@ module.exports = markdownit;
|
||||||
/******/ })();
|
/******/ })();
|
||||||
/******/
|
/******/
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
/******/ // module exports must be returned from runtime so entry inlining is disabled
|
/******/
|
||||||
/******/ // startup
|
/******/ // startup
|
||||||
/******/ // Load entry module and return exports
|
/******/ // Load entry module and return exports
|
||||||
/******/ return __webpack_require__("../lib/markdownlint.js");
|
/******/ // This entry module is referenced by other modules so it can't be inlined
|
||||||
|
/******/ var __webpack_exports__ = __webpack_require__("../lib/markdownlint.js");
|
||||||
|
/******/ markdownlint = __webpack_exports__;
|
||||||
|
/******/
|
||||||
/******/ })()
|
/******/ })()
|
||||||
;
|
;
|
||||||
23
doc/Prettier.md
Normal file
23
doc/Prettier.md
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
# Using markdownlint with Prettier
|
||||||
|
|
||||||
|
[`Prettier`](https://prettier.io) is a popular code formatter. For the most part,
|
||||||
|
it works seamlessly with `markdownlint`. Special situations are documented
|
||||||
|
below.
|
||||||
|
|
||||||
|
## List item indentation
|
||||||
|
|
||||||
|
The default settings of `markdownlint` and `Prettier` are compatible and don't
|
||||||
|
result in any linting violations. If `Prettier` is used with `--tab-width` set
|
||||||
|
to `4`, the following `markdownlint` configuration can be used:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"MD007": {
|
||||||
|
"indent": 4
|
||||||
|
},
|
||||||
|
"MD030": {
|
||||||
|
"ul_single": 3,
|
||||||
|
"ul_multi": 3
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
17
doc/Rules.md
17
doc/Rules.md
|
|
@ -329,6 +329,8 @@ issue for multi-markdown parsers, which require 4-space indents. More informatio
|
||||||
<https://cirosantilli.com/markdown-style-guide#indentation-of-content-inside-lists>
|
<https://cirosantilli.com/markdown-style-guide#indentation-of-content-inside-lists>
|
||||||
and <http://support.markedapp.com/discussions/problems/21-sub-lists-not-indenting>.
|
and <http://support.markedapp.com/discussions/problems/21-sub-lists-not-indenting>.
|
||||||
|
|
||||||
|
Note: See [Prettier.md](Prettier.md) for compatibility information.
|
||||||
|
|
||||||
<a name="md009"></a>
|
<a name="md009"></a>
|
||||||
|
|
||||||
## MD009 - Trailing spaces
|
## MD009 - Trailing spaces
|
||||||
|
|
@ -388,7 +390,7 @@ Tags: whitespace, hard_tab
|
||||||
|
|
||||||
Aliases: no-hard-tabs
|
Aliases: no-hard-tabs
|
||||||
|
|
||||||
Parameters: code_blocks (boolean; default true)
|
Parameters: code_blocks, spaces_per_tab (boolean; default true, number; default 1)
|
||||||
|
|
||||||
Fixable: Most violations can be fixed by tooling
|
Fixable: Most violations can be fixed by tooling
|
||||||
|
|
||||||
|
|
@ -420,6 +422,9 @@ You have the option to exclude this rule for code blocks. To do so, set the
|
||||||
`code_blocks` parameter to `false`. Code blocks are included by default since
|
`code_blocks` parameter to `false`. Code blocks are included by default since
|
||||||
handling of tabs by tools is often inconsistent (ex: using 4 vs. 8 spaces).
|
handling of tabs by tools is often inconsistent (ex: using 4 vs. 8 spaces).
|
||||||
|
|
||||||
|
If you would like the fixer to change tabs to x spaces, then configure the `spaces_per_tab`
|
||||||
|
parameter to the number x. The default value would be 1.
|
||||||
|
|
||||||
Rationale: Hard tabs are often rendered inconsistently by different editors and
|
Rationale: Hard tabs are often rendered inconsistently by different editors and
|
||||||
can be harder to work with than spaces.
|
can be harder to work with than spaces.
|
||||||
|
|
||||||
|
|
@ -1180,6 +1185,8 @@ for your selected document style.
|
||||||
|
|
||||||
Rationale: Violations of this rule can lead to improperly rendered content.
|
Rationale: Violations of this rule can lead to improperly rendered content.
|
||||||
|
|
||||||
|
Note: See [Prettier.md](Prettier.md) for compatibility information.
|
||||||
|
|
||||||
<a name="md031"></a>
|
<a name="md031"></a>
|
||||||
|
|
||||||
## MD031 - Fenced code blocks should be surrounded by blank lines
|
## MD031 - Fenced code blocks should be surrounded by blank lines
|
||||||
|
|
@ -1569,6 +1576,14 @@ echo Hello world
|
||||||
```
|
```
|
||||||
````
|
````
|
||||||
|
|
||||||
|
To display a code block without syntax highlighting, use:
|
||||||
|
|
||||||
|
````markdown
|
||||||
|
```text
|
||||||
|
Plain text in a code block
|
||||||
|
```
|
||||||
|
````
|
||||||
|
|
||||||
Rationale: Specifying a language improves content rendering by using the
|
Rationale: Specifying a language improves content rendering by using the
|
||||||
correct syntax highlighting for code. More information:
|
correct syntax highlighting for code. More information:
|
||||||
<https://cirosantilli.com/markdown-style-guide#option-code-fenced>.
|
<https://cirosantilli.com/markdown-style-guide#option-code-fenced>.
|
||||||
|
|
|
||||||
|
|
@ -34,13 +34,14 @@ function assertLintResults(results: markdownlint.LintResults) {
|
||||||
assert.equal(results["string"][0].errorDetail, null);
|
assert.equal(results["string"][0].errorDetail, null);
|
||||||
assert.equal(results["string"][0].errorContext, null);
|
assert.equal(results["string"][0].errorContext, null);
|
||||||
assert.deepEqual(results["string"][0].errorRange, [ 9, 1 ]);
|
assert.deepEqual(results["string"][0].errorRange, [ 9, 1 ]);
|
||||||
assert(!!results["string"][0].fixInfo);
|
const fixInfo = results["string"][0].fixInfo;
|
||||||
// @ts-ignore
|
assert(!!fixInfo);
|
||||||
assert.equal(results["string"][0].fixInfo.editColumn, 10);
|
if (fixInfo) {
|
||||||
// @ts-ignore
|
assert.equal(fixInfo.lineNumber, null);
|
||||||
assert(!results["string"][0].fixInfo.deleteCount);
|
assert.equal(fixInfo.editColumn, 10);
|
||||||
// @ts-ignore
|
assert(!fixInfo.deleteCount);
|
||||||
assert.equal(results["string"][0].fixInfo.insertText, "\n");
|
assert.equal(fixInfo.insertText, "\n");
|
||||||
|
}
|
||||||
assert.equal(results["../bad.md"].length, 2);
|
assert.equal(results["../bad.md"].length, 2);
|
||||||
// Deliberate assignment to unused variable validates types
|
// Deliberate assignment to unused variable validates types
|
||||||
// False-positive for js/useless-assignment-to-local
|
// False-positive for js/useless-assignment-to-local
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,11 @@ module.exports.orderedListItemMarkerRe = /^[\s>]*0*(\d+)[.)]/;
|
||||||
const emphasisMarkersRe = /[_*]/g;
|
const emphasisMarkersRe = /[_*]/g;
|
||||||
|
|
||||||
// Regular expression for inline links and shortcut reference links
|
// Regular expression for inline links and shortcut reference links
|
||||||
const linkRe = /\[(?:[^[\]]|\[[^\]]*\])*\](?:\(\S*\))?/g;
|
const linkRe = /(\[(?:[^[\]]|\[[^\]]*\])*\])(\(\S*\)|\[\S*\])?/g;
|
||||||
|
module.exports.linkRe = linkRe;
|
||||||
|
|
||||||
|
// Regular expression for link reference definition lines
|
||||||
|
module.exports.linkReferenceRe = /^ {0,3}\[[^\]]+]:\s.*$/;
|
||||||
|
|
||||||
// All punctuation characters (normal and full-width)
|
// All punctuation characters (normal and full-width)
|
||||||
const allPunctuation = ".,;:!?。,;:!?";
|
const allPunctuation = ".,;:!?。,;:!?";
|
||||||
|
|
@ -299,14 +303,14 @@ module.exports.forEachLine = function forEachLine(lineMetadata, handler) {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Returns (nested) lists as a flat array (in order)
|
// Returns (nested) lists as a flat array (in order)
|
||||||
module.exports.flattenLists = function flattenLists(params) {
|
module.exports.flattenLists = function flattenLists(tokens) {
|
||||||
const flattenedLists = [];
|
const flattenedLists = [];
|
||||||
const stack = [];
|
const stack = [];
|
||||||
let current = null;
|
let current = null;
|
||||||
let nesting = 0;
|
let nesting = 0;
|
||||||
const nestingStack = [];
|
const nestingStack = [];
|
||||||
let lastWithMap = { "map": [ 0, 1 ] };
|
let lastWithMap = { "map": [ 0, 1 ] };
|
||||||
params.tokens.forEach((token) => {
|
tokens.forEach((token) => {
|
||||||
if (isMathBlock(token) && token.map[1]) {
|
if (isMathBlock(token) && token.map[1]) {
|
||||||
// markdown-it-texmath plugin does not account for math_block_end
|
// markdown-it-texmath plugin does not account for math_block_end
|
||||||
token.map[1]++;
|
token.map[1]++;
|
||||||
|
|
@ -516,6 +520,47 @@ module.exports.addErrorContext = function addErrorContext(
|
||||||
addError(onError, lineNumber, null, context, range, fixInfo);
|
addError(onError, lineNumber, null, context, range, fixInfo);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns an array of code span ranges.
|
||||||
|
*
|
||||||
|
* @param {string[]} lines Lines to scan for code span ranges.
|
||||||
|
* @returns {number[][]} Array of ranges (line, index, length).
|
||||||
|
*/
|
||||||
|
module.exports.inlineCodeSpanRanges = (lines) => {
|
||||||
|
const exclusions = [];
|
||||||
|
forEachInlineCodeSpan(
|
||||||
|
lines.join("\n"),
|
||||||
|
(code, lineIndex, columnIndex) => {
|
||||||
|
const codeLines = code.split(newLineRe);
|
||||||
|
// eslint-disable-next-line unicorn/no-for-loop
|
||||||
|
for (let i = 0; i < codeLines.length; i++) {
|
||||||
|
exclusions.push(
|
||||||
|
[ lineIndex + i, columnIndex, codeLines[i].length ]
|
||||||
|
);
|
||||||
|
columnIndex = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
return exclusions;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determines whether the specified range overlaps another range.
|
||||||
|
*
|
||||||
|
* @param {number[][]} ranges Array of ranges (line, index, length).
|
||||||
|
* @param {number} lineIndex Line index to check.
|
||||||
|
* @param {number} index Index to check.
|
||||||
|
* @param {number} length Length to check.
|
||||||
|
* @returns {boolean} True iff the specified range overlaps.
|
||||||
|
*/
|
||||||
|
module.exports.overlapsAnyRange = (ranges, lineIndex, index, length) => (
|
||||||
|
!ranges.every((span) => (
|
||||||
|
(lineIndex !== span[0]) ||
|
||||||
|
(index + length < span[1]) ||
|
||||||
|
(index > span[1] + span[2])
|
||||||
|
))
|
||||||
|
);
|
||||||
|
|
||||||
// Returns a range object for a line by applying a RegExp
|
// Returns a range object for a line by applying a RegExp
|
||||||
module.exports.rangeFromRegExp = function rangeFromRegExp(line, regexp) {
|
module.exports.rangeFromRegExp = function rangeFromRegExp(line, regexp) {
|
||||||
let range = null;
|
let range = null;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "markdownlint-rule-helpers",
|
"name": "markdownlint-rule-helpers",
|
||||||
"version": "0.14.0",
|
"version": "0.15.0",
|
||||||
"description": "A collection of markdownlint helper functions for custom rules",
|
"description": "A collection of markdownlint helper functions for custom rules",
|
||||||
"main": "helpers.js",
|
"main": "helpers.js",
|
||||||
"author": "David Anson (https://dlaa.me/)",
|
"author": "David Anson (https://dlaa.me/)",
|
||||||
|
|
|
||||||
31
lib/cache.js
31
lib/cache.js
|
|
@ -2,14 +2,6 @@
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
let lineMetadata = null;
|
|
||||||
module.exports.lineMetadata = (value) => {
|
|
||||||
if (value) {
|
|
||||||
lineMetadata = value;
|
|
||||||
}
|
|
||||||
return lineMetadata;
|
|
||||||
};
|
|
||||||
|
|
||||||
let flattenedLists = null;
|
let flattenedLists = null;
|
||||||
module.exports.flattenedLists = (value) => {
|
module.exports.flattenedLists = (value) => {
|
||||||
if (value) {
|
if (value) {
|
||||||
|
|
@ -18,7 +10,24 @@ module.exports.flattenedLists = (value) => {
|
||||||
return flattenedLists;
|
return flattenedLists;
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports.clear = () => {
|
let inlineCodeSpanRanges = null;
|
||||||
lineMetadata = null;
|
module.exports.inlineCodeSpanRanges = (value) => {
|
||||||
flattenedLists = null;
|
if (value) {
|
||||||
|
inlineCodeSpanRanges = value;
|
||||||
|
}
|
||||||
|
return inlineCodeSpanRanges;
|
||||||
|
};
|
||||||
|
|
||||||
|
let lineMetadata = null;
|
||||||
|
module.exports.lineMetadata = (value) => {
|
||||||
|
if (value) {
|
||||||
|
lineMetadata = value;
|
||||||
|
}
|
||||||
|
return lineMetadata;
|
||||||
|
};
|
||||||
|
|
||||||
|
module.exports.clear = () => {
|
||||||
|
flattenedLists = null;
|
||||||
|
inlineCodeSpanRanges = null;
|
||||||
|
lineMetadata = null;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
32
lib/markdownlint.d.ts
vendored
32
lib/markdownlint.d.ts
vendored
|
|
@ -8,7 +8,7 @@ export = markdownlint;
|
||||||
*/
|
*/
|
||||||
declare function markdownlint(options: Options, callback: LintCallback): void;
|
declare function markdownlint(options: Options, callback: LintCallback): void;
|
||||||
declare namespace markdownlint {
|
declare namespace markdownlint {
|
||||||
export { markdownlintSync as sync, readConfig, readConfigSync, getVersion, promises, RuleFunction, RuleParams, MarkdownItToken, RuleOnError, RuleOnErrorInfo, RuleOnErrorFixInfo, Rule, Options, Plugin, ToStringCallback, LintResults, LintError, FixInfo, LintCallback, Configuration, RuleConfiguration, ConfigurationParser, ReadConfigCallback };
|
export { markdownlintSync as sync, readConfig, readConfigSync, getVersion, promises, RuleFunction, RuleParams, MarkdownItToken, RuleOnError, RuleOnErrorInfo, RuleOnErrorFixInfo, Rule, Options, Plugin, ToStringCallback, LintResults, LintError, FixInfo, LintCallback, Configuration, RuleConfiguration, ConfigurationParser, ReadConfigCallback, ResolveConfigExtendsCallback };
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Configuration options.
|
* Configuration options.
|
||||||
|
|
@ -52,9 +52,13 @@ type Options = {
|
||||||
* Additional plugins.
|
* Additional plugins.
|
||||||
*/
|
*/
|
||||||
markdownItPlugins?: Plugin[];
|
markdownItPlugins?: Plugin[];
|
||||||
|
/**
|
||||||
|
* File system implementation.
|
||||||
|
*/
|
||||||
|
fs?: any;
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* Called with the result of the lint operation.
|
* Called with the result of the lint function.
|
||||||
*/
|
*/
|
||||||
type LintCallback = (err: Error | null, results?: LintResults) => void;
|
type LintCallback = (err: Error | null, results?: LintResults) => void;
|
||||||
/**
|
/**
|
||||||
|
|
@ -70,18 +74,21 @@ declare function markdownlintSync(options: Options): LintResults;
|
||||||
* @param {string} file Configuration file name.
|
* @param {string} file Configuration file name.
|
||||||
* @param {ConfigurationParser[] | ReadConfigCallback} parsers Parsing
|
* @param {ConfigurationParser[] | ReadConfigCallback} parsers Parsing
|
||||||
* function(s).
|
* function(s).
|
||||||
|
* @param {Object} [fs] File system implementation.
|
||||||
* @param {ReadConfigCallback} [callback] Callback (err, result) function.
|
* @param {ReadConfigCallback} [callback] Callback (err, result) function.
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
declare function readConfig(file: string, parsers: ConfigurationParser[] | ReadConfigCallback, callback?: ReadConfigCallback): void;
|
declare function readConfig(file: string, parsers: ConfigurationParser[] | ReadConfigCallback, fs?: any, callback?: ReadConfigCallback): void;
|
||||||
/**
|
/**
|
||||||
* Read specified configuration file synchronously.
|
* Read specified configuration file synchronously.
|
||||||
*
|
*
|
||||||
* @param {string} file Configuration file name.
|
* @param {string} file Configuration file name.
|
||||||
* @param {ConfigurationParser[]} [parsers] Parsing function(s).
|
* @param {ConfigurationParser[]} [parsers] Parsing function(s).
|
||||||
|
* @param {Object} [fs] File system implementation.
|
||||||
* @returns {Configuration} Configuration object.
|
* @returns {Configuration} Configuration object.
|
||||||
|
* @throws An Error if processing fails.
|
||||||
*/
|
*/
|
||||||
declare function readConfigSync(file: string, parsers?: ConfigurationParser[]): Configuration;
|
declare function readConfigSync(file: string, parsers?: ConfigurationParser[], fs?: any): Configuration;
|
||||||
/**
|
/**
|
||||||
* Gets the (semantic) version of the library.
|
* Gets the (semantic) version of the library.
|
||||||
*
|
*
|
||||||
|
|
@ -316,6 +323,10 @@ type LintError = {
|
||||||
* Fix information.
|
* Fix information.
|
||||||
*/
|
*/
|
||||||
type FixInfo = {
|
type FixInfo = {
|
||||||
|
/**
|
||||||
|
* Line number (1-based).
|
||||||
|
*/
|
||||||
|
lineNumber?: number;
|
||||||
/**
|
/**
|
||||||
* Column of the fix (1-based).
|
* Column of the fix (1-based).
|
||||||
*/
|
*/
|
||||||
|
|
@ -334,20 +345,24 @@ type FixInfo = {
|
||||||
* {@link ../schema/markdownlint-config-schema.json}.
|
* {@link ../schema/markdownlint-config-schema.json}.
|
||||||
*/
|
*/
|
||||||
type Configuration = {
|
type Configuration = {
|
||||||
[x: string]: any;
|
[x: string]: RuleConfiguration;
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* Rule configuration.
|
* Rule configuration.
|
||||||
*/
|
*/
|
||||||
type RuleConfiguration = any;
|
type RuleConfiguration = boolean | any;
|
||||||
/**
|
/**
|
||||||
* Parses a configuration string and returns a configuration object.
|
* Parses a configuration string and returns a configuration object.
|
||||||
*/
|
*/
|
||||||
type ConfigurationParser = (text: string) => Configuration;
|
type ConfigurationParser = (text: string) => Configuration;
|
||||||
/**
|
/**
|
||||||
* Called with the result of the readConfig operation.
|
* Called with the result of the readConfig function.
|
||||||
*/
|
*/
|
||||||
type ReadConfigCallback = (err: Error | null, config?: Configuration) => void;
|
type ReadConfigCallback = (err: Error | null, config?: Configuration) => void;
|
||||||
|
/**
|
||||||
|
* Called with the result of the resolveConfigExtends function.
|
||||||
|
*/
|
||||||
|
type ResolveConfigExtendsCallback = (err: Error | null, path?: string) => void;
|
||||||
/**
|
/**
|
||||||
* Lint specified Markdown files.
|
* Lint specified Markdown files.
|
||||||
*
|
*
|
||||||
|
|
@ -360,6 +375,7 @@ declare function markdownlintPromise(options: Options): Promise<LintResults>;
|
||||||
*
|
*
|
||||||
* @param {string} file Configuration file name.
|
* @param {string} file Configuration file name.
|
||||||
* @param {ConfigurationParser[]} [parsers] Parsing function(s).
|
* @param {ConfigurationParser[]} [parsers] Parsing function(s).
|
||||||
|
* @param {Object} [fs] File system implementation.
|
||||||
* @returns {Promise<Configuration>} Configuration object.
|
* @returns {Promise<Configuration>} Configuration object.
|
||||||
*/
|
*/
|
||||||
declare function readConfigPromise(file: string, parsers?: ConfigurationParser[]): Promise<Configuration>;
|
declare function readConfigPromise(file: string, parsers?: ConfigurationParser[], fs?: any): Promise<Configuration>;
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const fs = require("fs");
|
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
const { promisify } = require("util");
|
const { promisify } = require("util");
|
||||||
const markdownIt = require("markdown-it");
|
const markdownIt = require("markdown-it");
|
||||||
|
|
@ -190,7 +189,7 @@ function annotateTokens(tokens, lines) {
|
||||||
(token.type === "thead_open") ||
|
(token.type === "thead_open") ||
|
||||||
(token.type === "tbody_open")
|
(token.type === "tbody_open")
|
||||||
) {
|
) {
|
||||||
tableMap = token.map.slice();
|
tableMap = [ ...token.map ];
|
||||||
} else if (
|
} else if (
|
||||||
(token.type === "tr_close") &&
|
(token.type === "tr_close") &&
|
||||||
tableMap
|
tableMap
|
||||||
|
|
@ -203,7 +202,7 @@ function annotateTokens(tokens, lines) {
|
||||||
tableMap = null;
|
tableMap = null;
|
||||||
}
|
}
|
||||||
if (tableMap && !token.map) {
|
if (tableMap && !token.map) {
|
||||||
token.map = tableMap.slice();
|
token.map = [ ...tableMap ];
|
||||||
}
|
}
|
||||||
// Update token metadata
|
// Update token metadata
|
||||||
if (token.map) {
|
if (token.map) {
|
||||||
|
|
@ -516,7 +515,8 @@ function lintContent(
|
||||||
frontMatterLines
|
frontMatterLines
|
||||||
};
|
};
|
||||||
cache.lineMetadata(helpers.getLineMetadata(params));
|
cache.lineMetadata(helpers.getLineMetadata(params));
|
||||||
cache.flattenedLists(helpers.flattenLists(params));
|
cache.flattenedLists(helpers.flattenLists(params.tokens));
|
||||||
|
cache.inlineCodeSpanRanges(helpers.inlineCodeSpanRanges(params.lines));
|
||||||
// Function to run for each rule
|
// Function to run for each rule
|
||||||
const result = (resultVersion === 0) ? {} : [];
|
const result = (resultVersion === 0) ? {} : [];
|
||||||
// eslint-disable-next-line jsdoc/require-jsdoc
|
// eslint-disable-next-line jsdoc/require-jsdoc
|
||||||
|
|
@ -684,6 +684,7 @@ function lintContent(
|
||||||
* @param {boolean} handleRuleFailures Whether to handle exceptions in rules.
|
* @param {boolean} handleRuleFailures Whether to handle exceptions in rules.
|
||||||
* @param {boolean} noInlineConfig Whether to allow inline configuration.
|
* @param {boolean} noInlineConfig Whether to allow inline configuration.
|
||||||
* @param {number} resultVersion Version of the LintResults object to return.
|
* @param {number} resultVersion Version of the LintResults object to return.
|
||||||
|
* @param {Object} fs File system implementation.
|
||||||
* @param {boolean} synchronous Whether to execute synchronously.
|
* @param {boolean} synchronous Whether to execute synchronously.
|
||||||
* @param {Function} callback Callback (err, result) function.
|
* @param {Function} callback Callback (err, result) function.
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
|
|
@ -697,6 +698,7 @@ function lintFile(
|
||||||
handleRuleFailures,
|
handleRuleFailures,
|
||||||
noInlineConfig,
|
noInlineConfig,
|
||||||
resultVersion,
|
resultVersion,
|
||||||
|
fs,
|
||||||
synchronous,
|
synchronous,
|
||||||
callback) {
|
callback) {
|
||||||
// eslint-disable-next-line jsdoc/require-jsdoc
|
// eslint-disable-next-line jsdoc/require-jsdoc
|
||||||
|
|
@ -709,7 +711,6 @@ function lintFile(
|
||||||
}
|
}
|
||||||
// Make a/synchronous call to read file
|
// Make a/synchronous call to read file
|
||||||
if (synchronous) {
|
if (synchronous) {
|
||||||
// @ts-ignore
|
|
||||||
lintContentWrapper(null, fs.readFileSync(file, "utf8"));
|
lintContentWrapper(null, fs.readFileSync(file, "utf8"));
|
||||||
} else {
|
} else {
|
||||||
fs.readFile(file, "utf8", lintContentWrapper);
|
fs.readFile(file, "utf8", lintContentWrapper);
|
||||||
|
|
@ -736,7 +737,7 @@ function lintInput(options, synchronous, callback) {
|
||||||
}
|
}
|
||||||
let files = [];
|
let files = [];
|
||||||
if (Array.isArray(options.files)) {
|
if (Array.isArray(options.files)) {
|
||||||
files = options.files.slice();
|
files = [ ...options.files ];
|
||||||
} else if (options.files) {
|
} else if (options.files) {
|
||||||
files = [ String(options.files) ];
|
files = [ String(options.files) ];
|
||||||
}
|
}
|
||||||
|
|
@ -755,6 +756,7 @@ function lintInput(options, synchronous, callback) {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
md.use(...plugin);
|
md.use(...plugin);
|
||||||
});
|
});
|
||||||
|
const fs = options.fs || require("fs");
|
||||||
const results = newResults(ruleList);
|
const results = newResults(ruleList);
|
||||||
let done = false;
|
let done = false;
|
||||||
// Linting of strings is always synchronous
|
// Linting of strings is always synchronous
|
||||||
|
|
@ -794,6 +796,7 @@ function lintInput(options, synchronous, callback) {
|
||||||
handleRuleFailures,
|
handleRuleFailures,
|
||||||
noInlineConfig,
|
noInlineConfig,
|
||||||
resultVersion,
|
resultVersion,
|
||||||
|
fs,
|
||||||
synchronous,
|
synchronous,
|
||||||
syncCallback
|
syncCallback
|
||||||
);
|
);
|
||||||
|
|
@ -818,6 +821,7 @@ function lintInput(options, synchronous, callback) {
|
||||||
handleRuleFailures,
|
handleRuleFailures,
|
||||||
noInlineConfig,
|
noInlineConfig,
|
||||||
resultVersion,
|
resultVersion,
|
||||||
|
fs,
|
||||||
synchronous,
|
synchronous,
|
||||||
(err, result) => {
|
(err, result) => {
|
||||||
concurrency--;
|
concurrency--;
|
||||||
|
|
@ -928,17 +932,47 @@ function parseConfiguration(name, content, parsers) {
|
||||||
*
|
*
|
||||||
* @param {string} configFile Configuration file name.
|
* @param {string} configFile Configuration file name.
|
||||||
* @param {string} referenceId Referenced identifier to resolve.
|
* @param {string} referenceId Referenced identifier to resolve.
|
||||||
|
* @param {Object} fs File system implementation.
|
||||||
|
* @param {ResolveConfigExtendsCallback} [callback] Callback (err, result)
|
||||||
|
* function.
|
||||||
|
* @returns {void}
|
||||||
|
*/
|
||||||
|
function resolveConfigExtends(configFile, referenceId, fs, callback) {
|
||||||
|
const configFileDirname = path.dirname(configFile);
|
||||||
|
const resolvedExtendsFile = path.resolve(configFileDirname, referenceId);
|
||||||
|
fs.access(resolvedExtendsFile, (err) => {
|
||||||
|
if (err) {
|
||||||
|
// Not a file, try require.resolve
|
||||||
|
try {
|
||||||
|
return callback(null, dynamicRequire.resolve(
|
||||||
|
referenceId,
|
||||||
|
{ "paths": [ configFileDirname ] }
|
||||||
|
));
|
||||||
|
} catch {
|
||||||
|
// Unable to resolve, use resolvedExtendsFile
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return callback(null, resolvedExtendsFile);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resolve referenced "extends" path in a configuration file
|
||||||
|
* using path.resolve() with require.resolve() as a fallback.
|
||||||
|
*
|
||||||
|
* @param {string} configFile Configuration file name.
|
||||||
|
* @param {string} referenceId Referenced identifier to resolve.
|
||||||
|
* @param {Object} fs File system implementation.
|
||||||
* @returns {string} Resolved path to file.
|
* @returns {string} Resolved path to file.
|
||||||
*/
|
*/
|
||||||
function resolveConfigExtends(configFile, referenceId) {
|
function resolveConfigExtendsSync(configFile, referenceId, fs) {
|
||||||
const configFileDirname = path.dirname(configFile);
|
const configFileDirname = path.dirname(configFile);
|
||||||
const resolvedExtendsFile = path.resolve(configFileDirname, referenceId);
|
const resolvedExtendsFile = path.resolve(configFileDirname, referenceId);
|
||||||
try {
|
try {
|
||||||
if (fs.statSync(resolvedExtendsFile).isFile()) {
|
fs.accessSync(resolvedExtendsFile);
|
||||||
return resolvedExtendsFile;
|
return resolvedExtendsFile;
|
||||||
}
|
|
||||||
} catch {
|
} catch {
|
||||||
// If not a file or fs.statSync throws, try require.resolve
|
// Not a file, try require.resolve
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
return dynamicRequire.resolve(
|
return dynamicRequire.resolve(
|
||||||
|
|
@ -946,7 +980,7 @@ function resolveConfigExtends(configFile, referenceId) {
|
||||||
{ "paths": [ configFileDirname ] }
|
{ "paths": [ configFileDirname ] }
|
||||||
);
|
);
|
||||||
} catch {
|
} catch {
|
||||||
// If require.resolve throws, return resolvedExtendsFile
|
// Unable to resolve, return resolvedExtendsFile
|
||||||
}
|
}
|
||||||
return resolvedExtendsFile;
|
return resolvedExtendsFile;
|
||||||
}
|
}
|
||||||
|
|
@ -957,15 +991,24 @@ function resolveConfigExtends(configFile, referenceId) {
|
||||||
* @param {string} file Configuration file name.
|
* @param {string} file Configuration file name.
|
||||||
* @param {ConfigurationParser[] | ReadConfigCallback} parsers Parsing
|
* @param {ConfigurationParser[] | ReadConfigCallback} parsers Parsing
|
||||||
* function(s).
|
* function(s).
|
||||||
|
* @param {Object} [fs] File system implementation.
|
||||||
* @param {ReadConfigCallback} [callback] Callback (err, result) function.
|
* @param {ReadConfigCallback} [callback] Callback (err, result) function.
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
function readConfig(file, parsers, callback) {
|
function readConfig(file, parsers, fs, callback) {
|
||||||
if (!callback) {
|
if (!callback) {
|
||||||
|
if (fs) {
|
||||||
|
callback = fs;
|
||||||
|
fs = null;
|
||||||
|
} else {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
callback = parsers;
|
callback = parsers;
|
||||||
parsers = null;
|
parsers = null;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (!fs) {
|
||||||
|
fs = require("fs");
|
||||||
|
}
|
||||||
// Read file
|
// Read file
|
||||||
fs.readFile(file, "utf8", (err, content) => {
|
fs.readFile(file, "utf8", (err, content) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
|
@ -981,8 +1024,15 @@ function readConfig(file, parsers, callback) {
|
||||||
const configExtends = config.extends;
|
const configExtends = config.extends;
|
||||||
if (configExtends) {
|
if (configExtends) {
|
||||||
delete config.extends;
|
delete config.extends;
|
||||||
const resolvedExtends = resolveConfigExtends(file, configExtends);
|
return resolveConfigExtends(
|
||||||
return readConfig(resolvedExtends, parsers, (errr, extendsConfig) => {
|
file,
|
||||||
|
configExtends,
|
||||||
|
fs,
|
||||||
|
(_, resolvedExtends) => readConfig(
|
||||||
|
resolvedExtends,
|
||||||
|
parsers,
|
||||||
|
fs,
|
||||||
|
(errr, extendsConfig) => {
|
||||||
if (errr) {
|
if (errr) {
|
||||||
return callback(errr);
|
return callback(errr);
|
||||||
}
|
}
|
||||||
|
|
@ -990,7 +1040,9 @@ function readConfig(file, parsers, callback) {
|
||||||
...extendsConfig,
|
...extendsConfig,
|
||||||
...config
|
...config
|
||||||
});
|
});
|
||||||
});
|
}
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
return callback(null, config);
|
return callback(null, config);
|
||||||
});
|
});
|
||||||
|
|
@ -1003,11 +1055,12 @@ const readConfigPromisify = promisify && promisify(readConfig);
|
||||||
*
|
*
|
||||||
* @param {string} file Configuration file name.
|
* @param {string} file Configuration file name.
|
||||||
* @param {ConfigurationParser[]} [parsers] Parsing function(s).
|
* @param {ConfigurationParser[]} [parsers] Parsing function(s).
|
||||||
|
* @param {Object} [fs] File system implementation.
|
||||||
* @returns {Promise<Configuration>} Configuration object.
|
* @returns {Promise<Configuration>} Configuration object.
|
||||||
*/
|
*/
|
||||||
function readConfigPromise(file, parsers) {
|
function readConfigPromise(file, parsers, fs) {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
return readConfigPromisify(file, parsers);
|
return readConfigPromisify(file, parsers, fs);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -1015,11 +1068,15 @@ function readConfigPromise(file, parsers) {
|
||||||
*
|
*
|
||||||
* @param {string} file Configuration file name.
|
* @param {string} file Configuration file name.
|
||||||
* @param {ConfigurationParser[]} [parsers] Parsing function(s).
|
* @param {ConfigurationParser[]} [parsers] Parsing function(s).
|
||||||
|
* @param {Object} [fs] File system implementation.
|
||||||
* @returns {Configuration} Configuration object.
|
* @returns {Configuration} Configuration object.
|
||||||
|
* @throws An Error if processing fails.
|
||||||
*/
|
*/
|
||||||
function readConfigSync(file, parsers) {
|
function readConfigSync(file, parsers, fs) {
|
||||||
|
if (!fs) {
|
||||||
|
fs = require("fs");
|
||||||
|
}
|
||||||
// Read file
|
// Read file
|
||||||
// @ts-ignore
|
|
||||||
const content = fs.readFileSync(file, "utf8");
|
const content = fs.readFileSync(file, "utf8");
|
||||||
// Try to parse file
|
// Try to parse file
|
||||||
const { config, message } = parseConfiguration(file, content, parsers);
|
const { config, message } = parseConfiguration(file, content, parsers);
|
||||||
|
|
@ -1030,9 +1087,9 @@ function readConfigSync(file, parsers) {
|
||||||
const configExtends = config.extends;
|
const configExtends = config.extends;
|
||||||
if (configExtends) {
|
if (configExtends) {
|
||||||
delete config.extends;
|
delete config.extends;
|
||||||
const resolvedExtends = resolveConfigExtends(file, configExtends);
|
const resolvedExtends = resolveConfigExtendsSync(file, configExtends, fs);
|
||||||
return {
|
return {
|
||||||
...readConfigSync(resolvedExtends, parsers),
|
...readConfigSync(resolvedExtends, parsers, fs),
|
||||||
...config
|
...config
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -1155,6 +1212,7 @@ module.exports = markdownlint;
|
||||||
* @property {boolean} [noInlineConfig] True to ignore HTML directives.
|
* @property {boolean} [noInlineConfig] True to ignore HTML directives.
|
||||||
* @property {number} [resultVersion] Results object version.
|
* @property {number} [resultVersion] Results object version.
|
||||||
* @property {Plugin[]} [markdownItPlugins] Additional plugins.
|
* @property {Plugin[]} [markdownItPlugins] Additional plugins.
|
||||||
|
* @property {Object} [fs] File system implementation.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -1196,13 +1254,14 @@ module.exports = markdownlint;
|
||||||
* Fix information.
|
* Fix information.
|
||||||
*
|
*
|
||||||
* @typedef {Object} FixInfo
|
* @typedef {Object} FixInfo
|
||||||
|
* @property {number} [lineNumber] Line number (1-based).
|
||||||
* @property {number} [editColumn] Column of the fix (1-based).
|
* @property {number} [editColumn] Column of the fix (1-based).
|
||||||
* @property {number} [deleteCount] Count of characters to delete.
|
* @property {number} [deleteCount] Count of characters to delete.
|
||||||
* @property {string} [insertText] Text to insert (after deleting).
|
* @property {string} [insertText] Text to insert (after deleting).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called with the result of the lint operation.
|
* Called with the result of the lint function.
|
||||||
*
|
*
|
||||||
* @callback LintCallback
|
* @callback LintCallback
|
||||||
* @param {Error | null} err Error object or null.
|
* @param {Error | null} err Error object or null.
|
||||||
|
|
@ -1232,10 +1291,19 @@ module.exports = markdownlint;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called with the result of the readConfig operation.
|
* Called with the result of the readConfig function.
|
||||||
*
|
*
|
||||||
* @callback ReadConfigCallback
|
* @callback ReadConfigCallback
|
||||||
* @param {Error | null} err Error object or null.
|
* @param {Error | null} err Error object or null.
|
||||||
* @param {Configuration} [config] Configuration object.
|
* @param {Configuration} [config] Configuration object.
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called with the result of the resolveConfigExtends function.
|
||||||
|
*
|
||||||
|
* @callback ResolveConfigExtendsCallback
|
||||||
|
* @param {Error | null} err Error object or null.
|
||||||
|
* @param {string} [path] Resolved path to file.
|
||||||
|
* @returns {void}
|
||||||
|
*/
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,10 @@ module.exports = {
|
||||||
"function": function MD010(params, onError) {
|
"function": function MD010(params, onError) {
|
||||||
const codeBlocks = params.config.code_blocks;
|
const codeBlocks = params.config.code_blocks;
|
||||||
const includeCodeBlocks = (codeBlocks === undefined) ? true : !!codeBlocks;
|
const includeCodeBlocks = (codeBlocks === undefined) ? true : !!codeBlocks;
|
||||||
|
const spacesPerTab = params.config.spaces_per_tab;
|
||||||
|
const spaceMultiplier = (spacesPerTab === undefined) ?
|
||||||
|
1 :
|
||||||
|
Math.max(0, Number(spacesPerTab));
|
||||||
forEachLine(lineMetadata(), (line, lineIndex, inCode) => {
|
forEachLine(lineMetadata(), (line, lineIndex, inCode) => {
|
||||||
if (!inCode || includeCodeBlocks) {
|
if (!inCode || includeCodeBlocks) {
|
||||||
let match = null;
|
let match = null;
|
||||||
|
|
@ -29,7 +33,7 @@ module.exports = {
|
||||||
{
|
{
|
||||||
"editColumn": column,
|
"editColumn": column,
|
||||||
"deleteCount": length,
|
"deleteCount": length,
|
||||||
"insertText": "".padEnd(length)
|
"insertText": "".padEnd(length * spaceMultiplier)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
48
lib/md011.js
48
lib/md011.js
|
|
@ -2,41 +2,45 @@
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const { addError, forEachInlineChild, unescapeMarkdown } =
|
const { addError, forEachLine, overlapsAnyRange } = require("../helpers");
|
||||||
require("../helpers");
|
const { inlineCodeSpanRanges, lineMetadata } = require("./cache");
|
||||||
|
|
||||||
const reversedLinkRe = /\(([^)]+)\)\[([^\]^][^\]]*)]/g;
|
const reversedLinkRe =
|
||||||
|
/(^|[^\\])\(([^)]+)\)\[([^\]^][^\]]*)](?!\()/g;
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
"names": [ "MD011", "no-reversed-links" ],
|
"names": [ "MD011", "no-reversed-links" ],
|
||||||
"description": "Reversed link syntax",
|
"description": "Reversed link syntax",
|
||||||
"tags": [ "links" ],
|
"tags": [ "links" ],
|
||||||
"function": function MD011(params, onError) {
|
"function": function MD011(params, onError) {
|
||||||
forEachInlineChild(params, "text", (token) => {
|
const exclusions = inlineCodeSpanRanges();
|
||||||
const { lineNumber, content } = token;
|
forEachLine(lineMetadata(), (line, lineIndex, inCode, onFence) => {
|
||||||
|
if (!inCode && !onFence) {
|
||||||
let match = null;
|
let match = null;
|
||||||
while ((match = reversedLinkRe.exec(content)) !== null) {
|
while ((match = reversedLinkRe.exec(line)) !== null) {
|
||||||
const [ reversedLink, linkText, linkDestination ] = match;
|
const [ reversedLink, preChar, linkText, linkDestination ] = match;
|
||||||
const line = params.lines[lineNumber - 1];
|
const index = match.index + preChar.length;
|
||||||
const column = unescapeMarkdown(line).indexOf(reversedLink) + 1;
|
const length = match[0].length - preChar.length;
|
||||||
const length = reversedLink.length;
|
if (
|
||||||
const range = column ? [ column, length ] : null;
|
!linkText.endsWith("\\") &&
|
||||||
const fixInfo = column ?
|
!linkDestination.endsWith("\\") &&
|
||||||
{
|
!overlapsAnyRange(exclusions, lineIndex, index, length)
|
||||||
"editColumn": column,
|
) {
|
||||||
"deleteCount": length,
|
|
||||||
"insertText": `[${linkText}](${linkDestination})`
|
|
||||||
} :
|
|
||||||
null;
|
|
||||||
addError(
|
addError(
|
||||||
onError,
|
onError,
|
||||||
lineNumber,
|
lineIndex + 1,
|
||||||
reversedLink,
|
reversedLink.slice(preChar.length),
|
||||||
null,
|
null,
|
||||||
range,
|
[ index + 1, length ],
|
||||||
fixInfo
|
{
|
||||||
|
"editColumn": index + 1,
|
||||||
|
"deleteCount": length,
|
||||||
|
"insertText": `[${linkText}](${linkDestination})`
|
||||||
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
16
lib/md037.js
16
lib/md037.js
|
|
@ -78,11 +78,23 @@ module.exports = {
|
||||||
lineMetadata(),
|
lineMetadata(),
|
||||||
(line, lineIndex, inCode, onFence, inTable, inItem, onBreak, inMath) => {
|
(line, lineIndex, inCode, onFence, inTable, inItem, onBreak, inMath) => {
|
||||||
const onItemStart = (inItem === 1);
|
const onItemStart = (inItem === 1);
|
||||||
if (inCode || inTable || onBreak || onItemStart || isBlankLine(line)) {
|
if (
|
||||||
|
inCode ||
|
||||||
|
onFence ||
|
||||||
|
inTable ||
|
||||||
|
onBreak ||
|
||||||
|
onItemStart ||
|
||||||
|
isBlankLine(line)
|
||||||
|
) {
|
||||||
// Emphasis resets when leaving a block
|
// Emphasis resets when leaving a block
|
||||||
resetRunTracking();
|
resetRunTracking();
|
||||||
}
|
}
|
||||||
if (inCode || onBreak || inMath) {
|
if (
|
||||||
|
inCode ||
|
||||||
|
onFence ||
|
||||||
|
onBreak ||
|
||||||
|
inMath
|
||||||
|
) {
|
||||||
// Emphasis has no meaning here
|
// Emphasis has no meaning here
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,8 +28,11 @@ module.exports = {
|
||||||
const actual = levels[heading.tag] + " " + content;
|
const actual = levels[heading.tag] + " " + content;
|
||||||
const expected = getExpected();
|
const expected = getExpected();
|
||||||
if (expected === "*") {
|
if (expected === "*") {
|
||||||
|
const nextExpected = getExpected();
|
||||||
|
if (nextExpected.toLowerCase() !== actual.toLowerCase()) {
|
||||||
matchAny = true;
|
matchAny = true;
|
||||||
getExpected();
|
i--;
|
||||||
|
}
|
||||||
} else if (expected === "+") {
|
} else if (expected === "+") {
|
||||||
matchAny = true;
|
matchAny = true;
|
||||||
} else if (expected.toLowerCase() === actual.toLowerCase()) {
|
} else if (expected.toLowerCase() === actual.toLowerCase()) {
|
||||||
|
|
@ -43,9 +46,11 @@ module.exports = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
const extraHeadings = requiredHeadings.length - i;
|
||||||
if (
|
if (
|
||||||
!hasError &&
|
!hasError &&
|
||||||
(i < requiredHeadings.length) &&
|
((extraHeadings > 1) ||
|
||||||
|
((extraHeadings === 1) && (requiredHeadings[i] !== "*"))) &&
|
||||||
(anyHeadings || !requiredHeadings.every((heading) => heading === "*"))
|
(anyHeadings || !requiredHeadings.every((heading) => heading === "*"))
|
||||||
) {
|
) {
|
||||||
addErrorContext(onError, params.lines.length,
|
addErrorContext(onError, params.lines.length,
|
||||||
|
|
|
||||||
119
lib/md044.js
119
lib/md044.js
|
|
@ -2,11 +2,9 @@
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const { addErrorDetailIf, bareUrlRe, escapeForRegExp, filterTokens,
|
const { addErrorDetailIf, bareUrlRe, escapeForRegExp, forEachLine,
|
||||||
forEachInlineChild, newLineRe } = require("../helpers");
|
overlapsAnyRange, linkRe, linkReferenceRe } = require("../helpers");
|
||||||
|
const { inlineCodeSpanRanges, lineMetadata } = require("./cache");
|
||||||
const startNonWordRe = /^\W/;
|
|
||||||
const endNonWordRe = /\W$/;
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
"names": [ "MD044", "proper-names" ],
|
"names": [ "MD044", "proper-names" ],
|
||||||
|
|
@ -15,80 +13,65 @@ module.exports = {
|
||||||
"function": function MD044(params, onError) {
|
"function": function MD044(params, onError) {
|
||||||
let names = params.config.names;
|
let names = params.config.names;
|
||||||
names = Array.isArray(names) ? names : [];
|
names = Array.isArray(names) ? names : [];
|
||||||
|
names.sort((a, b) => (b.length - a.length) || a.localeCompare(b));
|
||||||
const codeBlocks = params.config.code_blocks;
|
const codeBlocks = params.config.code_blocks;
|
||||||
const includeCodeBlocks = (codeBlocks === undefined) ? true : !!codeBlocks;
|
const includeCodeBlocks = (codeBlocks === undefined) ? true : !!codeBlocks;
|
||||||
// Text of automatic hyperlinks is implicitly a URL
|
const exclusions = [];
|
||||||
const autolinkText = new Set();
|
forEachLine(lineMetadata(), (line, lineIndex) => {
|
||||||
filterTokens(params, "inline", (token) => {
|
if (linkReferenceRe.test(line)) {
|
||||||
let inAutoLink = false;
|
exclusions.push([ lineIndex, 0, line.length ]);
|
||||||
token.children.forEach((child) => {
|
} else {
|
||||||
const { info, type } = child;
|
|
||||||
if ((type === "link_open") && (info === "auto")) {
|
|
||||||
inAutoLink = true;
|
|
||||||
} else if (type === "link_close") {
|
|
||||||
inAutoLink = false;
|
|
||||||
} else if ((type === "text") && inAutoLink) {
|
|
||||||
autolinkText.add(child);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
// For each proper name...
|
|
||||||
names.forEach((name) => {
|
|
||||||
const escapedName = escapeForRegExp(name);
|
|
||||||
const startNamePattern = startNonWordRe.test(name) ? "" : "\\S*\\b";
|
|
||||||
const endNamePattern = endNonWordRe.test(name) ? "" : "\\b\\S*";
|
|
||||||
const namePattern =
|
|
||||||
`(${startNamePattern})(${escapedName})(${endNamePattern})`;
|
|
||||||
const anyNameRe = new RegExp(namePattern, "gi");
|
|
||||||
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
||||||
function forToken(token) {
|
|
||||||
if (!autolinkText.has(token)) {
|
|
||||||
const fenceOffset = (token.type === "fence") ? 1 : 0;
|
|
||||||
token.content.split(newLineRe).forEach((line, index) => {
|
|
||||||
let match = null;
|
let match = null;
|
||||||
while ((match = anyNameRe.exec(line)) !== null) {
|
while ((match = bareUrlRe.exec(line)) !== null) {
|
||||||
const [ fullMatch, leftMatch, nameMatch, rightMatch ] = match;
|
exclusions.push([ lineIndex, match.index, match[0].length ]);
|
||||||
if (fullMatch.search(bareUrlRe) === -1) {
|
}
|
||||||
const wordMatch = fullMatch
|
while ((match = linkRe.exec(line)) !== null) {
|
||||||
.replace(new RegExp(`^\\W{0,${leftMatch.length}}`), "")
|
const [ , text, destination ] = match;
|
||||||
.replace(new RegExp(`\\W{0,${rightMatch.length}}$`), "");
|
if (destination) {
|
||||||
if (!names.includes(wordMatch)) {
|
exclusions.push(
|
||||||
const lineNumber = token.lineNumber + index + fenceOffset;
|
[ lineIndex, match.index + text.length, destination.length ]
|
||||||
const fullLine = params.lines[lineNumber - 1];
|
|
||||||
const matchLength = wordMatch.length;
|
|
||||||
const matchIndex = fullLine.indexOf(wordMatch);
|
|
||||||
const range = (matchIndex === -1) ?
|
|
||||||
null :
|
|
||||||
[ matchIndex + 1, matchLength ];
|
|
||||||
const fixInfo = (matchIndex === -1) ?
|
|
||||||
null :
|
|
||||||
{
|
|
||||||
"editColumn": matchIndex + 1,
|
|
||||||
"deleteCount": matchLength,
|
|
||||||
"insertText": name
|
|
||||||
};
|
|
||||||
addErrorDetailIf(
|
|
||||||
onError,
|
|
||||||
lineNumber,
|
|
||||||
name,
|
|
||||||
nameMatch,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
range,
|
|
||||||
fixInfo
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if (!includeCodeBlocks) {
|
||||||
|
exclusions.push(...inlineCodeSpanRanges());
|
||||||
}
|
}
|
||||||
|
for (const name of names) {
|
||||||
|
const escapedName = escapeForRegExp(name);
|
||||||
|
const startNamePattern = /^\W/.test(name) ? "" : "\\b_*";
|
||||||
|
const endNamePattern = /\W$/.test(name) ? "" : "_*\\b";
|
||||||
|
const namePattern =
|
||||||
|
`(${startNamePattern})(${escapedName})${endNamePattern}`;
|
||||||
|
const nameRe = new RegExp(namePattern, "gi");
|
||||||
|
forEachLine(lineMetadata(), (line, lineIndex, inCode, onFence) => {
|
||||||
|
if (includeCodeBlocks || (!inCode && !onFence)) {
|
||||||
|
let match = null;
|
||||||
|
while ((match = nameRe.exec(line)) !== null) {
|
||||||
|
const [ , leftMatch, nameMatch ] = match;
|
||||||
|
const index = match.index + leftMatch.length;
|
||||||
|
const length = nameMatch.length;
|
||||||
|
if (!overlapsAnyRange(exclusions, lineIndex, index, length)) {
|
||||||
|
addErrorDetailIf(
|
||||||
|
onError,
|
||||||
|
lineIndex + 1,
|
||||||
|
name,
|
||||||
|
nameMatch,
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
[ index + 1, length ],
|
||||||
|
{
|
||||||
|
"editColumn": index + 1,
|
||||||
|
"deleteCount": length,
|
||||||
|
"insertText": name
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
exclusions.push([ lineIndex, index, length ]);
|
||||||
}
|
}
|
||||||
forEachInlineChild(params, "text", forToken);
|
|
||||||
if (includeCodeBlocks) {
|
|
||||||
forEachInlineChild(params, "code_inline", forToken);
|
|
||||||
filterTokens(params, "code_block", forToken);
|
|
||||||
filterTokens(params, "fence", forToken);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
40
package.json
40
package.json
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "markdownlint",
|
"name": "markdownlint",
|
||||||
"version": "0.23.1",
|
"version": "0.24.0",
|
||||||
"description": "A Node.js style checker and lint tool for Markdown/CommonMark files.",
|
"description": "A Node.js style checker and lint tool for Markdown/CommonMark files.",
|
||||||
"main": "lib/markdownlint.js",
|
"main": "lib/markdownlint.js",
|
||||||
"types": "lib/markdownlint.d.ts",
|
"types": "lib/markdownlint.d.ts",
|
||||||
|
|
@ -21,8 +21,16 @@
|
||||||
"build-example": "npm install --no-save --ignore-scripts grunt grunt-cli gulp through2",
|
"build-example": "npm install --no-save --ignore-scripts grunt grunt-cli gulp through2",
|
||||||
"ci": "npm-run-all --continue-on-error --parallel test-cover lint declaration build-config build-demo && git diff --exit-code",
|
"ci": "npm-run-all --continue-on-error --parallel test-cover lint declaration build-config build-demo && git diff --exit-code",
|
||||||
"clean-test-repos": "rimraf test-repos",
|
"clean-test-repos": "rimraf test-repos",
|
||||||
"clone-test-repos": "mkdir test-repos && cd test-repos && git clone https://github.com/eslint/eslint eslint-eslint --depth 1 --no-tags --quiet && git clone https://github.com/mkdocs/mkdocs mkdocs-mkdocs --depth 1 --no-tags --quiet && git clone https://github.com/pi-hole/docs pi-hole-docs --depth 1 --no-tags --quiet",
|
"clone-test-repos-dotnet-docs": "cd test-repos && git clone https://github.com/dotnet/docs dotnet-docs --depth 1 --no-tags --quiet",
|
||||||
"clone-test-repos-large": "npm run clone-test-repos && cd test-repos && git clone https://github.com/dotnet/docs dotnet-docs --depth 1 --no-tags --quiet",
|
"clone-test-repos-eslint-eslint": "cd test-repos && git clone https://github.com/eslint/eslint eslint-eslint --depth 1 --no-tags --quiet",
|
||||||
|
"clone-test-repos-mkdocs-mkdocs": "cd test-repos && git clone https://github.com/mkdocs/mkdocs mkdocs-mkdocs --depth 1 --no-tags --quiet",
|
||||||
|
"clone-test-repos-mochajs-mocha": "cd test-repos && git clone https://github.com/mochajs/mocha mochajs-mocha --depth 1 --no-tags --quiet",
|
||||||
|
"clone-test-repos-pi-hole-docs": "cd test-repos && git clone https://github.com/pi-hole/docs pi-hole-docs --depth 1 --no-tags --quiet",
|
||||||
|
"clone-test-repos-v8-v8-dev": "cd test-repos && git clone https://github.com/v8/v8.dev v8-v8-dev --depth 1 --no-tags --quiet",
|
||||||
|
"clone-test-repos-webhintio-hint": "cd test-repos && git clone https://github.com/webhintio/hint webhintio-hint --depth 1 --no-tags --quiet",
|
||||||
|
"clone-test-repos-webpack-webpack-js-org": "cd test-repos && git clone https://github.com/webpack/webpack.js.org webpack-webpack-js-org --depth 1 --no-tags --quiet",
|
||||||
|
"clone-test-repos": "mkdir test-repos && cd test-repos && npm run clone-test-repos-eslint-eslint && npm run clone-test-repos-mkdocs-mkdocs && npm run clone-test-repos-mochajs-mocha && npm run clone-test-repos-pi-hole-docs && npm run clone-test-repos-webhintio-hint && npm run clone-test-repos-webpack-webpack-js-org",
|
||||||
|
"clone-test-repos-large": "npm run clone-test-repos && cd test-repos && npm run clone-test-repos-dotnet-docs && npm run clone-test-repos-v8-v8-dev",
|
||||||
"declaration": "npm run build-declaration && npm run test-declaration",
|
"declaration": "npm run build-declaration && npm run test-declaration",
|
||||||
"example": "cd example && node standalone.js && grunt markdownlint --force && gulp markdownlint",
|
"example": "cd example && node standalone.js && grunt markdownlint --force && gulp markdownlint",
|
||||||
"lint": "eslint --max-warnings 0 .",
|
"lint": "eslint --max-warnings 0 .",
|
||||||
|
|
@ -36,32 +44,32 @@
|
||||||
"node": ">=10"
|
"node": ">=10"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"markdown-it": "12.0.4"
|
"markdown-it": "12.2.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"ava": "~3.15.0",
|
"ava": "~3.15.0",
|
||||||
"c8": "~7.5.0",
|
"c8": "~7.8.0",
|
||||||
"cpy-cli": "~3.1.1",
|
"cpy-cli": "~3.1.1",
|
||||||
"eslint": "~7.19.0",
|
"eslint": "~7.32.0",
|
||||||
"eslint-plugin-jsdoc": "~31.6.0",
|
"eslint-plugin-jsdoc": "~36.0.7",
|
||||||
"eslint-plugin-node": "~11.1.0",
|
"eslint-plugin-node": "~11.1.0",
|
||||||
"eslint-plugin-unicorn": "~27.0.0",
|
"eslint-plugin-unicorn": "~35.0.0",
|
||||||
"globby": "~11.0.2",
|
"globby": "~11.0.4",
|
||||||
"js-yaml": "~4.0.0",
|
"js-yaml": "~4.1.0",
|
||||||
"markdown-it-for-inline": "~0.1.1",
|
"markdown-it-for-inline": "~0.1.1",
|
||||||
"markdown-it-sub": "~1.0.0",
|
"markdown-it-sub": "~1.0.0",
|
||||||
"markdown-it-sup": "~1.0.0",
|
"markdown-it-sup": "~1.0.0",
|
||||||
"markdown-it-texmath": "~0.8.0",
|
"markdown-it-texmath": "~0.9.1",
|
||||||
"markdownlint-rule-helpers": "~0.13.0",
|
"markdownlint-rule-helpers": "~0.14.0",
|
||||||
"npm-run-all": "~4.1.5",
|
"npm-run-all": "~4.1.5",
|
||||||
"rimraf": "~3.0.2",
|
"rimraf": "~3.0.2",
|
||||||
"strip-json-comments": "~3.1.1",
|
"strip-json-comments": "~3.1.1",
|
||||||
"toml": "~3.0.0",
|
"toml": "~3.0.0",
|
||||||
"ts-loader": "~8.0.15",
|
"ts-loader": "~9.2.5",
|
||||||
"tv4": "~1.3.0",
|
"tv4": "~1.3.0",
|
||||||
"typescript": "~4.1.3",
|
"typescript": "~4.3.5",
|
||||||
"webpack": "~5.21.1",
|
"webpack": "~5.51.1",
|
||||||
"webpack-cli": "~4.5.0"
|
"webpack-cli": "~4.8.0"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"markdown",
|
"markdown",
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,9 @@
|
||||||
// MD010/no-hard-tabs - Hard tabs
|
// MD010/no-hard-tabs - Hard tabs
|
||||||
"MD010": {
|
"MD010": {
|
||||||
// Include code blocks
|
// Include code blocks
|
||||||
"code_blocks": true
|
"code_blocks": true,
|
||||||
|
// Number of spaces for each hard tab
|
||||||
|
"spaces_per_tab": 1
|
||||||
},
|
},
|
||||||
|
|
||||||
// MD011/no-reversed-links - Reversed link syntax
|
// MD011/no-reversed-links - Reversed link syntax
|
||||||
|
|
@ -244,7 +246,7 @@
|
||||||
|
|
||||||
// MD048/code-fence-style - Code fence style
|
// MD048/code-fence-style - Code fence style
|
||||||
"MD048": {
|
"MD048": {
|
||||||
// Code fence syle
|
// Code fence style
|
||||||
"style": "consistent"
|
"style": "consistent"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -50,6 +50,8 @@ MD009:
|
||||||
MD010:
|
MD010:
|
||||||
# Include code blocks
|
# Include code blocks
|
||||||
code_blocks: true
|
code_blocks: true
|
||||||
|
# Number of spaces for each hard tab
|
||||||
|
spaces_per_tab: 1
|
||||||
|
|
||||||
# MD011/no-reversed-links - Reversed link syntax
|
# MD011/no-reversed-links - Reversed link syntax
|
||||||
MD011: true
|
MD011: true
|
||||||
|
|
@ -221,5 +223,5 @@ MD047: true
|
||||||
|
|
||||||
# MD048/code-fence-style - Code fence style
|
# MD048/code-fence-style - Code fence style
|
||||||
MD048:
|
MD048:
|
||||||
# Code fence syle
|
# Code fence style
|
||||||
style: "consistent"
|
style: "consistent"
|
||||||
|
|
@ -32,7 +32,7 @@ const schema = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": {
|
"additionalProperties": {
|
||||||
"type:": [
|
"type": [
|
||||||
"boolean",
|
"boolean",
|
||||||
"object"
|
"object"
|
||||||
]
|
]
|
||||||
|
|
@ -135,6 +135,11 @@ rules.forEach(function forRule(rule) {
|
||||||
"description": "Include code blocks",
|
"description": "Include code blocks",
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": true
|
"default": true
|
||||||
|
},
|
||||||
|
"spaces_per_tab": {
|
||||||
|
"description": "Number of spaces for each hard tab",
|
||||||
|
"type": "number",
|
||||||
|
"default": 1
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
|
|
@ -380,7 +385,7 @@ rules.forEach(function forRule(rule) {
|
||||||
case "MD048":
|
case "MD048":
|
||||||
scheme.properties = {
|
scheme.properties = {
|
||||||
"style": {
|
"style": {
|
||||||
"description": "Code fence syle",
|
"description": "Code fence style",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": [
|
"enum": [
|
||||||
"consistent",
|
"consistent",
|
||||||
|
|
|
||||||
|
|
@ -327,6 +327,11 @@
|
||||||
"description": "Include code blocks",
|
"description": "Include code blocks",
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": true
|
"default": true
|
||||||
|
},
|
||||||
|
"spaces_per_tab": {
|
||||||
|
"description": "Number of spaces for each hard tab",
|
||||||
|
"type": "number",
|
||||||
|
"default": 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": false
|
"additionalProperties": false
|
||||||
|
|
@ -343,6 +348,11 @@
|
||||||
"description": "Include code blocks",
|
"description": "Include code blocks",
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": true
|
"default": true
|
||||||
|
},
|
||||||
|
"spaces_per_tab": {
|
||||||
|
"description": "Number of spaces for each hard tab",
|
||||||
|
"type": "number",
|
||||||
|
"default": 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": false
|
"additionalProperties": false
|
||||||
|
|
@ -1396,7 +1406,7 @@
|
||||||
"default": true,
|
"default": true,
|
||||||
"properties": {
|
"properties": {
|
||||||
"style": {
|
"style": {
|
||||||
"description": "Code fence syle",
|
"description": "Code fence style",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": [
|
"enum": [
|
||||||
"consistent",
|
"consistent",
|
||||||
|
|
@ -1417,7 +1427,7 @@
|
||||||
"default": true,
|
"default": true,
|
||||||
"properties": {
|
"properties": {
|
||||||
"style": {
|
"style": {
|
||||||
"description": "Code fence syle",
|
"description": "Code fence style",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": [
|
"enum": [
|
||||||
"consistent",
|
"consistent",
|
||||||
|
|
@ -1551,7 +1561,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": {
|
"additionalProperties": {
|
||||||
"type:": [
|
"type": [
|
||||||
"boolean",
|
"boolean",
|
||||||
"object"
|
"object"
|
||||||
]
|
]
|
||||||
|
|
|
||||||
7
test/detailed-results-4-tabs-MD010.json
Normal file
7
test/detailed-results-4-tabs-MD010.json
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"MD009": false,
|
||||||
|
"MD010": {
|
||||||
|
"spaces_per_tab": 4
|
||||||
|
},
|
||||||
|
"MD041": false
|
||||||
|
}
|
||||||
3
test/detailed-results-4-tabs-MD010.md
Normal file
3
test/detailed-results-4-tabs-MD010.md
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
text
|
||||||
|
text and text 2
|
||||||
|
texts with trailing spaces
|
||||||
3
test/detailed-results-4-tabs-MD010.md.fixed
Normal file
3
test/detailed-results-4-tabs-MD010.md.fixed
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
text
|
||||||
|
text and text 2
|
||||||
|
texts with trailing spaces
|
||||||
62
test/detailed-results-4-tabs-MD010.results.json
Normal file
62
test/detailed-results-4-tabs-MD010.results.json
Normal file
|
|
@ -0,0 +1,62 @@
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"lineNumber": 1,
|
||||||
|
"ruleNames": [
|
||||||
|
"MD010",
|
||||||
|
"no-hard-tabs"
|
||||||
|
],
|
||||||
|
"ruleDescription": "Hard tabs",
|
||||||
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md010",
|
||||||
|
"errorDetail": "Column: 1",
|
||||||
|
"errorContext": null,
|
||||||
|
"errorRange": [
|
||||||
|
1,
|
||||||
|
13
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 1,
|
||||||
|
"deleteCount": 13,
|
||||||
|
"insertText": " "
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"lineNumber": 2,
|
||||||
|
"ruleNames": [
|
||||||
|
"MD010",
|
||||||
|
"no-hard-tabs"
|
||||||
|
],
|
||||||
|
"ruleDescription": "Hard tabs",
|
||||||
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md010",
|
||||||
|
"errorDetail": "Column: 5",
|
||||||
|
"errorContext": null,
|
||||||
|
"errorRange": [
|
||||||
|
5,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 5,
|
||||||
|
"deleteCount": 2,
|
||||||
|
"insertText": " "
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"lineNumber": 3,
|
||||||
|
"ruleNames": [
|
||||||
|
"MD010",
|
||||||
|
"no-hard-tabs"
|
||||||
|
],
|
||||||
|
"ruleDescription": "Hard tabs",
|
||||||
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md010",
|
||||||
|
"errorDetail": "Column: 27",
|
||||||
|
"errorContext": null,
|
||||||
|
"errorRange": [
|
||||||
|
27,
|
||||||
|
3
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 27,
|
||||||
|
"deleteCount": 3,
|
||||||
|
"insertText": " "
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
@ -1,128 +1,255 @@
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"lineNumber": 3,
|
"lineNumber": 3,
|
||||||
"ruleNames": [ "MD001", "heading-increment", "header-increment" ],
|
"ruleNames": [
|
||||||
|
"MD001",
|
||||||
|
"heading-increment",
|
||||||
|
"header-increment"
|
||||||
|
],
|
||||||
"ruleDescription": "Heading levels should only increment by one level at a time",
|
"ruleDescription": "Heading levels should only increment by one level at a time",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md001",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md001",
|
||||||
"errorDetail": "Expected: h3; Actual: h4",
|
"errorDetail": "Expected: h3; Actual: h4",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": null
|
"errorRange": null,
|
||||||
|
"fixInfo": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 1,
|
"lineNumber": 1,
|
||||||
"ruleNames": [ "MD002", "first-heading-h1", "first-header-h1" ],
|
"ruleNames": [
|
||||||
|
"MD002",
|
||||||
|
"first-heading-h1",
|
||||||
|
"first-header-h1"
|
||||||
|
],
|
||||||
"ruleDescription": "First heading should be a top-level heading",
|
"ruleDescription": "First heading should be a top-level heading",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md002",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md002",
|
||||||
"errorDetail": "Expected: h1; Actual: h2",
|
"errorDetail": "Expected: h1; Actual: h2",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": null
|
"errorRange": null,
|
||||||
|
"fixInfo": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 5,
|
"lineNumber": 5,
|
||||||
"ruleNames": [ "MD003", "heading-style", "header-style" ],
|
"ruleNames": [
|
||||||
|
"MD003",
|
||||||
|
"heading-style",
|
||||||
|
"header-style"
|
||||||
|
],
|
||||||
"ruleDescription": "Heading style",
|
"ruleDescription": "Heading style",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md003",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md003",
|
||||||
"errorDetail": "Expected: atx; Actual: atx_closed",
|
"errorDetail": "Expected: atx; Actual: atx_closed",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": null
|
"errorRange": null,
|
||||||
|
"fixInfo": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 10,
|
"lineNumber": 10,
|
||||||
"ruleNames": [ "MD004", "ul-style" ],
|
"ruleNames": [
|
||||||
|
"MD004",
|
||||||
|
"ul-style"
|
||||||
|
],
|
||||||
"ruleDescription": "Unordered list style",
|
"ruleDescription": "Unordered list style",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md004",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md004",
|
||||||
"errorDetail": "Expected: asterisk; Actual: dash",
|
"errorDetail": "Expected: asterisk; Actual: dash",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [1, 2]
|
"errorRange": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 1,
|
||||||
|
"deleteCount": 1,
|
||||||
|
"insertText": "*"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 8,
|
"lineNumber": 8,
|
||||||
"ruleNames": [ "MD005", "list-indent" ],
|
"ruleNames": [
|
||||||
|
"MD005",
|
||||||
|
"list-indent"
|
||||||
|
],
|
||||||
"ruleDescription": "Inconsistent indentation for list items at the same level",
|
"ruleDescription": "Inconsistent indentation for list items at the same level",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md005",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md005",
|
||||||
"errorDetail": "Expected: 0; Actual: 1",
|
"errorDetail": "Expected: 0; Actual: 1",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [1, 3]
|
"errorRange": [
|
||||||
|
1,
|
||||||
|
3
|
||||||
|
],
|
||||||
|
"fixInfo": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 23,
|
"lineNumber": 23,
|
||||||
"ruleNames": [ "MD005", "list-indent" ],
|
"ruleNames": [
|
||||||
|
"MD005",
|
||||||
|
"list-indent"
|
||||||
|
],
|
||||||
"ruleDescription": "Inconsistent indentation for list items at the same level",
|
"ruleDescription": "Inconsistent indentation for list items at the same level",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md005",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md005",
|
||||||
"errorDetail": "Expected: 1; Actual: 0",
|
"errorDetail": "Expected: 1; Actual: 0",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [1, 3]
|
"errorRange": [
|
||||||
|
1,
|
||||||
|
3
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 1,
|
||||||
|
"deleteCount": 0,
|
||||||
|
"insertText": " "
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 29,
|
"lineNumber": 29,
|
||||||
"ruleNames": [ "MD005", "list-indent" ],
|
"ruleNames": [
|
||||||
|
"MD005",
|
||||||
|
"list-indent"
|
||||||
|
],
|
||||||
"ruleDescription": "Inconsistent indentation for list items at the same level",
|
"ruleDescription": "Inconsistent indentation for list items at the same level",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md005",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md005",
|
||||||
"errorDetail": "Expected: (3); Actual: (4)",
|
"errorDetail": "Expected: (3); Actual: (4)",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [1, 5]
|
"errorRange": [
|
||||||
|
1,
|
||||||
|
5
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 1,
|
||||||
|
"deleteCount": 1,
|
||||||
|
"insertText": ""
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 12,
|
"lineNumber": 12,
|
||||||
"ruleNames": [ "MD006", "ul-start-left" ],
|
"ruleNames": [
|
||||||
|
"MD006",
|
||||||
|
"ul-start-left"
|
||||||
|
],
|
||||||
"ruleDescription": "Consider starting bulleted lists at the beginning of the line",
|
"ruleDescription": "Consider starting bulleted lists at the beginning of the line",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md006",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md006",
|
||||||
"errorDetail": "Expected: 0; Actual: 1",
|
"errorDetail": "Expected: 0; Actual: 1",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [1, 3]
|
"errorRange": [
|
||||||
|
1,
|
||||||
|
3
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"deleteCount": 1
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 13,
|
"lineNumber": 13,
|
||||||
"ruleNames": [ "MD006", "ul-start-left" ],
|
"ruleNames": [
|
||||||
|
"MD006",
|
||||||
|
"ul-start-left"
|
||||||
|
],
|
||||||
"ruleDescription": "Consider starting bulleted lists at the beginning of the line",
|
"ruleDescription": "Consider starting bulleted lists at the beginning of the line",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md006",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md006",
|
||||||
"errorDetail": "Expected: 0; Actual: 1",
|
"errorDetail": "Expected: 0; Actual: 1",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [1, 3]
|
"errorRange": [
|
||||||
|
1,
|
||||||
|
3
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"deleteCount": 1
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 8,
|
"lineNumber": 8,
|
||||||
"ruleNames": [ "MD007", "ul-indent" ],
|
"ruleNames": [
|
||||||
|
"MD007",
|
||||||
|
"ul-indent"
|
||||||
|
],
|
||||||
"ruleDescription": "Unordered list indentation",
|
"ruleDescription": "Unordered list indentation",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md007",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md007",
|
||||||
"errorDetail": "Expected: 0; Actual: 1",
|
"errorDetail": "Expected: 0; Actual: 1",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [1, 3]
|
"errorRange": [
|
||||||
|
1,
|
||||||
|
3
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 1,
|
||||||
|
"deleteCount": 1,
|
||||||
|
"insertText": ""
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 12,
|
"lineNumber": 12,
|
||||||
"ruleNames": [ "MD007", "ul-indent" ],
|
"ruleNames": [
|
||||||
|
"MD007",
|
||||||
|
"ul-indent"
|
||||||
|
],
|
||||||
"ruleDescription": "Unordered list indentation",
|
"ruleDescription": "Unordered list indentation",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md007",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md007",
|
||||||
"errorDetail": "Expected: 0; Actual: 1",
|
"errorDetail": "Expected: 0; Actual: 1",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [1, 3]
|
"errorRange": [
|
||||||
|
1,
|
||||||
|
3
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 1,
|
||||||
|
"deleteCount": 1,
|
||||||
|
"insertText": ""
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 13,
|
"lineNumber": 13,
|
||||||
"ruleNames": [ "MD007", "ul-indent" ],
|
"ruleNames": [
|
||||||
|
"MD007",
|
||||||
|
"ul-indent"
|
||||||
|
],
|
||||||
"ruleDescription": "Unordered list indentation",
|
"ruleDescription": "Unordered list indentation",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md007",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md007",
|
||||||
"errorDetail": "Expected: 0; Actual: 1",
|
"errorDetail": "Expected: 0; Actual: 1",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [1, 3]
|
"errorRange": [
|
||||||
|
1,
|
||||||
|
3
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 1,
|
||||||
|
"deleteCount": 1,
|
||||||
|
"insertText": ""
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 15,
|
"lineNumber": 15,
|
||||||
"ruleNames": [ "MD009", "no-trailing-spaces" ],
|
"ruleNames": [
|
||||||
|
"MD009",
|
||||||
|
"no-trailing-spaces"
|
||||||
|
],
|
||||||
"ruleDescription": "Trailing spaces",
|
"ruleDescription": "Trailing spaces",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md009",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md009",
|
||||||
"errorDetail": "Expected: 0 or 2; Actual: 1",
|
"errorDetail": "Expected: 0 or 2; Actual: 1",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [5, 1]
|
"errorRange": [
|
||||||
|
5,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 5,
|
||||||
|
"deleteCount": 1
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 17,
|
"lineNumber": 17,
|
||||||
"ruleNames": [ "MD010", "no-hard-tabs" ],
|
"ruleNames": [
|
||||||
|
"MD010",
|
||||||
|
"no-hard-tabs"
|
||||||
|
],
|
||||||
"ruleDescription": "Hard tabs",
|
"ruleDescription": "Hard tabs",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md010",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md010",
|
||||||
"errorDetail": "Column: 5",
|
"errorDetail": "Column: 5",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [5, 1]
|
"errorRange": [
|
||||||
|
5,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 5,
|
||||||
|
"deleteCount": 1,
|
||||||
|
"insertText": " "
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
@ -1,110 +1,226 @@
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"lineNumber": 5,
|
"lineNumber": 5,
|
||||||
"ruleNames": [ "MD011", "no-reversed-links" ],
|
"ruleNames": [
|
||||||
|
"MD011",
|
||||||
|
"no-reversed-links"
|
||||||
|
],
|
||||||
"ruleDescription": "Reversed link syntax",
|
"ruleDescription": "Reversed link syntax",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md011",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md011",
|
||||||
"errorDetail": "(reversed)[link]",
|
"errorDetail": "(reversed)[link]",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [3, 16]
|
"errorRange": [
|
||||||
|
3,
|
||||||
|
16
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 3,
|
||||||
|
"deleteCount": 16,
|
||||||
|
"insertText": "[reversed](link)"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 26,
|
"lineNumber": 26,
|
||||||
"ruleNames": [ "MD011", "no-reversed-links" ],
|
"ruleNames": [
|
||||||
|
"MD011",
|
||||||
|
"no-reversed-links"
|
||||||
|
],
|
||||||
"ruleDescription": "Reversed link syntax",
|
"ruleDescription": "Reversed link syntax",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md011",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md011",
|
||||||
"errorDetail": "(reversed)[link]",
|
"errorDetail": "(reversed)[link]",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [11, 16]
|
"errorRange": [
|
||||||
|
11,
|
||||||
|
16
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 11,
|
||||||
|
"deleteCount": 16,
|
||||||
|
"insertText": "[reversed](link)"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 7,
|
"lineNumber": 7,
|
||||||
"ruleNames": [ "MD012", "no-multiple-blanks" ],
|
"ruleNames": [
|
||||||
|
"MD012",
|
||||||
|
"no-multiple-blanks"
|
||||||
|
],
|
||||||
"ruleDescription": "Multiple consecutive blank lines",
|
"ruleDescription": "Multiple consecutive blank lines",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md012",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md012",
|
||||||
"errorDetail": "Expected: 1; Actual: 2",
|
"errorDetail": "Expected: 1; Actual: 2",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": null
|
"errorRange": null,
|
||||||
|
"fixInfo": {
|
||||||
|
"deleteCount": -1
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 8,
|
"lineNumber": 8,
|
||||||
"ruleNames": [ "MD013", "line-length" ],
|
"ruleNames": [
|
||||||
|
"MD013",
|
||||||
|
"line-length"
|
||||||
|
],
|
||||||
"ruleDescription": "Line length",
|
"ruleDescription": "Line length",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md013",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md013",
|
||||||
"errorDetail": "Expected: 80; Actual: 99",
|
"errorDetail": "Expected: 80; Actual: 99",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [81, 19]
|
"errorRange": [
|
||||||
|
81,
|
||||||
|
19
|
||||||
|
],
|
||||||
|
"fixInfo": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 10,
|
"lineNumber": 10,
|
||||||
"ruleNames": [ "MD013", "line-length" ],
|
"ruleNames": [
|
||||||
|
"MD013",
|
||||||
|
"line-length"
|
||||||
|
],
|
||||||
"ruleDescription": "Line length",
|
"ruleDescription": "Line length",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md013",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md013",
|
||||||
"errorDetail": "Expected: 40; Actual: 62",
|
"errorDetail": "Expected: 40; Actual: 62",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [41, 22]
|
"errorRange": [
|
||||||
|
41,
|
||||||
|
22
|
||||||
|
],
|
||||||
|
"fixInfo": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 12,
|
"lineNumber": 12,
|
||||||
"ruleNames": [ "MD014", "commands-show-output" ],
|
"ruleNames": [
|
||||||
|
"MD014",
|
||||||
|
"commands-show-output"
|
||||||
|
],
|
||||||
"ruleDescription": "Dollar signs used before commands without showing output",
|
"ruleDescription": "Dollar signs used before commands without showing output",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md014",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md014",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "$ command with no output",
|
"errorContext": "$ command with no output",
|
||||||
"errorRange": [5, 2]
|
"errorRange": [
|
||||||
|
5,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 5,
|
||||||
|
"deleteCount": 2
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 14,
|
"lineNumber": 14,
|
||||||
"ruleNames": [ "MD018", "no-missing-space-atx" ],
|
"ruleNames": [
|
||||||
|
"MD018",
|
||||||
|
"no-missing-space-atx"
|
||||||
|
],
|
||||||
"ruleDescription": "No space after hash on atx style heading",
|
"ruleDescription": "No space after hash on atx style heading",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md018",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md018",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "##No space A",
|
"errorContext": "##No space A",
|
||||||
"errorRange": [1, 3]
|
"errorRange": [
|
||||||
|
1,
|
||||||
|
3
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 3,
|
||||||
|
"insertText": " "
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 16,
|
"lineNumber": 16,
|
||||||
"ruleNames": [ "MD019", "no-multiple-space-atx" ],
|
"ruleNames": [
|
||||||
|
"MD019",
|
||||||
|
"no-multiple-space-atx"
|
||||||
|
],
|
||||||
"ruleDescription": "Multiple spaces after hash on atx style heading",
|
"ruleDescription": "Multiple spaces after hash on atx style heading",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md019",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md019",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "## Multiple spaces B",
|
"errorContext": "## Multiple spaces B",
|
||||||
"errorRange": [1, 5]
|
"errorRange": [
|
||||||
|
1,
|
||||||
|
5
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 3,
|
||||||
|
"deleteCount": 1
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 18,
|
"lineNumber": 18,
|
||||||
"ruleNames": [ "MD020", "no-missing-space-closed-atx" ],
|
"ruleNames": [
|
||||||
|
"MD020",
|
||||||
|
"no-missing-space-closed-atx"
|
||||||
|
],
|
||||||
"ruleDescription": "No space inside hashes on closed atx style heading",
|
"ruleDescription": "No space inside hashes on closed atx style heading",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md020",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md020",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "##No space C ##",
|
"errorContext": "##No space C ##",
|
||||||
"errorRange": [1, 3]
|
"errorRange": [
|
||||||
|
1,
|
||||||
|
3
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 1,
|
||||||
|
"deleteCount": 15,
|
||||||
|
"insertText": "## No space C ##"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 20,
|
"lineNumber": 20,
|
||||||
"ruleNames": [ "MD020", "no-missing-space-closed-atx" ],
|
"ruleNames": [
|
||||||
|
"MD020",
|
||||||
|
"no-missing-space-closed-atx"
|
||||||
|
],
|
||||||
"ruleDescription": "No space inside hashes on closed atx style heading",
|
"ruleDescription": "No space inside hashes on closed atx style heading",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md020",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md020",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "## No space D##",
|
"errorContext": "## No space D##",
|
||||||
"errorRange": [13, 3]
|
"errorRange": [
|
||||||
|
13,
|
||||||
|
3
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 1,
|
||||||
|
"deleteCount": 15,
|
||||||
|
"insertText": "## No space D ##"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 22,
|
"lineNumber": 22,
|
||||||
"ruleNames": [ "MD021", "no-multiple-space-closed-atx" ],
|
"ruleNames": [
|
||||||
|
"MD021",
|
||||||
|
"no-multiple-space-closed-atx"
|
||||||
|
],
|
||||||
"ruleDescription": "Multiple spaces inside hashes on closed atx style heading",
|
"ruleDescription": "Multiple spaces inside hashes on closed atx style heading",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md021",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md021",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "## Multiple spaces E ##",
|
"errorContext": "## Multiple spaces E ##",
|
||||||
"errorRange": [1, 5]
|
"errorRange": [
|
||||||
|
1,
|
||||||
|
5
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 1,
|
||||||
|
"deleteCount": 24,
|
||||||
|
"insertText": "## Multiple spaces E ##"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 24,
|
"lineNumber": 24,
|
||||||
"ruleNames": [ "MD021", "no-multiple-space-closed-atx" ],
|
"ruleNames": [
|
||||||
|
"MD021",
|
||||||
|
"no-multiple-space-closed-atx"
|
||||||
|
],
|
||||||
"ruleDescription": "Multiple spaces inside hashes on closed atx style heading",
|
"ruleDescription": "Multiple spaces inside hashes on closed atx style heading",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md021",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md021",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "## Multiple spaces F ##",
|
"errorContext": "## Multiple spaces F ##",
|
||||||
"errorRange": [20, 5]
|
"errorRange": [
|
||||||
|
20,
|
||||||
|
5
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 1,
|
||||||
|
"deleteCount": 24,
|
||||||
|
"insertText": "## Multiple spaces F ##"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
@ -1,110 +1,211 @@
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"lineNumber": 1,
|
"lineNumber": 1,
|
||||||
"ruleNames": [ "MD022", "blanks-around-headings", "blanks-around-headers" ],
|
"ruleNames": [
|
||||||
|
"MD022",
|
||||||
|
"blanks-around-headings",
|
||||||
|
"blanks-around-headers"
|
||||||
|
],
|
||||||
"ruleDescription": "Headings should be surrounded by blank lines",
|
"ruleDescription": "Headings should be surrounded by blank lines",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md022",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md022",
|
||||||
"errorDetail": "Expected: 1; Actual: 0; Below",
|
"errorDetail": "Expected: 1; Actual: 0; Below",
|
||||||
"errorContext": "# Heading",
|
"errorContext": "# Heading",
|
||||||
"errorRange": null
|
"errorRange": null,
|
||||||
|
"fixInfo": {
|
||||||
|
"lineNumber": 2,
|
||||||
|
"insertText": "\n"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 1,
|
"lineNumber": 1,
|
||||||
"ruleNames": [ "MD023", "heading-start-left", "header-start-left" ],
|
"ruleNames": [
|
||||||
|
"MD023",
|
||||||
|
"heading-start-left",
|
||||||
|
"header-start-left"
|
||||||
|
],
|
||||||
"ruleDescription": "Headings must start at the beginning of the line",
|
"ruleDescription": "Headings must start at the beginning of the line",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md023",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md023",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": " # Heading",
|
"errorContext": " # Heading",
|
||||||
"errorRange": [1, 2]
|
"errorRange": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 1,
|
||||||
|
"deleteCount": 1
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 4,
|
"lineNumber": 4,
|
||||||
"ruleNames": [ "MD024", "no-duplicate-heading", "no-duplicate-header" ],
|
"ruleNames": [
|
||||||
|
"MD024",
|
||||||
|
"no-duplicate-heading",
|
||||||
|
"no-duplicate-header"
|
||||||
|
],
|
||||||
"ruleDescription": "Multiple headings with the same content",
|
"ruleDescription": "Multiple headings with the same content",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md024",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md024",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "# Heading",
|
"errorContext": "# Heading",
|
||||||
"errorRange": null
|
"errorRange": null,
|
||||||
|
"fixInfo": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 4,
|
"lineNumber": 4,
|
||||||
"ruleNames": [ "MD025", "single-title", "single-h1" ],
|
"ruleNames": [
|
||||||
|
"MD025",
|
||||||
|
"single-title",
|
||||||
|
"single-h1"
|
||||||
|
],
|
||||||
"ruleDescription": "Multiple top-level headings in the same document",
|
"ruleDescription": "Multiple top-level headings in the same document",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md025",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md025",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "# Heading",
|
"errorContext": "# Heading",
|
||||||
"errorRange": null
|
"errorRange": null,
|
||||||
|
"fixInfo": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 6,
|
"lineNumber": 6,
|
||||||
"ruleNames": [ "MD026", "no-trailing-punctuation" ],
|
"ruleNames": [
|
||||||
|
"MD026",
|
||||||
|
"no-trailing-punctuation"
|
||||||
|
],
|
||||||
"ruleDescription": "Trailing punctuation in heading",
|
"ruleDescription": "Trailing punctuation in heading",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md026",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md026",
|
||||||
"errorDetail": "Punctuation: '.'",
|
"errorDetail": "Punctuation: '.'",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [19, 1]
|
"errorRange": [
|
||||||
|
19,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 19,
|
||||||
|
"deleteCount": 1
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 8,
|
"lineNumber": 8,
|
||||||
"ruleNames": [ "MD027", "no-multiple-space-blockquote" ],
|
"ruleNames": [
|
||||||
|
"MD027",
|
||||||
|
"no-multiple-space-blockquote"
|
||||||
|
],
|
||||||
"ruleDescription": "Multiple spaces after blockquote symbol",
|
"ruleDescription": "Multiple spaces after blockquote symbol",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md027",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md027",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "> Multiple spaces",
|
"errorContext": "> Multiple spaces",
|
||||||
"errorRange": [1, 4]
|
"errorRange": [
|
||||||
|
1,
|
||||||
|
4
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 2,
|
||||||
|
"deleteCount": 1
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 15,
|
"lineNumber": 15,
|
||||||
"ruleNames": [ "MD027", "no-multiple-space-blockquote" ],
|
"ruleNames": [
|
||||||
|
"MD027",
|
||||||
|
"no-multiple-space-blockquote"
|
||||||
|
],
|
||||||
"ruleDescription": "Multiple spaces after blockquote symbol",
|
"ruleDescription": "Multiple spaces after blockquote symbol",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md027",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md027",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "> > Multiple spaces, multiple...",
|
"errorContext": "> > Multiple spaces, multiple...",
|
||||||
"errorRange": [ 1, 6 ]
|
"errorRange": [
|
||||||
|
1,
|
||||||
|
6
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 4,
|
||||||
|
"deleteCount": 1
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 17,
|
"lineNumber": 17,
|
||||||
"ruleNames": [ "MD027", "no-multiple-space-blockquote" ],
|
"ruleNames": [
|
||||||
|
"MD027",
|
||||||
|
"no-multiple-space-blockquote"
|
||||||
|
],
|
||||||
"ruleDescription": "Multiple spaces after blockquote symbol",
|
"ruleDescription": "Multiple spaces after blockquote symbol",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md027",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md027",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "> > > Multiple spaces, multip...",
|
"errorContext": "> > > Multiple spaces, multip...",
|
||||||
"errorRange": [ 1, 8 ]
|
"errorRange": [
|
||||||
|
1,
|
||||||
|
8
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 6,
|
||||||
|
"deleteCount": 1
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 19,
|
"lineNumber": 19,
|
||||||
"ruleNames": [ "MD027", "no-multiple-space-blockquote" ],
|
"ruleNames": [
|
||||||
|
"MD027",
|
||||||
|
"no-multiple-space-blockquote"
|
||||||
|
],
|
||||||
"ruleDescription": "Multiple spaces after blockquote symbol",
|
"ruleDescription": "Multiple spaces after blockquote symbol",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md027",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md027",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "> > > Multiple spaces, multip...",
|
"errorContext": "> > > Multiple spaces, multip...",
|
||||||
"errorRange": [ 1, 4 ]
|
"errorRange": [
|
||||||
|
1,
|
||||||
|
4
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 2,
|
||||||
|
"deleteCount": 1
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 9,
|
"lineNumber": 9,
|
||||||
"ruleNames": [ "MD028", "no-blanks-blockquote" ],
|
"ruleNames": [
|
||||||
|
"MD028",
|
||||||
|
"no-blanks-blockquote"
|
||||||
|
],
|
||||||
"ruleDescription": "Blank line inside blockquote",
|
"ruleDescription": "Blank line inside blockquote",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md028",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md028",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": null
|
"errorRange": null,
|
||||||
|
"fixInfo": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 13,
|
"lineNumber": 13,
|
||||||
"ruleNames": [ "MD029", "ol-prefix" ],
|
"ruleNames": [
|
||||||
|
"MD029",
|
||||||
|
"ol-prefix"
|
||||||
|
],
|
||||||
"ruleDescription": "Ordered list item prefix",
|
"ruleDescription": "Ordered list item prefix",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md029",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md029",
|
||||||
"errorDetail": "Expected: 2; Actual: 3; Style: 1/2/3",
|
"errorDetail": "Expected: 2; Actual: 3; Style: 1/2/3",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [1, 4]
|
"errorRange": [
|
||||||
|
1,
|
||||||
|
4
|
||||||
|
],
|
||||||
|
"fixInfo": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 13,
|
"lineNumber": 13,
|
||||||
"ruleNames": [ "MD030", "list-marker-space" ],
|
"ruleNames": [
|
||||||
|
"MD030",
|
||||||
|
"list-marker-space"
|
||||||
|
],
|
||||||
"ruleDescription": "Spaces after list markers",
|
"ruleDescription": "Spaces after list markers",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md030",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md030",
|
||||||
"errorDetail": "Expected: 1; Actual: 2",
|
"errorDetail": "Expected: 1; Actual: 2",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [1, 4]
|
"errorRange": [
|
||||||
|
1,
|
||||||
|
4
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 3,
|
||||||
|
"deleteCount": 2,
|
||||||
|
"insertText": " "
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
@ -1,20 +1,42 @@
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"lineNumber": 19,
|
"lineNumber": 19,
|
||||||
"ruleNames": [ "MD030", "list-marker-space" ],
|
"ruleNames": [
|
||||||
|
"MD030",
|
||||||
|
"list-marker-space"
|
||||||
|
],
|
||||||
"ruleDescription": "Spaces after list markers",
|
"ruleDescription": "Spaces after list markers",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md030",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md030",
|
||||||
"errorDetail": "Expected: 1; Actual: 2",
|
"errorDetail": "Expected: 1; Actual: 2",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [1, 3]
|
"errorRange": [
|
||||||
|
1,
|
||||||
|
3
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 2,
|
||||||
|
"deleteCount": 2,
|
||||||
|
"insertText": " "
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 21,
|
"lineNumber": 21,
|
||||||
"ruleNames": [ "MD030", "list-marker-space" ],
|
"ruleNames": [
|
||||||
|
"MD030",
|
||||||
|
"list-marker-space"
|
||||||
|
],
|
||||||
"ruleDescription": "Spaces after list markers",
|
"ruleDescription": "Spaces after list markers",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md030",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md030",
|
||||||
"errorDetail": "Expected: 1; Actual: 2",
|
"errorDetail": "Expected: 1; Actual: 2",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [1, 4]
|
"errorRange": [
|
||||||
|
1,
|
||||||
|
4
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 3,
|
||||||
|
"deleteCount": 2,
|
||||||
|
"insertText": " "
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
@ -1,263 +1,585 @@
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"lineNumber": 3,
|
"lineNumber": 3,
|
||||||
"ruleNames": [ "MD031", "blanks-around-fences" ],
|
"ruleNames": [
|
||||||
|
"MD031",
|
||||||
|
"blanks-around-fences"
|
||||||
|
],
|
||||||
"ruleDescription": "Fenced code blocks should be surrounded by blank lines",
|
"ruleDescription": "Fenced code blocks should be surrounded by blank lines",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md031",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md031",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "```",
|
"errorContext": "```",
|
||||||
"errorRange": null
|
"errorRange": null,
|
||||||
|
"fixInfo": {
|
||||||
|
"lineNumber": 4,
|
||||||
|
"insertText": "\n"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 4,
|
"lineNumber": 4,
|
||||||
"ruleNames": [ "MD032", "blanks-around-lists" ],
|
"ruleNames": [
|
||||||
|
"MD032",
|
||||||
|
"blanks-around-lists"
|
||||||
|
],
|
||||||
"ruleDescription": "Lists should be surrounded by blank lines",
|
"ruleDescription": "Lists should be surrounded by blank lines",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md032",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md032",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "* List",
|
"errorContext": "* List",
|
||||||
"errorRange": null
|
"errorRange": null,
|
||||||
|
"fixInfo": {
|
||||||
|
"insertText": "\n"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 47,
|
"lineNumber": 47,
|
||||||
"ruleNames": [ "MD032", "blanks-around-lists" ],
|
"ruleNames": [
|
||||||
|
"MD032",
|
||||||
|
"blanks-around-lists"
|
||||||
|
],
|
||||||
"ruleDescription": "Lists should be surrounded by blank lines",
|
"ruleDescription": "Lists should be surrounded by blank lines",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md032",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md032",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "* List",
|
"errorContext": "* List",
|
||||||
"errorRange": null
|
"errorRange": null,
|
||||||
|
"fixInfo": {
|
||||||
|
"lineNumber": 48,
|
||||||
|
"insertText": "\n"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 6,
|
"lineNumber": 6,
|
||||||
"ruleNames": [ "MD033", "no-inline-html" ],
|
"ruleNames": [
|
||||||
|
"MD033",
|
||||||
|
"no-inline-html"
|
||||||
|
],
|
||||||
"ruleDescription": "Inline HTML",
|
"ruleDescription": "Inline HTML",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md033",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md033",
|
||||||
"errorDetail": "Element: hr",
|
"errorDetail": "Element: hr",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [ 7, 5 ]
|
"errorRange": [
|
||||||
|
7,
|
||||||
|
5
|
||||||
|
],
|
||||||
|
"fixInfo": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 8,
|
"lineNumber": 8,
|
||||||
"ruleNames": [ "MD034", "no-bare-urls" ],
|
"ruleNames": [
|
||||||
|
"MD034",
|
||||||
|
"no-bare-urls"
|
||||||
|
],
|
||||||
"ruleDescription": "Bare URL used",
|
"ruleDescription": "Bare URL used",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md034",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md034",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "https://example.com",
|
"errorContext": "https://example.com",
|
||||||
"errorRange": [ 6, 19 ]
|
"errorRange": [
|
||||||
|
6,
|
||||||
|
19
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 6,
|
||||||
|
"deleteCount": 19,
|
||||||
|
"insertText": "<https://example.com>"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 11,
|
"lineNumber": 11,
|
||||||
"ruleNames": [ "MD035", "hr-style" ],
|
"ruleNames": [
|
||||||
|
"MD035",
|
||||||
|
"hr-style"
|
||||||
|
],
|
||||||
"ruleDescription": "Horizontal rule style",
|
"ruleDescription": "Horizontal rule style",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md035",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md035",
|
||||||
"errorDetail": "Expected: ---; Actual: ***",
|
"errorDetail": "Expected: ---; Actual: ***",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": null
|
"errorRange": null,
|
||||||
|
"fixInfo": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 13,
|
"lineNumber": 13,
|
||||||
"ruleNames": [ "MD036", "no-emphasis-as-heading", "no-emphasis-as-header" ],
|
"ruleNames": [
|
||||||
|
"MD036",
|
||||||
|
"no-emphasis-as-heading",
|
||||||
|
"no-emphasis-as-header"
|
||||||
|
],
|
||||||
"ruleDescription": "Emphasis used instead of a heading",
|
"ruleDescription": "Emphasis used instead of a heading",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md036",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md036",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "Emphasis",
|
"errorContext": "Emphasis",
|
||||||
"errorRange": null
|
"errorRange": null,
|
||||||
|
"fixInfo": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 15,
|
"lineNumber": 15,
|
||||||
"ruleNames": [ "MD037", "no-space-in-emphasis" ],
|
"ruleNames": [
|
||||||
|
"MD037",
|
||||||
|
"no-space-in-emphasis"
|
||||||
|
],
|
||||||
"ruleDescription": "Spaces inside emphasis markers",
|
"ruleDescription": "Spaces inside emphasis markers",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md037",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md037",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "* inside *",
|
"errorContext": "* inside *",
|
||||||
"errorRange": [ 7, 10 ]
|
"errorRange": [
|
||||||
|
7,
|
||||||
|
10
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 7,
|
||||||
|
"deleteCount": 10,
|
||||||
|
"insertText": "*inside*"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 31,
|
"lineNumber": 31,
|
||||||
"ruleNames": [ "MD037", "no-space-in-emphasis" ],
|
"ruleNames": [
|
||||||
|
"MD037",
|
||||||
|
"no-space-in-emphasis"
|
||||||
|
],
|
||||||
"ruleDescription": "Spaces inside emphasis markers",
|
"ruleDescription": "Spaces inside emphasis markers",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md037",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md037",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "* some*",
|
"errorContext": "* some*",
|
||||||
"errorRange": [ 17, 7 ]
|
"errorRange": [
|
||||||
|
17,
|
||||||
|
7
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 17,
|
||||||
|
"deleteCount": 7,
|
||||||
|
"insertText": "*some*"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 32,
|
"lineNumber": 32,
|
||||||
"ruleNames": [ "MD037", "no-space-in-emphasis" ],
|
"ruleNames": [
|
||||||
|
"MD037",
|
||||||
|
"no-space-in-emphasis"
|
||||||
|
],
|
||||||
"ruleDescription": "Spaces inside emphasis markers",
|
"ruleDescription": "Spaces inside emphasis markers",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md037",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md037",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "*some *",
|
"errorContext": "*some *",
|
||||||
"errorRange": [ 17, 7 ]
|
"errorRange": [
|
||||||
|
17,
|
||||||
|
7
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 17,
|
||||||
|
"deleteCount": 7,
|
||||||
|
"insertText": "*some*"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 33,
|
"lineNumber": 33,
|
||||||
"ruleNames": [ "MD037", "no-space-in-emphasis" ],
|
"ruleNames": [
|
||||||
|
"MD037",
|
||||||
|
"no-space-in-emphasis"
|
||||||
|
],
|
||||||
"ruleDescription": "Spaces inside emphasis markers",
|
"ruleDescription": "Spaces inside emphasis markers",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md037",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md037",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "**some **",
|
"errorContext": "**some **",
|
||||||
"errorRange": [ 17, 9 ]
|
"errorRange": [
|
||||||
|
17,
|
||||||
|
9
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 17,
|
||||||
|
"deleteCount": 9,
|
||||||
|
"insertText": "**some**"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 34,
|
"lineNumber": 34,
|
||||||
"ruleNames": [ "MD037", "no-space-in-emphasis" ],
|
"ruleNames": [
|
||||||
|
"MD037",
|
||||||
|
"no-space-in-emphasis"
|
||||||
|
],
|
||||||
"ruleDescription": "Spaces inside emphasis markers",
|
"ruleDescription": "Spaces inside emphasis markers",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md037",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md037",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "_ some_",
|
"errorContext": "_ some_",
|
||||||
"errorRange": [ 17, 7 ]
|
"errorRange": [
|
||||||
|
17,
|
||||||
|
7
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 17,
|
||||||
|
"deleteCount": 7,
|
||||||
|
"insertText": "_some_"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 35,
|
"lineNumber": 35,
|
||||||
"ruleNames": [ "MD037", "no-space-in-emphasis" ],
|
"ruleNames": [
|
||||||
|
"MD037",
|
||||||
|
"no-space-in-emphasis"
|
||||||
|
],
|
||||||
"ruleDescription": "Spaces inside emphasis markers",
|
"ruleDescription": "Spaces inside emphasis markers",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md037",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md037",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "__ some __",
|
"errorContext": "__ some __",
|
||||||
"errorRange": [ 19, 10 ]
|
"errorRange": [
|
||||||
|
19,
|
||||||
|
10
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 19,
|
||||||
|
"deleteCount": 10,
|
||||||
|
"insertText": "__some__"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 62,
|
"lineNumber": 62,
|
||||||
"ruleNames": [ "MD037", "no-space-in-emphasis" ],
|
"ruleNames": [
|
||||||
|
"MD037",
|
||||||
|
"no-space-in-emphasis"
|
||||||
|
],
|
||||||
"ruleDescription": "Spaces inside emphasis markers",
|
"ruleDescription": "Spaces inside emphasis markers",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md037",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md037",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "* inside",
|
"errorContext": "* inside",
|
||||||
"errorRange": [ 7, 8 ]
|
"errorRange": [
|
||||||
|
7,
|
||||||
|
8
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 7,
|
||||||
|
"deleteCount": 8,
|
||||||
|
"insertText": "*inside"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 63,
|
"lineNumber": 63,
|
||||||
"ruleNames": [ "MD037", "no-space-in-emphasis" ],
|
"ruleNames": [
|
||||||
|
"MD037",
|
||||||
|
"no-space-in-emphasis"
|
||||||
|
],
|
||||||
"ruleDescription": "Spaces inside emphasis markers",
|
"ruleDescription": "Spaces inside emphasis markers",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md037",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md037",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "multi-line *",
|
"errorContext": "multi-line *",
|
||||||
"errorRange": [ 1, 12 ]
|
"errorRange": [
|
||||||
|
1,
|
||||||
|
12
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 1,
|
||||||
|
"deleteCount": 12,
|
||||||
|
"insertText": "multi-line*"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 17,
|
"lineNumber": 17,
|
||||||
"ruleNames": [ "MD038", "no-space-in-code" ],
|
"ruleNames": [
|
||||||
|
"MD038",
|
||||||
|
"no-space-in-code"
|
||||||
|
],
|
||||||
"ruleDescription": "Spaces inside code span elements",
|
"ruleDescription": "Spaces inside code span elements",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md038",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md038",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "` inside`",
|
"errorContext": "` inside`",
|
||||||
"errorRange": [ 7, 9 ]
|
"errorRange": [
|
||||||
|
7,
|
||||||
|
9
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 8,
|
||||||
|
"deleteCount": 7,
|
||||||
|
"insertText": "inside"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 24,
|
"lineNumber": 24,
|
||||||
"ruleNames": [ "MD038", "no-space-in-code" ],
|
"ruleNames": [
|
||||||
|
"MD038",
|
||||||
|
"no-space-in-code"
|
||||||
|
],
|
||||||
"ruleDescription": "Spaces inside code span elements",
|
"ruleDescription": "Spaces inside code span elements",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md038",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md038",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "`` inside``",
|
"errorContext": "`` inside``",
|
||||||
"errorRange": [ 7, 11 ]
|
"errorRange": [
|
||||||
|
7,
|
||||||
|
11
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 9,
|
||||||
|
"deleteCount": 7,
|
||||||
|
"insertText": "inside"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 25,
|
"lineNumber": 25,
|
||||||
"ruleNames": [ "MD038", "no-space-in-code" ],
|
"ruleNames": [
|
||||||
|
"MD038",
|
||||||
|
"no-space-in-code"
|
||||||
|
],
|
||||||
"ruleDescription": "Spaces inside code span elements",
|
"ruleDescription": "Spaces inside code span elements",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md038",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md038",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "` code`",
|
"errorContext": "` code`",
|
||||||
"errorRange": [ 19, 7 ]
|
"errorRange": [
|
||||||
|
19,
|
||||||
|
7
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 20,
|
||||||
|
"deleteCount": 5,
|
||||||
|
"insertText": "code"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 26,
|
"lineNumber": 26,
|
||||||
"ruleNames": [ "MD038", "no-space-in-code" ],
|
"ruleNames": [
|
||||||
|
"MD038",
|
||||||
|
"no-space-in-code"
|
||||||
|
],
|
||||||
"ruleDescription": "Spaces inside code span elements",
|
"ruleDescription": "Spaces inside code span elements",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md038",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md038",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "` elements`",
|
"errorContext": "` elements`",
|
||||||
"errorRange": [ 26, 11 ]
|
"errorRange": [
|
||||||
|
26,
|
||||||
|
11
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 27,
|
||||||
|
"deleteCount": 9,
|
||||||
|
"insertText": "elements"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 27,
|
"lineNumber": 27,
|
||||||
"ruleNames": [ "MD038", "no-space-in-code" ],
|
"ruleNames": [
|
||||||
|
"MD038",
|
||||||
|
"no-space-in-code"
|
||||||
|
],
|
||||||
"ruleDescription": "Spaces inside code span elements",
|
"ruleDescription": "Spaces inside code span elements",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md038",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md038",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "`` code``",
|
"errorContext": "`` code``",
|
||||||
"errorRange": [ 21, 9 ]
|
"errorRange": [
|
||||||
|
21,
|
||||||
|
9
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 23,
|
||||||
|
"deleteCount": 5,
|
||||||
|
"insertText": "code"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 28,
|
"lineNumber": 28,
|
||||||
"ruleNames": [ "MD038", "no-space-in-code" ],
|
"ruleNames": [
|
||||||
|
"MD038",
|
||||||
|
"no-space-in-code"
|
||||||
|
],
|
||||||
"ruleDescription": "Spaces inside code span elements",
|
"ruleDescription": "Spaces inside code span elements",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md038",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md038",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "`` ` embedded backtick``",
|
"errorContext": "`` ` embedded backtick``",
|
||||||
"errorRange": [ 1, 25 ]
|
"errorRange": [
|
||||||
|
1,
|
||||||
|
25
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 3,
|
||||||
|
"deleteCount": 21,
|
||||||
|
"insertText": " ` embedded backtick"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 29,
|
"lineNumber": 29,
|
||||||
"ruleNames": [ "MD038", "no-space-in-code" ],
|
"ruleNames": [
|
||||||
|
"MD038",
|
||||||
|
"no-space-in-code"
|
||||||
|
],
|
||||||
"ruleDescription": "Spaces inside code span elements",
|
"ruleDescription": "Spaces inside code span elements",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md038",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md038",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "``embedded backtick` ``",
|
"errorContext": "``embedded backtick` ``",
|
||||||
"errorRange": [ 1, 24 ]
|
"errorRange": [
|
||||||
|
1,
|
||||||
|
24
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 3,
|
||||||
|
"deleteCount": 20,
|
||||||
|
"insertText": "embedded backtick` "
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 38,
|
"lineNumber": 38,
|
||||||
"ruleNames": [ "MD038", "no-space-in-code" ],
|
"ruleNames": [
|
||||||
|
"MD038",
|
||||||
|
"no-space-in-code"
|
||||||
|
],
|
||||||
"ruleDescription": "Spaces inside code span elements",
|
"ruleDescription": "Spaces inside code span elements",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md038",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md038",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "` code",
|
"errorContext": "` code",
|
||||||
"errorRange": [ 6, 6 ]
|
"errorRange": [
|
||||||
|
6,
|
||||||
|
6
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 7,
|
||||||
|
"deleteCount": 5,
|
||||||
|
"insertText": "code"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 44,
|
"lineNumber": 44,
|
||||||
"ruleNames": [ "MD038", "no-space-in-code" ],
|
"ruleNames": [
|
||||||
|
"MD038",
|
||||||
|
"no-space-in-code"
|
||||||
|
],
|
||||||
"ruleDescription": "Spaces inside code span elements",
|
"ruleDescription": "Spaces inside code span elements",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md038",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md038",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "span `",
|
"errorContext": "span `",
|
||||||
"errorRange": [ 1, 7 ]
|
"errorRange": [
|
||||||
|
1,
|
||||||
|
7
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 1,
|
||||||
|
"deleteCount": 6,
|
||||||
|
"insertText": "span"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 53,
|
"lineNumber": 53,
|
||||||
"ruleNames": [ "MD038", "no-space-in-code" ],
|
"ruleNames": [
|
||||||
|
"MD038",
|
||||||
|
"no-space-in-code"
|
||||||
|
],
|
||||||
"ruleDescription": "Spaces inside code span elements",
|
"ruleDescription": "Spaces inside code span elements",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md038",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md038",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "span code ```",
|
"errorContext": "span code ```",
|
||||||
"errorRange": [ 1, 13 ]
|
"errorRange": [
|
||||||
|
1,
|
||||||
|
13
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 1,
|
||||||
|
"deleteCount": 10,
|
||||||
|
"insertText": "span code"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 55,
|
"lineNumber": 55,
|
||||||
"ruleNames": [ "MD038", "no-space-in-code" ],
|
"ruleNames": [
|
||||||
|
"MD038",
|
||||||
|
"no-space-in-code"
|
||||||
|
],
|
||||||
"ruleDescription": "Spaces inside code span elements",
|
"ruleDescription": "Spaces inside code span elements",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md038",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md038",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "```` code",
|
"errorContext": "```` code",
|
||||||
"errorRange": [ 11, 9 ]
|
"errorRange": [
|
||||||
|
11,
|
||||||
|
9
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 15,
|
||||||
|
"deleteCount": 5,
|
||||||
|
"insertText": "code"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 19,
|
"lineNumber": 19,
|
||||||
"ruleNames": [ "MD039", "no-space-in-links" ],
|
"ruleNames": [
|
||||||
|
"MD039",
|
||||||
|
"no-space-in-links"
|
||||||
|
],
|
||||||
"ruleDescription": "Spaces inside link text",
|
"ruleDescription": "Spaces inside link text",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md039",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md039",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "[ inside ]",
|
"errorContext": "[ inside ]",
|
||||||
"errorRange": [ 7, 10 ]
|
"errorRange": [
|
||||||
|
7,
|
||||||
|
10
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 8,
|
||||||
|
"deleteCount": 8,
|
||||||
|
"insertText": "inside"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 60,
|
"lineNumber": 60,
|
||||||
"ruleNames": [ "MD039", "no-space-in-links" ],
|
"ruleNames": [
|
||||||
|
"MD039",
|
||||||
|
"no-space-in-links"
|
||||||
|
],
|
||||||
"ruleDescription": "Spaces inside link text",
|
"ruleDescription": "Spaces inside link text",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md039",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md039",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "[ space]",
|
"errorContext": "[ space]",
|
||||||
"errorRange": [ 6, 8 ]
|
"errorRange": [
|
||||||
|
6,
|
||||||
|
8
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 7,
|
||||||
|
"deleteCount": 6,
|
||||||
|
"insertText": "space"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"lineNumber": 60,
|
||||||
|
"ruleNames": [
|
||||||
|
"MD039",
|
||||||
|
"no-space-in-links"
|
||||||
|
],
|
||||||
|
"ruleDescription": "Spaces inside link text",
|
||||||
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md039",
|
||||||
|
"errorDetail": null,
|
||||||
|
"errorContext": "[space ]",
|
||||||
|
"errorRange": [
|
||||||
|
26,
|
||||||
|
8
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 27,
|
||||||
|
"deleteCount": 6,
|
||||||
|
"insertText": "space"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"lineNumber": 60,
|
||||||
|
"ruleNames": [
|
||||||
|
"MD039",
|
||||||
|
"no-space-in-links"
|
||||||
|
],
|
||||||
|
"ruleDescription": "Spaces inside link text",
|
||||||
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md039",
|
||||||
|
"errorDetail": null,
|
||||||
|
"errorContext": "[ space ]",
|
||||||
|
"errorRange": [
|
||||||
|
46,
|
||||||
|
9
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 47,
|
||||||
|
"deleteCount": 7,
|
||||||
|
"insertText": "space"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 21,
|
"lineNumber": 21,
|
||||||
"ruleNames": [ "MD040", "fenced-code-language" ],
|
"ruleNames": [
|
||||||
|
"MD040",
|
||||||
|
"fenced-code-language"
|
||||||
|
],
|
||||||
"ruleDescription": "Fenced code blocks should have a language specified",
|
"ruleDescription": "Fenced code blocks should have a language specified",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md040",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md040",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "```",
|
"errorContext": "```",
|
||||||
"errorRange": null
|
"errorRange": null,
|
||||||
|
"fixInfo": null
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
@ -1,119 +1,212 @@
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"lineNumber": 1,
|
"lineNumber": 1,
|
||||||
"ruleNames": [ "MD041", "first-line-heading", "first-line-h1" ],
|
"ruleNames": [
|
||||||
|
"MD041",
|
||||||
|
"first-line-heading",
|
||||||
|
"first-line-h1"
|
||||||
|
],
|
||||||
"ruleDescription": "First line in a file should be a top-level heading",
|
"ruleDescription": "First line in a file should be a top-level heading",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md041",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md041",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "Not a heading",
|
"errorContext": "Not a heading",
|
||||||
"errorRange": null
|
"errorRange": null,
|
||||||
|
"fixInfo": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 3,
|
"lineNumber": 3,
|
||||||
"ruleNames": [ "MD042", "no-empty-links" ],
|
"ruleNames": [
|
||||||
|
"MD042",
|
||||||
|
"no-empty-links"
|
||||||
|
],
|
||||||
"ruleDescription": "No empty links",
|
"ruleDescription": "No empty links",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md042",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md042",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "[empty]()",
|
"errorContext": "[empty]()",
|
||||||
"errorRange": [4, 9]
|
"errorRange": [
|
||||||
|
4,
|
||||||
|
9
|
||||||
|
],
|
||||||
|
"fixInfo": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 5,
|
"lineNumber": 5,
|
||||||
"ruleNames": [ "MD042", "no-empty-links" ],
|
"ruleNames": [
|
||||||
|
"MD042",
|
||||||
|
"no-empty-links"
|
||||||
|
],
|
||||||
"ruleDescription": "No empty links",
|
"ruleDescription": "No empty links",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md042",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md042",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "[empty]()",
|
"errorContext": "[empty]()",
|
||||||
"errorRange": [4, 10]
|
"errorRange": [
|
||||||
|
4,
|
||||||
|
10
|
||||||
|
],
|
||||||
|
"fixInfo": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 7,
|
"lineNumber": 7,
|
||||||
"ruleNames": [ "MD042", "no-empty-links" ],
|
"ruleNames": [
|
||||||
|
"MD042",
|
||||||
|
"no-empty-links"
|
||||||
|
],
|
||||||
"ruleDescription": "No empty links",
|
"ruleDescription": "No empty links",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md042",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md042",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "[empty]()",
|
"errorContext": "[empty]()",
|
||||||
"errorRange": [4, 11]
|
"errorRange": [
|
||||||
|
4,
|
||||||
|
11
|
||||||
|
],
|
||||||
|
"fixInfo": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 17,
|
"lineNumber": 17,
|
||||||
"ruleNames": [ "MD042", "no-empty-links" ],
|
"ruleNames": [
|
||||||
|
"MD042",
|
||||||
|
"no-empty-links"
|
||||||
|
],
|
||||||
"ruleDescription": "No empty links",
|
"ruleDescription": "No empty links",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md042",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md042",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "[empty one]()",
|
"errorContext": "[empty one]()",
|
||||||
"errorRange": [25, 13]
|
"errorRange": [
|
||||||
|
25,
|
||||||
|
13
|
||||||
|
],
|
||||||
|
"fixInfo": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 31,
|
"lineNumber": 31,
|
||||||
"ruleNames": [ "MD043", "required-headings", "required-headers" ],
|
"ruleNames": [
|
||||||
|
"MD043",
|
||||||
|
"required-headings",
|
||||||
|
"required-headers"
|
||||||
|
],
|
||||||
"ruleDescription": "Required heading structure",
|
"ruleDescription": "Required heading structure",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md043",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md043",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "# Heading",
|
"errorContext": "# Heading",
|
||||||
"errorRange": null
|
"errorRange": null,
|
||||||
|
"fixInfo": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 9,
|
"lineNumber": 9,
|
||||||
"ruleNames": [ "MD044", "proper-names" ],
|
"ruleNames": [
|
||||||
|
"MD044",
|
||||||
|
"proper-names"
|
||||||
|
],
|
||||||
"ruleDescription": "Proper names should have the correct capitalization",
|
"ruleDescription": "Proper names should have the correct capitalization",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md044",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md044",
|
||||||
"errorDetail": "Expected: markdownlint; Actual: MARKDOWNLINT",
|
"errorDetail": "Expected: markdownlint; Actual: MARKDOWNLINT",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [29, 12]
|
"errorRange": [
|
||||||
|
29,
|
||||||
|
12
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 29,
|
||||||
|
"deleteCount": 12,
|
||||||
|
"insertText": "markdownlint"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 12,
|
"lineNumber": 12,
|
||||||
"ruleNames": [ "MD044", "proper-names" ],
|
"ruleNames": [
|
||||||
|
"MD044",
|
||||||
|
"proper-names"
|
||||||
|
],
|
||||||
"ruleDescription": "Proper names should have the correct capitalization",
|
"ruleDescription": "Proper names should have the correct capitalization",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md044",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md044",
|
||||||
"errorDetail": "Expected: markdownlint; Actual: Markdownlint",
|
"errorDetail": "Expected: markdownlint; Actual: Markdownlint",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [7, 12]
|
"errorRange": [
|
||||||
|
7,
|
||||||
|
12
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 7,
|
||||||
|
"deleteCount": 12,
|
||||||
|
"insertText": "markdownlint"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 15,
|
"lineNumber": 15,
|
||||||
"ruleNames": [ "MD044", "proper-names" ],
|
"ruleNames": [
|
||||||
|
"MD044",
|
||||||
|
"proper-names"
|
||||||
|
],
|
||||||
"ruleDescription": "Proper names should have the correct capitalization",
|
"ruleDescription": "Proper names should have the correct capitalization",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md044",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md044",
|
||||||
"errorDetail": "Expected: markdownlint; Actual: MarkDownLint",
|
"errorDetail": "Expected: markdownlint; Actual: MarkDownLint",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [1, 12]
|
"errorRange": [
|
||||||
|
1,
|
||||||
|
12
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 1,
|
||||||
|
"deleteCount": 12,
|
||||||
|
"insertText": "markdownlint"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 19,
|
"lineNumber": 19,
|
||||||
"ruleNames": [ "MD045", "no-alt-text" ],
|
"ruleNames": [
|
||||||
|
"MD045",
|
||||||
|
"no-alt-text"
|
||||||
|
],
|
||||||
"ruleDescription": "Images should have alternate text (alt text)",
|
"ruleDescription": "Images should have alternate text (alt text)",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md045",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md045",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": null
|
"errorRange": null,
|
||||||
|
"fixInfo": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 25,
|
"lineNumber": 25,
|
||||||
"ruleNames": [ "MD046", "code-block-style" ],
|
"ruleNames": [
|
||||||
|
"MD046",
|
||||||
|
"code-block-style"
|
||||||
|
],
|
||||||
"ruleDescription": "Code block style",
|
"ruleDescription": "Code block style",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md046",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md046",
|
||||||
"errorDetail": "Expected: fenced; Actual: indented",
|
"errorDetail": "Expected: fenced; Actual: indented",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": null
|
"errorRange": null,
|
||||||
|
"fixInfo": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 31,
|
"lineNumber": 31,
|
||||||
"ruleNames": [ "MD047", "single-trailing-newline" ],
|
"ruleNames": [
|
||||||
|
"MD047",
|
||||||
|
"single-trailing-newline"
|
||||||
|
],
|
||||||
"ruleDescription": "Files should end with a single newline character",
|
"ruleDescription": "Files should end with a single newline character",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md047",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md047",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [ 25, 1 ]
|
"errorRange": [
|
||||||
|
25,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 26,
|
||||||
|
"insertText": "\n"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 27,
|
"lineNumber": 27,
|
||||||
"ruleNames": [ "MD048", "code-fence-style" ],
|
"ruleNames": [
|
||||||
|
"MD048",
|
||||||
|
"code-fence-style"
|
||||||
|
],
|
||||||
"ruleDescription": "Code fence style",
|
"ruleDescription": "Code fence style",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md048",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md048",
|
||||||
"errorDetail": "Expected: backtick; Actual: tilde",
|
"errorDetail": "Expected: backtick; Actual: tilde",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": null
|
"errorRange": null,
|
||||||
|
"fixInfo": null
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
@ -12,7 +12,12 @@
|
||||||
"errorRange": [
|
"errorRange": [
|
||||||
15,
|
15,
|
||||||
19
|
19
|
||||||
]
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 15,
|
||||||
|
"deleteCount": 19,
|
||||||
|
"insertText": "<https://example.com>"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 5,
|
"lineNumber": 5,
|
||||||
|
|
@ -27,7 +32,12 @@
|
||||||
"errorRange": [
|
"errorRange": [
|
||||||
15,
|
15,
|
||||||
20
|
20
|
||||||
]
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 15,
|
||||||
|
"deleteCount": 20,
|
||||||
|
"insertText": "<https://example.com/>"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 7,
|
"lineNumber": 7,
|
||||||
|
|
@ -42,7 +52,12 @@
|
||||||
"errorRange": [
|
"errorRange": [
|
||||||
15,
|
15,
|
||||||
38
|
38
|
||||||
]
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 15,
|
||||||
|
"deleteCount": 38,
|
||||||
|
"insertText": "<https://example.com/?query=string#hash>"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 9,
|
"lineNumber": 9,
|
||||||
|
|
@ -57,7 +72,12 @@
|
||||||
"errorRange": [
|
"errorRange": [
|
||||||
15,
|
15,
|
||||||
28
|
28
|
||||||
]
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 15,
|
||||||
|
"deleteCount": 28,
|
||||||
|
"insertText": "<https://example.com/info.htm>"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 11,
|
"lineNumber": 11,
|
||||||
|
|
@ -72,7 +92,12 @@
|
||||||
"errorRange": [
|
"errorRange": [
|
||||||
7,
|
7,
|
||||||
19
|
19
|
||||||
]
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 7,
|
||||||
|
"deleteCount": 19,
|
||||||
|
"insertText": "<https://example.com>"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 13,
|
"lineNumber": 13,
|
||||||
|
|
@ -87,6 +112,11 @@
|
||||||
"errorRange": [
|
"errorRange": [
|
||||||
11,
|
11,
|
||||||
19
|
19
|
||||||
]
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 11,
|
||||||
|
"deleteCount": 19,
|
||||||
|
"insertText": "<https://example.com>"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
@ -1,20 +1,36 @@
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"lineNumber": 8,
|
"lineNumber": 8,
|
||||||
"ruleNames": [ "MD022", "blanks-around-headings", "blanks-around-headers" ],
|
"ruleNames": [
|
||||||
|
"MD022",
|
||||||
|
"blanks-around-headings",
|
||||||
|
"blanks-around-headers"
|
||||||
|
],
|
||||||
"ruleDescription": "Headings should be surrounded by blank lines",
|
"ruleDescription": "Headings should be surrounded by blank lines",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md022",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md022",
|
||||||
"errorDetail": "Expected: 2; Actual: 1; Below",
|
"errorDetail": "Expected: 2; Actual: 1; Below",
|
||||||
"errorContext": "## Banana",
|
"errorContext": "## Banana",
|
||||||
"errorRange": null
|
"errorRange": null,
|
||||||
|
"fixInfo": {
|
||||||
|
"lineNumber": 9,
|
||||||
|
"insertText": "\n"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 21,
|
"lineNumber": 21,
|
||||||
"ruleNames": [ "MD022", "blanks-around-headings", "blanks-around-headers" ],
|
"ruleNames": [
|
||||||
|
"MD022",
|
||||||
|
"blanks-around-headings",
|
||||||
|
"blanks-around-headers"
|
||||||
|
],
|
||||||
"ruleDescription": "Headings should be surrounded by blank lines",
|
"ruleDescription": "Headings should be surrounded by blank lines",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md022",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md022",
|
||||||
"errorDetail": "Expected: 2; Actual: 0; Below",
|
"errorDetail": "Expected: 2; Actual: 0; Below",
|
||||||
"errorContext": "Elderberry",
|
"errorContext": "Elderberry",
|
||||||
"errorRange": null
|
"errorRange": null,
|
||||||
|
"fixInfo": {
|
||||||
|
"lineNumber": 23,
|
||||||
|
"insertText": "\n\n"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
@ -1,20 +1,34 @@
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"lineNumber": 19,
|
"lineNumber": 19,
|
||||||
"ruleNames": [ "MD022", "blanks-around-headings", "blanks-around-headers" ],
|
"ruleNames": [
|
||||||
|
"MD022",
|
||||||
|
"blanks-around-headings",
|
||||||
|
"blanks-around-headers"
|
||||||
|
],
|
||||||
"ruleDescription": "Headings should be surrounded by blank lines",
|
"ruleDescription": "Headings should be surrounded by blank lines",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md022",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md022",
|
||||||
"errorDetail": "Expected: 3; Actual: 2; Above",
|
"errorDetail": "Expected: 3; Actual: 2; Above",
|
||||||
"errorContext": "## Durian ##",
|
"errorContext": "## Durian ##",
|
||||||
"errorRange": null
|
"errorRange": null,
|
||||||
|
"fixInfo": {
|
||||||
|
"insertText": "\n"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 22,
|
"lineNumber": 22,
|
||||||
"ruleNames": [ "MD022", "blanks-around-headings", "blanks-around-headers" ],
|
"ruleNames": [
|
||||||
|
"MD022",
|
||||||
|
"blanks-around-headings",
|
||||||
|
"blanks-around-headers"
|
||||||
|
],
|
||||||
"ruleDescription": "Headings should be surrounded by blank lines",
|
"ruleDescription": "Headings should be surrounded by blank lines",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md022",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md022",
|
||||||
"errorDetail": "Expected: 3; Actual: 1; Above",
|
"errorDetail": "Expected: 3; Actual: 1; Above",
|
||||||
"errorContext": "Elderberry",
|
"errorContext": "Elderberry",
|
||||||
"errorRange": null
|
"errorRange": null,
|
||||||
|
"fixInfo": {
|
||||||
|
"insertText": "\n\n"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
@ -1,29 +1,68 @@
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"lineNumber": 7,
|
"lineNumber": 7,
|
||||||
"ruleNames": [ "MD022", "blanks-around-headings", "blanks-around-headers" ],
|
"ruleNames": [
|
||||||
|
"MD022",
|
||||||
|
"blanks-around-headings",
|
||||||
|
"blanks-around-headers"
|
||||||
|
],
|
||||||
"ruleDescription": "Headings should be surrounded by blank lines",
|
"ruleDescription": "Headings should be surrounded by blank lines",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md022",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md022",
|
||||||
"errorDetail": "Expected: 1; Actual: 0; Below",
|
"errorDetail": "Expected: 1; Actual: 0; Below",
|
||||||
"errorContext": "## Banana",
|
"errorContext": "## Banana",
|
||||||
"errorRange": null
|
"errorRange": null,
|
||||||
|
"fixInfo": {
|
||||||
|
"lineNumber": 8,
|
||||||
|
"insertText": "\n"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 13,
|
"lineNumber": 13,
|
||||||
"ruleNames": [ "MD022", "blanks-around-headings", "blanks-around-headers" ],
|
"ruleNames": [
|
||||||
|
"MD022",
|
||||||
|
"blanks-around-headings",
|
||||||
|
"blanks-around-headers"
|
||||||
|
],
|
||||||
"ruleDescription": "Headings should be surrounded by blank lines",
|
"ruleDescription": "Headings should be surrounded by blank lines",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md022",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md022",
|
||||||
"errorDetail": "Expected: 1; Actual: 0; Above",
|
"errorDetail": "Expected: 1; Actual: 0; Above",
|
||||||
"errorContext": "## Durian ##",
|
"errorContext": "## Durian ##",
|
||||||
"errorRange": null
|
"errorRange": null,
|
||||||
|
"fixInfo": {
|
||||||
|
"insertText": "\n"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 18,
|
"lineNumber": 18,
|
||||||
"ruleNames": [ "MD022", "blanks-around-headings", "blanks-around-headers" ],
|
"ruleNames": [
|
||||||
|
"MD022",
|
||||||
|
"blanks-around-headings",
|
||||||
|
"blanks-around-headers"
|
||||||
|
],
|
||||||
"ruleDescription": "Headings should be surrounded by blank lines",
|
"ruleDescription": "Headings should be surrounded by blank lines",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md022",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md022",
|
||||||
"errorDetail": "Expected: 1; Actual: 0; Above",
|
"errorDetail": "Expected: 1; Actual: 0; Above",
|
||||||
"errorContext": "Elderberry",
|
"errorContext": "Elderberry",
|
||||||
"errorRange": null
|
"errorRange": null,
|
||||||
|
"fixInfo": {
|
||||||
|
"insertText": "\n"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"lineNumber": 18,
|
||||||
|
"ruleNames": [
|
||||||
|
"MD022",
|
||||||
|
"blanks-around-headings",
|
||||||
|
"blanks-around-headers"
|
||||||
|
],
|
||||||
|
"ruleDescription": "Headings should be surrounded by blank lines",
|
||||||
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md022",
|
||||||
|
"errorDetail": "Expected: 1; Actual: 0; Below",
|
||||||
|
"errorContext": "Elderberry",
|
||||||
|
"errorRange": null,
|
||||||
|
"fixInfo": {
|
||||||
|
"lineNumber": 20,
|
||||||
|
"insertText": "\n"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
@ -9,7 +9,11 @@
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md031",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md031",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "```markdown",
|
"errorContext": "```markdown",
|
||||||
"errorRange": null
|
"errorRange": null,
|
||||||
|
"fixInfo": {
|
||||||
|
"lineNumber": 4,
|
||||||
|
"insertText": "\n"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 6,
|
"lineNumber": 6,
|
||||||
|
|
@ -21,7 +25,11 @@
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md031",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md031",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "```",
|
"errorContext": "```",
|
||||||
"errorRange": null
|
"errorRange": null,
|
||||||
|
"fixInfo": {
|
||||||
|
"lineNumber": 7,
|
||||||
|
"insertText": "\n"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 10,
|
"lineNumber": 10,
|
||||||
|
|
@ -33,7 +41,11 @@
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md031",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md031",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "> ```markdown",
|
"errorContext": "> ```markdown",
|
||||||
"errorRange": null
|
"errorRange": null,
|
||||||
|
"fixInfo": {
|
||||||
|
"lineNumber": 10,
|
||||||
|
"insertText": ">\n"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 12,
|
"lineNumber": 12,
|
||||||
|
|
@ -45,7 +57,11 @@
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md031",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md031",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "> ```",
|
"errorContext": "> ```",
|
||||||
"errorRange": null
|
"errorRange": null,
|
||||||
|
"fixInfo": {
|
||||||
|
"lineNumber": 13,
|
||||||
|
"insertText": ">\n"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 15,
|
"lineNumber": 15,
|
||||||
|
|
@ -57,7 +73,11 @@
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md031",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md031",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "> > ```markdown",
|
"errorContext": "> > ```markdown",
|
||||||
"errorRange": null
|
"errorRange": null,
|
||||||
|
"fixInfo": {
|
||||||
|
"lineNumber": 15,
|
||||||
|
"insertText": "> >\n"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 17,
|
"lineNumber": 17,
|
||||||
|
|
@ -69,6 +89,10 @@
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md031",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md031",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "> > ```",
|
"errorContext": "> > ```",
|
||||||
"errorRange": null
|
"errorRange": null,
|
||||||
|
"fixInfo": {
|
||||||
|
"lineNumber": 18,
|
||||||
|
"insertText": "> >\n"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
4
test/detailed-results-default-spaces-MD010.json
Normal file
4
test/detailed-results-default-spaces-MD010.json
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"MD009": false,
|
||||||
|
"MD041": false
|
||||||
|
}
|
||||||
3
test/detailed-results-default-spaces-MD010.md
Normal file
3
test/detailed-results-default-spaces-MD010.md
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
text
|
||||||
|
text and text 2
|
||||||
|
texts with trailing spaces
|
||||||
3
test/detailed-results-default-spaces-MD010.md.fixed
Normal file
3
test/detailed-results-default-spaces-MD010.md.fixed
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
text
|
||||||
|
text and text 2
|
||||||
|
texts with trailing spaces
|
||||||
62
test/detailed-results-default-spaces-MD010.results.json
Normal file
62
test/detailed-results-default-spaces-MD010.results.json
Normal file
|
|
@ -0,0 +1,62 @@
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"lineNumber": 1,
|
||||||
|
"ruleNames": [
|
||||||
|
"MD010",
|
||||||
|
"no-hard-tabs"
|
||||||
|
],
|
||||||
|
"ruleDescription": "Hard tabs",
|
||||||
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md010",
|
||||||
|
"errorDetail": "Column: 1",
|
||||||
|
"errorContext": null,
|
||||||
|
"errorRange": [
|
||||||
|
1,
|
||||||
|
13
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 1,
|
||||||
|
"deleteCount": 13,
|
||||||
|
"insertText": " "
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"lineNumber": 2,
|
||||||
|
"ruleNames": [
|
||||||
|
"MD010",
|
||||||
|
"no-hard-tabs"
|
||||||
|
],
|
||||||
|
"ruleDescription": "Hard tabs",
|
||||||
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md010",
|
||||||
|
"errorDetail": "Column: 5",
|
||||||
|
"errorContext": null,
|
||||||
|
"errorRange": [
|
||||||
|
5,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 5,
|
||||||
|
"deleteCount": 2,
|
||||||
|
"insertText": " "
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"lineNumber": 3,
|
||||||
|
"ruleNames": [
|
||||||
|
"MD010",
|
||||||
|
"no-hard-tabs"
|
||||||
|
],
|
||||||
|
"ruleDescription": "Hard tabs",
|
||||||
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md010",
|
||||||
|
"errorDetail": "Column: 27",
|
||||||
|
"errorContext": null,
|
||||||
|
"errorRange": [
|
||||||
|
27,
|
||||||
|
3
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 27,
|
||||||
|
"deleteCount": 3,
|
||||||
|
"insertText": " "
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
@ -1,47 +1,93 @@
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"lineNumber": 6,
|
"lineNumber": 6,
|
||||||
"ruleNames": [ "MD009", "no-trailing-spaces" ],
|
"ruleNames": [
|
||||||
|
"MD009",
|
||||||
|
"no-trailing-spaces"
|
||||||
|
],
|
||||||
"ruleDescription": "Trailing spaces",
|
"ruleDescription": "Trailing spaces",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md009",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md009",
|
||||||
"errorDetail": "Expected: 0 or 2; Actual: 3",
|
"errorDetail": "Expected: 0 or 2; Actual: 3",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [ 15, 3 ]
|
"errorRange": [
|
||||||
|
15,
|
||||||
|
3
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 15,
|
||||||
|
"deleteCount": 3
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 5,
|
"lineNumber": 5,
|
||||||
"ruleNames": [ "MD022", "blanks-around-headings", "blanks-around-headers" ],
|
"ruleNames": [
|
||||||
|
"MD022",
|
||||||
|
"blanks-around-headings",
|
||||||
|
"blanks-around-headers"
|
||||||
|
],
|
||||||
"ruleDescription": "Headings should be surrounded by blank lines",
|
"ruleDescription": "Headings should be surrounded by blank lines",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md022",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md022",
|
||||||
"errorDetail": "Expected: 1; Actual: 0; Below",
|
"errorDetail": "Expected: 1; Actual: 0; Below",
|
||||||
"errorContext": "# Fixing with Front Matter",
|
"errorContext": "# Fixing with Front Matter",
|
||||||
"errorRange": null
|
"errorRange": null,
|
||||||
|
"fixInfo": {
|
||||||
|
"lineNumber": 6,
|
||||||
|
"insertText": "\n"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 9,
|
"lineNumber": 9,
|
||||||
"ruleNames": [ "MD022", "blanks-around-headings", "blanks-around-headers" ],
|
"ruleNames": [
|
||||||
|
"MD022",
|
||||||
|
"blanks-around-headings",
|
||||||
|
"blanks-around-headers"
|
||||||
|
],
|
||||||
"ruleDescription": "Headings should be surrounded by blank lines",
|
"ruleDescription": "Headings should be surrounded by blank lines",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md022",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md022",
|
||||||
"errorDetail": "Expected: 1; Actual: 0; Above",
|
"errorDetail": "Expected: 1; Actual: 0; Above",
|
||||||
"errorContext": "## Nested Heading",
|
"errorContext": "## Nested Heading",
|
||||||
"errorRange": null
|
"errorRange": null,
|
||||||
|
"fixInfo": {
|
||||||
|
"insertText": "\n"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 8,
|
"lineNumber": 8,
|
||||||
"ruleNames": [ "MD039", "no-space-in-links" ],
|
"ruleNames": [
|
||||||
|
"MD039",
|
||||||
|
"no-space-in-links"
|
||||||
|
],
|
||||||
"ruleDescription": "Spaces inside link text",
|
"ruleDescription": "Spaces inside link text",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md039",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md039",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "[ link ]",
|
"errorContext": "[ link ]",
|
||||||
"errorRange": [ 6, 8 ]
|
"errorRange": [
|
||||||
|
6,
|
||||||
|
8
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 7,
|
||||||
|
"deleteCount": 6,
|
||||||
|
"insertText": "link"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 11,
|
"lineNumber": 11,
|
||||||
"ruleNames": [ "MD047", "single-trailing-newline" ],
|
"ruleNames": [
|
||||||
|
"MD047",
|
||||||
|
"single-trailing-newline"
|
||||||
|
],
|
||||||
"ruleDescription": "Files should end with a single newline character",
|
"ruleDescription": "Files should end with a single newline character",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md047",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md047",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [ 4, 1 ]
|
"errorRange": [
|
||||||
|
4,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 5,
|
||||||
|
"insertText": "\n"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
@ -1,20 +1,35 @@
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"lineNumber": 6,
|
"lineNumber": 6,
|
||||||
"ruleNames": [ "MD009", "no-trailing-spaces" ],
|
"ruleNames": [
|
||||||
|
"MD009",
|
||||||
|
"no-trailing-spaces"
|
||||||
|
],
|
||||||
"ruleDescription": "Trailing spaces",
|
"ruleDescription": "Trailing spaces",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md009",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md009",
|
||||||
"errorDetail": "Expected: 0; Actual: 1",
|
"errorDetail": "Expected: 0; Actual: 1",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [5, 1]
|
"errorRange": [
|
||||||
|
5,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 5,
|
||||||
|
"deleteCount": 1
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 4,
|
"lineNumber": 4,
|
||||||
"ruleNames": [ "MD041", "first-line-heading", "first-line-h1" ],
|
"ruleNames": [
|
||||||
|
"MD041",
|
||||||
|
"first-line-heading",
|
||||||
|
"first-line-h1"
|
||||||
|
],
|
||||||
"ruleDescription": "First line in a file should be a top-level heading",
|
"ruleDescription": "First line in a file should be a top-level heading",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md041",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md041",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "Text",
|
"errorContext": "Text",
|
||||||
"errorRange": null
|
"errorRange": null,
|
||||||
|
"fixInfo": null
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
@ -1,173 +1,322 @@
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"lineNumber": 5,
|
"lineNumber": 5,
|
||||||
"ruleNames": [ "MD033", "no-inline-html" ],
|
"ruleNames": [
|
||||||
|
"MD033",
|
||||||
|
"no-inline-html"
|
||||||
|
],
|
||||||
"ruleDescription": "Inline HTML",
|
"ruleDescription": "Inline HTML",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md033",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md033",
|
||||||
"errorDetail": "Element: em",
|
"errorDetail": "Element: em",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [ 1, 4 ]
|
"errorRange": [
|
||||||
|
1,
|
||||||
|
4
|
||||||
|
],
|
||||||
|
"fixInfo": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 7,
|
"lineNumber": 7,
|
||||||
"ruleNames": [ "MD033", "no-inline-html" ],
|
"ruleNames": [
|
||||||
|
"MD033",
|
||||||
|
"no-inline-html"
|
||||||
|
],
|
||||||
"ruleDescription": "Inline HTML",
|
"ruleDescription": "Inline HTML",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md033",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md033",
|
||||||
"errorDetail": "Element: em",
|
"errorDetail": "Element: em",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [ 6, 4 ]
|
"errorRange": [
|
||||||
|
6,
|
||||||
|
4
|
||||||
|
],
|
||||||
|
"fixInfo": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 17,
|
"lineNumber": 17,
|
||||||
"ruleNames": [ "MD033", "no-inline-html" ],
|
"ruleNames": [
|
||||||
|
"MD033",
|
||||||
|
"no-inline-html"
|
||||||
|
],
|
||||||
"ruleDescription": "Inline HTML",
|
"ruleDescription": "Inline HTML",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md033",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md033",
|
||||||
"errorDetail": "Element: p",
|
"errorDetail": "Element: p",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [ 1, 3 ]
|
"errorRange": [
|
||||||
|
1,
|
||||||
|
3
|
||||||
|
],
|
||||||
|
"fixInfo": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 19,
|
"lineNumber": 19,
|
||||||
"ruleNames": [ "MD033", "no-inline-html" ],
|
"ruleNames": [
|
||||||
|
"MD033",
|
||||||
|
"no-inline-html"
|
||||||
|
],
|
||||||
"ruleDescription": "Inline HTML",
|
"ruleDescription": "Inline HTML",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md033",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md033",
|
||||||
"errorDetail": "Element: em",
|
"errorDetail": "Element: em",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [ 7, 4 ]
|
"errorRange": [
|
||||||
|
7,
|
||||||
|
4
|
||||||
|
],
|
||||||
|
"fixInfo": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 23,
|
"lineNumber": 23,
|
||||||
"ruleNames": [ "MD033", "no-inline-html" ],
|
"ruleNames": [
|
||||||
|
"MD033",
|
||||||
|
"no-inline-html"
|
||||||
|
],
|
||||||
"ruleDescription": "Inline HTML",
|
"ruleDescription": "Inline HTML",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md033",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md033",
|
||||||
"errorDetail": "Element: em",
|
"errorDetail": "Element: em",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [ 7, 4 ]
|
"errorRange": [
|
||||||
|
7,
|
||||||
|
4
|
||||||
|
],
|
||||||
|
"fixInfo": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 24,
|
"lineNumber": 24,
|
||||||
"ruleNames": [ "MD033", "no-inline-html" ],
|
"ruleNames": [
|
||||||
|
"MD033",
|
||||||
|
"no-inline-html"
|
||||||
|
],
|
||||||
"ruleDescription": "Inline HTML",
|
"ruleDescription": "Inline HTML",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md033",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md033",
|
||||||
"errorDetail": "Element: em",
|
"errorDetail": "Element: em",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [ 36, 4 ]
|
"errorRange": [
|
||||||
|
36,
|
||||||
|
4
|
||||||
|
],
|
||||||
|
"fixInfo": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 29,
|
"lineNumber": 29,
|
||||||
"ruleNames": [ "MD033", "no-inline-html" ],
|
"ruleNames": [
|
||||||
|
"MD033",
|
||||||
|
"no-inline-html"
|
||||||
|
],
|
||||||
"ruleDescription": "Inline HTML",
|
"ruleDescription": "Inline HTML",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md033",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md033",
|
||||||
"errorDetail": "Element: em",
|
"errorDetail": "Element: em",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [ 9, 4 ]
|
"errorRange": [
|
||||||
|
9,
|
||||||
|
4
|
||||||
|
],
|
||||||
|
"fixInfo": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 31,
|
"lineNumber": 31,
|
||||||
"ruleNames": [ "MD033", "no-inline-html" ],
|
"ruleNames": [
|
||||||
|
"MD033",
|
||||||
|
"no-inline-html"
|
||||||
|
],
|
||||||
"ruleDescription": "Inline HTML",
|
"ruleDescription": "Inline HTML",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md033",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md033",
|
||||||
"errorDetail": "Element: em",
|
"errorDetail": "Element: em",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [ 14, 4 ]
|
"errorRange": [
|
||||||
|
14,
|
||||||
|
4
|
||||||
|
],
|
||||||
|
"fixInfo": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 35,
|
"lineNumber": 35,
|
||||||
"ruleNames": [ "MD033", "no-inline-html" ],
|
"ruleNames": [
|
||||||
|
"MD033",
|
||||||
|
"no-inline-html"
|
||||||
|
],
|
||||||
"ruleDescription": "Inline HTML",
|
"ruleDescription": "Inline HTML",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md033",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md033",
|
||||||
"errorDetail": "Element: em",
|
"errorDetail": "Element: em",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [ 1, 4 ]
|
"errorRange": [
|
||||||
|
1,
|
||||||
|
4
|
||||||
|
],
|
||||||
|
"fixInfo": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 37,
|
"lineNumber": 37,
|
||||||
"ruleNames": [ "MD033", "no-inline-html" ],
|
"ruleNames": [
|
||||||
|
"MD033",
|
||||||
|
"no-inline-html"
|
||||||
|
],
|
||||||
"ruleDescription": "Inline HTML",
|
"ruleDescription": "Inline HTML",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md033",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md033",
|
||||||
"errorDetail": "Element: em",
|
"errorDetail": "Element: em",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [ 6, 4 ]
|
"errorRange": [
|
||||||
|
6,
|
||||||
|
4
|
||||||
|
],
|
||||||
|
"fixInfo": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 41,
|
"lineNumber": 41,
|
||||||
"ruleNames": [ "MD033", "no-inline-html" ],
|
"ruleNames": [
|
||||||
|
"MD033",
|
||||||
|
"no-inline-html"
|
||||||
|
],
|
||||||
"ruleDescription": "Inline HTML",
|
"ruleDescription": "Inline HTML",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md033",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md033",
|
||||||
"errorDetail": "Element: em",
|
"errorDetail": "Element: em",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [ 6, 4 ]
|
"errorRange": [
|
||||||
|
6,
|
||||||
|
4
|
||||||
|
],
|
||||||
|
"fixInfo": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"lineNumber": 41,
|
||||||
|
"ruleNames": [
|
||||||
|
"MD033",
|
||||||
|
"no-inline-html"
|
||||||
|
],
|
||||||
|
"ruleDescription": "Inline HTML",
|
||||||
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md033",
|
||||||
|
"errorDetail": "Element: em",
|
||||||
|
"errorContext": null,
|
||||||
|
"errorRange": [
|
||||||
|
56,
|
||||||
|
4
|
||||||
|
],
|
||||||
|
"fixInfo": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 43,
|
"lineNumber": 43,
|
||||||
"ruleNames": [ "MD033", "no-inline-html" ],
|
"ruleNames": [
|
||||||
|
"MD033",
|
||||||
|
"no-inline-html"
|
||||||
|
],
|
||||||
"ruleDescription": "Inline HTML",
|
"ruleDescription": "Inline HTML",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md033",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md033",
|
||||||
"errorDetail": "Element: em",
|
"errorDetail": "Element: em",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [ 35, 4 ]
|
"errorRange": [
|
||||||
|
35,
|
||||||
|
4
|
||||||
|
],
|
||||||
|
"fixInfo": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 49,
|
"lineNumber": 49,
|
||||||
"ruleNames": [ "MD033", "no-inline-html" ],
|
"ruleNames": [
|
||||||
|
"MD033",
|
||||||
|
"no-inline-html"
|
||||||
|
],
|
||||||
"ruleDescription": "Inline HTML",
|
"ruleDescription": "Inline HTML",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md033",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md033",
|
||||||
"errorDetail": "Element: problem",
|
"errorDetail": "Element: problem",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [ 3, 9 ]
|
"errorRange": [
|
||||||
|
3,
|
||||||
|
9
|
||||||
|
],
|
||||||
|
"fixInfo": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 55,
|
"lineNumber": 55,
|
||||||
"ruleNames": [ "MD033", "no-inline-html" ],
|
"ruleNames": [
|
||||||
|
"MD033",
|
||||||
|
"no-inline-html"
|
||||||
|
],
|
||||||
"ruleDescription": "Inline HTML",
|
"ruleDescription": "Inline HTML",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md033",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md033",
|
||||||
"errorDetail": "Element: problem",
|
"errorDetail": "Element: problem",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [ 8, 9 ]
|
"errorRange": [
|
||||||
|
8,
|
||||||
|
9
|
||||||
|
],
|
||||||
|
"fixInfo": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 61,
|
"lineNumber": 61,
|
||||||
"ruleNames": [ "MD033", "no-inline-html" ],
|
"ruleNames": [
|
||||||
|
"MD033",
|
||||||
|
"no-inline-html"
|
||||||
|
],
|
||||||
"ruleDescription": "Inline HTML",
|
"ruleDescription": "Inline HTML",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md033",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md033",
|
||||||
"errorDetail": "Element: em",
|
"errorDetail": "Element: em",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [ 8, 4 ]
|
"errorRange": [
|
||||||
|
8,
|
||||||
|
4
|
||||||
|
],
|
||||||
|
"fixInfo": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 84,
|
"lineNumber": 84,
|
||||||
"ruleNames": [ "MD033", "no-inline-html" ],
|
"ruleNames": [
|
||||||
|
"MD033",
|
||||||
|
"no-inline-html"
|
||||||
|
],
|
||||||
"ruleDescription": "Inline HTML",
|
"ruleDescription": "Inline HTML",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md033",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md033",
|
||||||
"errorDetail": "Element: em",
|
"errorDetail": "Element: em",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [ 18, 4 ]
|
"errorRange": [
|
||||||
|
18,
|
||||||
|
4
|
||||||
|
],
|
||||||
|
"fixInfo": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 90,
|
"lineNumber": 90,
|
||||||
"ruleNames": [ "MD033", "no-inline-html" ],
|
"ruleNames": [
|
||||||
|
"MD033",
|
||||||
|
"no-inline-html"
|
||||||
|
],
|
||||||
"ruleDescription": "Inline HTML",
|
"ruleDescription": "Inline HTML",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md033",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md033",
|
||||||
"errorDetail": "Element: a",
|
"errorDetail": "Element: a",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [ 6, 18 ]
|
"errorRange": [
|
||||||
|
6,
|
||||||
|
18
|
||||||
|
],
|
||||||
|
"fixInfo": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 91,
|
"lineNumber": 91,
|
||||||
"ruleNames": [ "MD033", "no-inline-html" ],
|
"ruleNames": [
|
||||||
|
"MD033",
|
||||||
|
"no-inline-html"
|
||||||
|
],
|
||||||
"ruleDescription": "Inline HTML",
|
"ruleDescription": "Inline HTML",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md033",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md033",
|
||||||
"errorDetail": "Element: img",
|
"errorDetail": "Element: img",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [ 6, 20 ]
|
"errorRange": [
|
||||||
|
6,
|
||||||
|
20
|
||||||
|
],
|
||||||
|
"fixInfo": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 101,
|
"lineNumber": 101,
|
||||||
"ruleNames": [ "MD033", "no-inline-html" ],
|
"ruleNames": [
|
||||||
|
"MD033",
|
||||||
|
"no-inline-html"
|
||||||
|
],
|
||||||
"ruleDescription": "Inline HTML",
|
"ruleDescription": "Inline HTML",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md033",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md033",
|
||||||
"errorDetail": "Element: foo-bar-baz",
|
"errorDetail": "Element: foo-bar-baz",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [ 1, 13 ]
|
"errorRange": [
|
||||||
|
1,
|
||||||
|
13
|
||||||
|
],
|
||||||
|
"fixInfo": null
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
@ -1,110 +1,275 @@
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"lineNumber": 30,
|
"lineNumber": 30,
|
||||||
"ruleNames": [ "MD011", "no-reversed-links" ],
|
"ruleNames": [
|
||||||
|
"MD011",
|
||||||
|
"no-reversed-links"
|
||||||
|
],
|
||||||
"ruleDescription": "Reversed link syntax",
|
"ruleDescription": "Reversed link syntax",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md011",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md011",
|
||||||
"errorDetail": "(Incorrect link syntax)[https://www.example.com/]",
|
"errorDetail": "(Incorrect link syntax)[https://www.example.com/]",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [ 1, 49 ]
|
"errorRange": [
|
||||||
|
1,
|
||||||
|
49
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 1,
|
||||||
|
"deleteCount": 49,
|
||||||
|
"insertText": "[Incorrect link syntax](https://www.example.com/)"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 3,
|
"lineNumber": 3,
|
||||||
"ruleNames": [ "MD034", "no-bare-urls" ],
|
"ruleNames": [
|
||||||
|
"MD034",
|
||||||
|
"no-bare-urls"
|
||||||
|
],
|
||||||
"ruleDescription": "Bare URL used",
|
"ruleDescription": "Bare URL used",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md034",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md034",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "https://example.com/",
|
"errorContext": "https://example.com/",
|
||||||
"errorRange": [ 6, 20 ]
|
"errorRange": [
|
||||||
|
6,
|
||||||
|
20
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 6,
|
||||||
|
"deleteCount": 20,
|
||||||
|
"insertText": "<https://example.com/>"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 5,
|
"lineNumber": 5,
|
||||||
"ruleNames": [ "MD034", "no-bare-urls" ],
|
"ruleNames": [
|
||||||
|
"MD034",
|
||||||
|
"no-bare-urls"
|
||||||
|
],
|
||||||
"ruleDescription": "Bare URL used",
|
"ruleDescription": "Bare URL used",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md034",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md034",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "https://example.com/bare",
|
"errorContext": "https://example.com/bare",
|
||||||
"errorRange": [ 42, 24 ]
|
"errorRange": [
|
||||||
|
42,
|
||||||
|
24
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 42,
|
||||||
|
"deleteCount": 24,
|
||||||
|
"insertText": "<https://example.com/bare>"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 7,
|
"lineNumber": 7,
|
||||||
"ruleNames": [ "MD034", "no-bare-urls" ],
|
"ruleNames": [
|
||||||
|
"MD034",
|
||||||
|
"no-bare-urls"
|
||||||
|
],
|
||||||
"ruleDescription": "Bare URL used",
|
"ruleDescription": "Bare URL used",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md034",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md034",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "https://example.com/bare",
|
"errorContext": "https://example.com/bare",
|
||||||
"errorRange": [ 6, 24 ]
|
"errorRange": [
|
||||||
|
6,
|
||||||
|
24
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 6,
|
||||||
|
"deleteCount": 24,
|
||||||
|
"insertText": "<https://example.com/bare>"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 9,
|
"lineNumber": 9,
|
||||||
"ruleNames": [ "MD034", "no-bare-urls" ],
|
"ruleNames": [
|
||||||
|
"MD034",
|
||||||
|
"no-bare-urls"
|
||||||
|
],
|
||||||
"ruleDescription": "Bare URL used",
|
"ruleDescription": "Bare URL used",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md034",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md034",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "https://example.com/",
|
"errorContext": "https://example.com/",
|
||||||
"errorRange": [ 48, 20 ]
|
"errorRange": [
|
||||||
|
48,
|
||||||
|
20
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 48,
|
||||||
|
"deleteCount": 20,
|
||||||
|
"insertText": "<https://example.com/>"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 11,
|
"lineNumber": 11,
|
||||||
"ruleNames": [ "MD034", "no-bare-urls" ],
|
"ruleNames": [
|
||||||
|
"MD034",
|
||||||
|
"no-bare-urls"
|
||||||
|
],
|
||||||
"ruleDescription": "Bare URL used",
|
"ruleDescription": "Bare URL used",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md034",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md034",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "https://example.com/bare",
|
"errorContext": "https://example.com/bare",
|
||||||
"errorRange": [ 44, 24 ]
|
"errorRange": [
|
||||||
|
44,
|
||||||
|
24
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 44,
|
||||||
|
"deleteCount": 24,
|
||||||
|
"insertText": "<https://example.com/bare>"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 13,
|
"lineNumber": 13,
|
||||||
"ruleNames": [ "MD034", "no-bare-urls" ],
|
"ruleNames": [
|
||||||
|
"MD034",
|
||||||
|
"no-bare-urls"
|
||||||
|
],
|
||||||
"ruleDescription": "Bare URL used",
|
"ruleDescription": "Bare URL used",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md034",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md034",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "https://example.com/dir",
|
"errorContext": "https://example.com/dir",
|
||||||
"errorRange": [ 6, 23 ]
|
"errorRange": [
|
||||||
|
6,
|
||||||
|
23
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 6,
|
||||||
|
"deleteCount": 23,
|
||||||
|
"insertText": "<https://example.com/dir>"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 14,
|
"lineNumber": 14,
|
||||||
"ruleNames": [ "MD034", "no-bare-urls" ],
|
"ruleNames": [
|
||||||
|
"MD034",
|
||||||
|
"no-bare-urls"
|
||||||
|
],
|
||||||
"ruleDescription": "Bare URL used",
|
"ruleDescription": "Bare URL used",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md034",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md034",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "https://example.com/file.txt",
|
"errorContext": "https://example.com/file.txt",
|
||||||
"errorRange": [ 6, 28 ]
|
"errorRange": [
|
||||||
|
6,
|
||||||
|
28
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 6,
|
||||||
|
"deleteCount": 28,
|
||||||
|
"insertText": "<https://example.com/file.txt>"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 16,
|
"lineNumber": 16,
|
||||||
"ruleNames": [ "MD034", "no-bare-urls" ],
|
"ruleNames": [
|
||||||
|
"MD034",
|
||||||
|
"no-bare-urls"
|
||||||
|
],
|
||||||
"ruleDescription": "Bare URL used",
|
"ruleDescription": "Bare URL used",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md034",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md034",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "https://example.com/dir/dir/fi...",
|
"errorContext": "https://example.com/dir/dir/fi...",
|
||||||
"errorRange": [ 6, 44 ]
|
"errorRange": [
|
||||||
|
6,
|
||||||
|
44
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 6,
|
||||||
|
"deleteCount": 44,
|
||||||
|
"insertText": "<https://example.com/dir/dir/file?query=param>"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 24,
|
"lineNumber": 24,
|
||||||
"ruleNames": [ "MD034", "no-bare-urls" ],
|
"ruleNames": [
|
||||||
|
"MD034",
|
||||||
|
"no-bare-urls"
|
||||||
|
],
|
||||||
"ruleDescription": "Bare URL used",
|
"ruleDescription": "Bare URL used",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md034",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md034",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "https://example.com/same",
|
"errorContext": "https://example.com/same",
|
||||||
"errorRange": [ 43, 24 ]
|
"errorRange": [
|
||||||
|
43,
|
||||||
|
24
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 43,
|
||||||
|
"deleteCount": 24,
|
||||||
|
"insertText": "<https://example.com/same>"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 26,
|
"lineNumber": 26,
|
||||||
"ruleNames": [ "MD034", "no-bare-urls" ],
|
"ruleNames": [
|
||||||
|
"MD034",
|
||||||
|
"no-bare-urls"
|
||||||
|
],
|
||||||
"ruleDescription": "Bare URL used",
|
"ruleDescription": "Bare URL used",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md034",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md034",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "https://example.com/same",
|
"errorContext": "https://example.com/same",
|
||||||
"errorRange": null
|
"errorRange": null,
|
||||||
|
"fixInfo": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 28,
|
"lineNumber": 28,
|
||||||
"ruleNames": [ "MD034", "no-bare-urls" ],
|
"ruleNames": [
|
||||||
|
"MD034",
|
||||||
|
"no-bare-urls"
|
||||||
|
],
|
||||||
"ruleDescription": "Bare URL used",
|
"ruleDescription": "Bare URL used",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md034",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md034",
|
||||||
"errorDetail": null,
|
"errorDetail": null,
|
||||||
"errorContext": "https://example.com/first",
|
"errorContext": "https://example.com/first",
|
||||||
"errorRange": [ 6, 25 ]
|
"errorRange": [
|
||||||
|
6,
|
||||||
|
25
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 6,
|
||||||
|
"deleteCount": 25,
|
||||||
|
"insertText": "<https://example.com/first>"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"lineNumber": 28,
|
||||||
|
"ruleNames": [
|
||||||
|
"MD034",
|
||||||
|
"no-bare-urls"
|
||||||
|
],
|
||||||
|
"ruleDescription": "Bare URL used",
|
||||||
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md034",
|
||||||
|
"errorDetail": null,
|
||||||
|
"errorContext": "https://example.com/second",
|
||||||
|
"errorRange": [
|
||||||
|
42,
|
||||||
|
26
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 42,
|
||||||
|
"deleteCount": 26,
|
||||||
|
"insertText": "<https://example.com/second>"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"lineNumber": 28,
|
||||||
|
"ruleNames": [
|
||||||
|
"MD034",
|
||||||
|
"no-bare-urls"
|
||||||
|
],
|
||||||
|
"ruleDescription": "Bare URL used",
|
||||||
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md034",
|
||||||
|
"errorDetail": null,
|
||||||
|
"errorContext": "https://example.com/third",
|
||||||
|
"errorRange": [
|
||||||
|
85,
|
||||||
|
25
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 85,
|
||||||
|
"deleteCount": 25,
|
||||||
|
"insertText": "<https://example.com/third>"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
7
test/detailed-results-no-tabs-edge-case-MD010.json
Normal file
7
test/detailed-results-no-tabs-edge-case-MD010.json
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"MD009": false,
|
||||||
|
"MD010": {
|
||||||
|
"spaces_per_tab": 0
|
||||||
|
},
|
||||||
|
"MD041": false
|
||||||
|
}
|
||||||
3
test/detailed-results-no-tabs-edge-case-MD010.md
Normal file
3
test/detailed-results-no-tabs-edge-case-MD010.md
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
text
|
||||||
|
text and text 2
|
||||||
|
texts with trailing spaces
|
||||||
3
test/detailed-results-no-tabs-edge-case-MD010.md.fixed
Normal file
3
test/detailed-results-no-tabs-edge-case-MD010.md.fixed
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
text
|
||||||
|
text and text 2
|
||||||
|
texts with trailing spaces
|
||||||
62
test/detailed-results-no-tabs-edge-case-MD010.results.json
Normal file
62
test/detailed-results-no-tabs-edge-case-MD010.results.json
Normal file
|
|
@ -0,0 +1,62 @@
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"lineNumber": 1,
|
||||||
|
"ruleNames": [
|
||||||
|
"MD010",
|
||||||
|
"no-hard-tabs"
|
||||||
|
],
|
||||||
|
"ruleDescription": "Hard tabs",
|
||||||
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md010",
|
||||||
|
"errorDetail": "Column: 1",
|
||||||
|
"errorContext": null,
|
||||||
|
"errorRange": [
|
||||||
|
1,
|
||||||
|
13
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 1,
|
||||||
|
"deleteCount": 13,
|
||||||
|
"insertText": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"lineNumber": 2,
|
||||||
|
"ruleNames": [
|
||||||
|
"MD010",
|
||||||
|
"no-hard-tabs"
|
||||||
|
],
|
||||||
|
"ruleDescription": "Hard tabs",
|
||||||
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md010",
|
||||||
|
"errorDetail": "Column: 5",
|
||||||
|
"errorContext": null,
|
||||||
|
"errorRange": [
|
||||||
|
5,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 5,
|
||||||
|
"deleteCount": 2,
|
||||||
|
"insertText": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"lineNumber": 3,
|
||||||
|
"ruleNames": [
|
||||||
|
"MD010",
|
||||||
|
"no-hard-tabs"
|
||||||
|
],
|
||||||
|
"ruleDescription": "Hard tabs",
|
||||||
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md010",
|
||||||
|
"errorDetail": "Column: 27",
|
||||||
|
"errorContext": null,
|
||||||
|
"errorRange": [
|
||||||
|
27,
|
||||||
|
3
|
||||||
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 27,
|
||||||
|
"deleteCount": 3,
|
||||||
|
"insertText": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
@ -1,11 +1,18 @@
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"lineNumber": 3,
|
"lineNumber": 3,
|
||||||
"ruleNames": [ "MD029", "ol-prefix" ],
|
"ruleNames": [
|
||||||
|
"MD029",
|
||||||
|
"ol-prefix"
|
||||||
|
],
|
||||||
"ruleDescription": "Ordered list item prefix",
|
"ruleDescription": "Ordered list item prefix",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md029",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md029",
|
||||||
"errorDetail": "Expected: 1; Actual: 9; Style: 1/1/1",
|
"errorDetail": "Expected: 1; Actual: 9; Style: 1/1/1",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [1, 3]
|
"errorRange": [
|
||||||
|
1,
|
||||||
|
3
|
||||||
|
],
|
||||||
|
"fixInfo": null
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
@ -1,56 +1,98 @@
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"lineNumber": 11,
|
"lineNumber": 11,
|
||||||
"ruleNames": [ "MD029", "ol-prefix" ],
|
"ruleNames": [
|
||||||
|
"MD029",
|
||||||
|
"ol-prefix"
|
||||||
|
],
|
||||||
"ruleDescription": "Ordered list item prefix",
|
"ruleDescription": "Ordered list item prefix",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md029",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md029",
|
||||||
"errorDetail": "Expected: 0; Actual: 1; Style: 0/0/0",
|
"errorDetail": "Expected: 0; Actual: 1; Style: 0/0/0",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [1, 3]
|
"errorRange": [
|
||||||
|
1,
|
||||||
|
3
|
||||||
|
],
|
||||||
|
"fixInfo": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 12,
|
"lineNumber": 12,
|
||||||
"ruleNames": [ "MD029", "ol-prefix" ],
|
"ruleNames": [
|
||||||
|
"MD029",
|
||||||
|
"ol-prefix"
|
||||||
|
],
|
||||||
"ruleDescription": "Ordered list item prefix",
|
"ruleDescription": "Ordered list item prefix",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md029",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md029",
|
||||||
"errorDetail": "Expected: 0; Actual: 1; Style: 0/0/0",
|
"errorDetail": "Expected: 0; Actual: 1; Style: 0/0/0",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [1, 3]
|
"errorRange": [
|
||||||
|
1,
|
||||||
|
3
|
||||||
|
],
|
||||||
|
"fixInfo": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 13,
|
"lineNumber": 13,
|
||||||
"ruleNames": [ "MD029", "ol-prefix" ],
|
"ruleNames": [
|
||||||
|
"MD029",
|
||||||
|
"ol-prefix"
|
||||||
|
],
|
||||||
"ruleDescription": "Ordered list item prefix",
|
"ruleDescription": "Ordered list item prefix",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md029",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md029",
|
||||||
"errorDetail": "Expected: 0; Actual: 1; Style: 0/0/0",
|
"errorDetail": "Expected: 0; Actual: 1; Style: 0/0/0",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [1, 3]
|
"errorRange": [
|
||||||
|
1,
|
||||||
|
3
|
||||||
|
],
|
||||||
|
"fixInfo": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 17,
|
"lineNumber": 17,
|
||||||
"ruleNames": [ "MD029", "ol-prefix" ],
|
"ruleNames": [
|
||||||
|
"MD029",
|
||||||
|
"ol-prefix"
|
||||||
|
],
|
||||||
"ruleDescription": "Ordered list item prefix",
|
"ruleDescription": "Ordered list item prefix",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md029",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md029",
|
||||||
"errorDetail": "Expected: 0; Actual: 1; Style: 0/0/0",
|
"errorDetail": "Expected: 0; Actual: 1; Style: 0/0/0",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [1, 3]
|
"errorRange": [
|
||||||
|
1,
|
||||||
|
3
|
||||||
|
],
|
||||||
|
"fixInfo": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 18,
|
"lineNumber": 18,
|
||||||
"ruleNames": [ "MD029", "ol-prefix" ],
|
"ruleNames": [
|
||||||
|
"MD029",
|
||||||
|
"ol-prefix"
|
||||||
|
],
|
||||||
"ruleDescription": "Ordered list item prefix",
|
"ruleDescription": "Ordered list item prefix",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md029",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md029",
|
||||||
"errorDetail": "Expected: 0; Actual: 2; Style: 0/0/0",
|
"errorDetail": "Expected: 0; Actual: 2; Style: 0/0/0",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [1, 3]
|
"errorRange": [
|
||||||
|
1,
|
||||||
|
3
|
||||||
|
],
|
||||||
|
"fixInfo": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 19,
|
"lineNumber": 19,
|
||||||
"ruleNames": [ "MD029", "ol-prefix" ],
|
"ruleNames": [
|
||||||
|
"MD029",
|
||||||
|
"ol-prefix"
|
||||||
|
],
|
||||||
"ruleDescription": "Ordered list item prefix",
|
"ruleDescription": "Ordered list item prefix",
|
||||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md029",
|
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md029",
|
||||||
"errorDetail": "Expected: 0; Actual: 3; Style: 0/0/0",
|
"errorDetail": "Expected: 0; Actual: 3; Style: 0/0/0",
|
||||||
"errorContext": null,
|
"errorContext": null,
|
||||||
"errorRange": [1, 3]
|
"errorRange": [
|
||||||
|
1,
|
||||||
|
3
|
||||||
|
],
|
||||||
|
"fixInfo": null
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
@ -12,7 +12,12 @@
|
||||||
"errorRange": [
|
"errorRange": [
|
||||||
6,
|
6,
|
||||||
12
|
12
|
||||||
]
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 6,
|
||||||
|
"deleteCount": 12,
|
||||||
|
"insertText": "markdownlint"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 5,
|
"lineNumber": 5,
|
||||||
|
|
@ -27,7 +32,12 @@
|
||||||
"errorRange": [
|
"errorRange": [
|
||||||
6,
|
6,
|
||||||
7
|
7
|
||||||
]
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 6,
|
||||||
|
"deleteCount": 7,
|
||||||
|
"insertText": "Node.js"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 7,
|
"lineNumber": 7,
|
||||||
|
|
@ -42,7 +52,12 @@
|
||||||
"errorRange": [
|
"errorRange": [
|
||||||
6,
|
6,
|
||||||
4
|
4
|
||||||
]
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 6,
|
||||||
|
"deleteCount": 4,
|
||||||
|
"insertText": ".NET"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 9,
|
"lineNumber": 9,
|
||||||
|
|
@ -57,7 +72,12 @@
|
||||||
"errorRange": [
|
"errorRange": [
|
||||||
13,
|
13,
|
||||||
4
|
4
|
||||||
]
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 13,
|
||||||
|
"deleteCount": 4,
|
||||||
|
"insertText": ".NET"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 11,
|
"lineNumber": 11,
|
||||||
|
|
@ -72,7 +92,12 @@
|
||||||
"errorRange": [
|
"errorRange": [
|
||||||
7,
|
7,
|
||||||
12
|
12
|
||||||
]
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 7,
|
||||||
|
"deleteCount": 12,
|
||||||
|
"insertText": "markdownlint"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 13,
|
"lineNumber": 13,
|
||||||
|
|
@ -87,7 +112,12 @@
|
||||||
"errorRange": [
|
"errorRange": [
|
||||||
7,
|
7,
|
||||||
7
|
7
|
||||||
]
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 7,
|
||||||
|
"deleteCount": 7,
|
||||||
|
"insertText": "Node.js"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 15,
|
"lineNumber": 15,
|
||||||
|
|
@ -102,7 +132,12 @@
|
||||||
"errorRange": [
|
"errorRange": [
|
||||||
7,
|
7,
|
||||||
4
|
4
|
||||||
]
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 7,
|
||||||
|
"deleteCount": 4,
|
||||||
|
"insertText": ".NET"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 17,
|
"lineNumber": 17,
|
||||||
|
|
@ -117,7 +152,12 @@
|
||||||
"errorRange": [
|
"errorRange": [
|
||||||
14,
|
14,
|
||||||
4
|
4
|
||||||
]
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 14,
|
||||||
|
"deleteCount": 4,
|
||||||
|
"insertText": ".NET"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 19,
|
"lineNumber": 19,
|
||||||
|
|
@ -132,7 +172,12 @@
|
||||||
"errorRange": [
|
"errorRange": [
|
||||||
8,
|
8,
|
||||||
12
|
12
|
||||||
]
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 8,
|
||||||
|
"deleteCount": 12,
|
||||||
|
"insertText": "markdownlint"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 21,
|
"lineNumber": 21,
|
||||||
|
|
@ -147,7 +192,12 @@
|
||||||
"errorRange": [
|
"errorRange": [
|
||||||
8,
|
8,
|
||||||
7
|
7
|
||||||
]
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 8,
|
||||||
|
"deleteCount": 7,
|
||||||
|
"insertText": "Node.js"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 23,
|
"lineNumber": 23,
|
||||||
|
|
@ -162,7 +212,12 @@
|
||||||
"errorRange": [
|
"errorRange": [
|
||||||
8,
|
8,
|
||||||
4
|
4
|
||||||
]
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 8,
|
||||||
|
"deleteCount": 4,
|
||||||
|
"insertText": ".NET"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 25,
|
"lineNumber": 25,
|
||||||
|
|
@ -177,7 +232,12 @@
|
||||||
"errorRange": [
|
"errorRange": [
|
||||||
15,
|
15,
|
||||||
4
|
4
|
||||||
]
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 15,
|
||||||
|
"deleteCount": 4,
|
||||||
|
"insertText": ".NET"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 27,
|
"lineNumber": 27,
|
||||||
|
|
@ -192,7 +252,12 @@
|
||||||
"errorRange": [
|
"errorRange": [
|
||||||
1,
|
1,
|
||||||
12
|
12
|
||||||
]
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 1,
|
||||||
|
"deleteCount": 12,
|
||||||
|
"insertText": "markdownlint"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 29,
|
"lineNumber": 29,
|
||||||
|
|
@ -207,7 +272,12 @@
|
||||||
"errorRange": [
|
"errorRange": [
|
||||||
1,
|
1,
|
||||||
7
|
7
|
||||||
]
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 1,
|
||||||
|
"deleteCount": 7,
|
||||||
|
"insertText": "Node.js"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 31,
|
"lineNumber": 31,
|
||||||
|
|
@ -222,7 +292,12 @@
|
||||||
"errorRange": [
|
"errorRange": [
|
||||||
1,
|
1,
|
||||||
4
|
4
|
||||||
]
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 1,
|
||||||
|
"deleteCount": 4,
|
||||||
|
"insertText": ".NET"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lineNumber": 33,
|
"lineNumber": 33,
|
||||||
|
|
@ -237,6 +312,11 @@
|
||||||
"errorRange": [
|
"errorRange": [
|
||||||
8,
|
8,
|
||||||
4
|
4
|
||||||
]
|
],
|
||||||
|
"fixInfo": {
|
||||||
|
"editColumn": 8,
|
||||||
|
"deleteCount": 4,
|
||||||
|
"insertText": ".NET"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
@ -54,6 +54,8 @@ function lintTestRepo(t, globPatterns, configPath) {
|
||||||
files,
|
files,
|
||||||
config
|
config
|
||||||
};
|
};
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
|
console.log(`${t.title}: Linting ${files.length} files...`);
|
||||||
return markdownlintPromise(options).then((results) => {
|
return markdownlintPromise(options).then((results) => {
|
||||||
const resultsString = results.toString();
|
const resultsString = results.toString();
|
||||||
if (resultsString.length > 0) {
|
if (resultsString.length > 0) {
|
||||||
|
|
@ -79,13 +81,27 @@ test("https://github.com/mkdocs/mkdocs", (t) => {
|
||||||
const globPatterns = [
|
const globPatterns = [
|
||||||
join(rootDir, "README.md"),
|
join(rootDir, "README.md"),
|
||||||
join(rootDir, "CONTRIBUTING.md"),
|
join(rootDir, "CONTRIBUTING.md"),
|
||||||
join(rootDir, "docs/*"),
|
join(rootDir, "docs/**/*.md"),
|
||||||
"!" + join(rootDir, "docs/CNAME")
|
"!" + join(rootDir, "docs/CNAME")
|
||||||
];
|
];
|
||||||
const configPath = join(rootDir, ".markdownlintrc");
|
const configPath = join(rootDir, ".markdownlintrc");
|
||||||
return lintTestRepo(t, globPatterns, configPath);
|
return lintTestRepo(t, globPatterns, configPath);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test("https://github.com/mochajs/mocha", (t) => {
|
||||||
|
const rootDir = "./test-repos/mochajs-mocha";
|
||||||
|
const globPatterns = [
|
||||||
|
join(rootDir, "*.md"),
|
||||||
|
join(rootDir, "docs/**/*.md"),
|
||||||
|
join(rootDir, ".github/*.md"),
|
||||||
|
join(rootDir, "lib/**/*.md"),
|
||||||
|
join(rootDir, "test/**/*.md"),
|
||||||
|
join(rootDir, "example/**/*.md")
|
||||||
|
];
|
||||||
|
const configPath = join(rootDir, ".markdownlint.json");
|
||||||
|
return lintTestRepo(t, globPatterns, configPath);
|
||||||
|
});
|
||||||
|
|
||||||
test("https://github.com/pi-hole/docs", (t) => {
|
test("https://github.com/pi-hole/docs", (t) => {
|
||||||
const rootDir = "./test-repos/pi-hole-docs";
|
const rootDir = "./test-repos/pi-hole-docs";
|
||||||
const globPatterns = [ join(rootDir, "**/*.md") ];
|
const globPatterns = [ join(rootDir, "**/*.md") ];
|
||||||
|
|
@ -93,6 +109,23 @@ test("https://github.com/pi-hole/docs", (t) => {
|
||||||
return lintTestRepo(t, globPatterns, configPath);
|
return lintTestRepo(t, globPatterns, configPath);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test("https://github.com/webhintio/hint", (t) => {
|
||||||
|
const rootDir = "./test-repos/webhintio-hint";
|
||||||
|
const globPatterns = [
|
||||||
|
join(rootDir, "**/*.md"),
|
||||||
|
"!" + join(rootDir, "**/CHANGELOG.md")
|
||||||
|
];
|
||||||
|
const configPath = join(rootDir, ".markdownlintrc");
|
||||||
|
return lintTestRepo(t, globPatterns, configPath);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("https://github.com/webpack/webpack.js.org", (t) => {
|
||||||
|
const rootDir = "./test-repos/webpack-webpack-js-org";
|
||||||
|
const globPatterns = [ join(rootDir, "**/*.md") ];
|
||||||
|
const configPath = join(rootDir, ".markdownlint.json");
|
||||||
|
return lintTestRepo(t, globPatterns, configPath);
|
||||||
|
});
|
||||||
|
|
||||||
// Optional repositories (very large)
|
// Optional repositories (very large)
|
||||||
|
|
||||||
const dotnetDocsDir = "./test-repos/dotnet-docs";
|
const dotnetDocsDir = "./test-repos/dotnet-docs";
|
||||||
|
|
@ -101,15 +134,19 @@ if (existsSync(dotnetDocsDir)) {
|
||||||
const rootDir = dotnetDocsDir;
|
const rootDir = dotnetDocsDir;
|
||||||
const globPatterns = [
|
const globPatterns = [
|
||||||
join(rootDir, "**/*.md"),
|
join(rootDir, "**/*.md"),
|
||||||
"!" + join(rootDir, "samples/**/*.md"),
|
"!" + join(rootDir, "samples/**/*.md")
|
||||||
// A table parsing change in markdown-it v12 causes a new issue here
|
|
||||||
"!" + join(
|
|
||||||
rootDir,
|
|
||||||
"docs/standard/base-types/" +
|
|
||||||
"regular-expression-example-scanning-for-hrefs.md"
|
|
||||||
)
|
|
||||||
];
|
];
|
||||||
const configPath = join(rootDir, ".markdownlint.json");
|
const configPath = join(rootDir, ".markdownlint.json");
|
||||||
return lintTestRepo(t, globPatterns, configPath);
|
return lintTestRepo(t, globPatterns, configPath);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const v8v8DevDir = "./test-repos/v8-v8-dev";
|
||||||
|
if (existsSync(v8v8DevDir)) {
|
||||||
|
test("https://github.com/v8/v8.dev", (t) => {
|
||||||
|
const rootDir = v8v8DevDir;
|
||||||
|
const globPatterns = [ join(rootDir, "src/**/*.md") ];
|
||||||
|
const configPath = join(rootDir, ".markdownlint.json");
|
||||||
|
return lintTestRepo(t, globPatterns, configPath);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@ function createTestForFile(file) {
|
||||||
.then(
|
.then(
|
||||||
function configFileExists() {
|
function configFileExists() {
|
||||||
return fs.promises.readFile(configFile, "utf8")
|
return fs.promises.readFile(configFile, "utf8")
|
||||||
|
// @ts-ignore
|
||||||
.then(JSON.parse);
|
.then(JSON.parse);
|
||||||
},
|
},
|
||||||
function noConfigFile() {
|
function noConfigFile() {
|
||||||
|
|
@ -44,7 +45,7 @@ function createTestForFile(file) {
|
||||||
return markdownlintPromise({
|
return markdownlintPromise({
|
||||||
"files": [ file ],
|
"files": [ file ],
|
||||||
config,
|
config,
|
||||||
"resultVersion": detailedResults ? 2 : 3
|
"resultVersion": 3
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.then(
|
.then(
|
||||||
|
|
|
||||||
|
|
@ -80,6 +80,7 @@ test.cb("projectFilesNoInlineConfig", (t) => {
|
||||||
"README.md",
|
"README.md",
|
||||||
"CONTRIBUTING.md",
|
"CONTRIBUTING.md",
|
||||||
"doc/CustomRules.md",
|
"doc/CustomRules.md",
|
||||||
|
"doc/Prettier.md",
|
||||||
"helpers/README.md"
|
"helpers/README.md"
|
||||||
],
|
],
|
||||||
"noInlineConfig": true,
|
"noInlineConfig": true,
|
||||||
|
|
@ -94,6 +95,7 @@ test.cb("projectFilesNoInlineConfig", (t) => {
|
||||||
"README.md": [],
|
"README.md": [],
|
||||||
"CONTRIBUTING.md": [],
|
"CONTRIBUTING.md": [],
|
||||||
"doc/CustomRules.md": [],
|
"doc/CustomRules.md": [],
|
||||||
|
"doc/Prettier.md": [],
|
||||||
"helpers/README.md": []
|
"helpers/README.md": []
|
||||||
};
|
};
|
||||||
t.deepEqual(actual, expected, "Issue(s) with project files.");
|
t.deepEqual(actual, expected, "Issue(s) with project files.");
|
||||||
|
|
@ -652,11 +654,13 @@ test.cb("readmeHeadings", (t) => {
|
||||||
"##### options.noInlineConfig",
|
"##### options.noInlineConfig",
|
||||||
"##### options.resultVersion",
|
"##### options.resultVersion",
|
||||||
"##### options.markdownItPlugins",
|
"##### options.markdownItPlugins",
|
||||||
|
"##### options.fs",
|
||||||
"#### callback",
|
"#### callback",
|
||||||
"#### result",
|
"#### result",
|
||||||
"### Config",
|
"### Config",
|
||||||
"#### file",
|
"#### file",
|
||||||
"#### parsers",
|
"#### parsers",
|
||||||
|
"#### fs",
|
||||||
"#### callback",
|
"#### callback",
|
||||||
"#### result",
|
"#### result",
|
||||||
"## Usage",
|
"## Usage",
|
||||||
|
|
@ -681,7 +685,7 @@ test.cb("filesArrayNotModified", (t) => {
|
||||||
"./test/atx_heading_spacing.md",
|
"./test/atx_heading_spacing.md",
|
||||||
"./test/first_heading_bad_atx.md"
|
"./test/first_heading_bad_atx.md"
|
||||||
];
|
];
|
||||||
const expectedFiles = files.slice();
|
const expectedFiles = [ ...files ];
|
||||||
markdownlint({ "files": files }, function callback(err) {
|
markdownlint({ "files": files }, function callback(err) {
|
||||||
t.falsy(err);
|
t.falsy(err);
|
||||||
t.deepEqual(files, expectedFiles, "Files modified.");
|
t.deepEqual(files, expectedFiles, "Files modified.");
|
||||||
|
|
@ -798,6 +802,40 @@ test.cb("missingStringValue", (t) => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test("customFileSystemSync", (t) => {
|
||||||
|
t.plan(2);
|
||||||
|
const file = "/dir/file.md";
|
||||||
|
const fsApi = {
|
||||||
|
"readFileSync": (p) => {
|
||||||
|
t.is(p, file);
|
||||||
|
return "# Heading";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const result = markdownlint.sync({
|
||||||
|
"files": file,
|
||||||
|
"fs": fsApi
|
||||||
|
});
|
||||||
|
t.deepEqual(result[file].length, 1, "Did not report violations.");
|
||||||
|
});
|
||||||
|
|
||||||
|
test.cb("customFileSystemAsync", (t) => {
|
||||||
|
t.plan(3);
|
||||||
|
const file = "/dir/file.md";
|
||||||
|
const fsApi = {
|
||||||
|
"readFile": (p, o, cb) => {
|
||||||
|
t.is(p, file);
|
||||||
|
cb(null, "# Heading");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
markdownlint({
|
||||||
|
"files": file,
|
||||||
|
"fs": fsApi
|
||||||
|
}, function callback(err, result) {
|
||||||
|
t.falsy(err);
|
||||||
|
t.deepEqual(result[file].length, 1, "Did not report violations.");
|
||||||
|
t.end();
|
||||||
|
});
|
||||||
|
});
|
||||||
test.cb("readme", (t) => {
|
test.cb("readme", (t) => {
|
||||||
t.plan(115);
|
t.plan(115);
|
||||||
const tagToRules = {};
|
const tagToRules = {};
|
||||||
|
|
@ -811,12 +849,13 @@ test.cb("readme", (t) => {
|
||||||
fs.readFile("README.md", "utf8",
|
fs.readFile("README.md", "utf8",
|
||||||
function readFile(err, contents) {
|
function readFile(err, contents) {
|
||||||
t.falsy(err);
|
t.falsy(err);
|
||||||
const rulesLeft = rules.slice();
|
const rulesLeft = [ ...rules ];
|
||||||
let seenRelated = false;
|
let seenRelated = false;
|
||||||
let seenRules = false;
|
let seenRules = false;
|
||||||
let inRules = false;
|
let inRules = false;
|
||||||
let seenTags = false;
|
let seenTags = false;
|
||||||
let inTags = false;
|
let inTags = false;
|
||||||
|
// @ts-ignore
|
||||||
md.parse(contents, {}).forEach(function forToken(token) {
|
md.parse(contents, {}).forEach(function forToken(token) {
|
||||||
if (
|
if (
|
||||||
(token.type === "bullet_list_open") &&
|
(token.type === "bullet_list_open") &&
|
||||||
|
|
@ -878,7 +917,7 @@ test.cb("rules", (t) => {
|
||||||
fs.readFile("doc/Rules.md", "utf8",
|
fs.readFile("doc/Rules.md", "utf8",
|
||||||
(err, contents) => {
|
(err, contents) => {
|
||||||
t.falsy(err);
|
t.falsy(err);
|
||||||
const rulesLeft = rules.slice();
|
const rulesLeft = [ ...rules ];
|
||||||
let inHeading = false;
|
let inHeading = false;
|
||||||
let rule = null;
|
let rule = null;
|
||||||
let ruleHasTags = true;
|
let ruleHasTags = true;
|
||||||
|
|
@ -896,6 +935,7 @@ test.cb("rules", (t) => {
|
||||||
t.true(!ruleUsesParams,
|
t.true(!ruleUsesParams,
|
||||||
"Missing parameters for rule " + r.names + ".");
|
"Missing parameters for rule " + r.names + ".");
|
||||||
};
|
};
|
||||||
|
// @ts-ignore
|
||||||
md.parse(contents, {}).forEach(function forToken(token) {
|
md.parse(contents, {}).forEach(function forToken(token) {
|
||||||
if ((token.type === "heading_open") && (token.tag === "h2")) {
|
if ((token.type === "heading_open") && (token.tag === "h2")) {
|
||||||
inHeading = true;
|
inHeading = true;
|
||||||
|
|
@ -1008,6 +1048,22 @@ test("validateConfigSchemaAllowsUnknownProperties", (t) => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test("validateConfigSchemaAppliesToUnknownProperties", (t) => {
|
||||||
|
t.plan(4);
|
||||||
|
for (const allowed of [ true, {} ]) {
|
||||||
|
t.true(
|
||||||
|
// @ts-ignore
|
||||||
|
tv4.validate({ "property": allowed }, configSchema),
|
||||||
|
`Unknown property value ${allowed} blocked`);
|
||||||
|
}
|
||||||
|
for (const blocked of [ 2, "string" ]) {
|
||||||
|
t.false(
|
||||||
|
// @ts-ignore
|
||||||
|
tv4.validate({ "property": blocked }, configSchema),
|
||||||
|
`Unknown property value ${blocked} allowed`);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
test("validateConfigExampleJson", (t) => {
|
test("validateConfigExampleJson", (t) => {
|
||||||
t.plan(2);
|
t.plan(2);
|
||||||
|
|
||||||
|
|
@ -1087,6 +1143,53 @@ test.cb("configMultipleWithRequireResolve", (t) => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test.cb("configCustomFileSystem", (t) => {
|
||||||
|
t.plan(5);
|
||||||
|
const file = path.resolve("/dir/file.json");
|
||||||
|
const extended = path.resolve("/dir/extended.json");
|
||||||
|
const fileContent = {
|
||||||
|
"extends": extended,
|
||||||
|
"default": true,
|
||||||
|
"MD001": false
|
||||||
|
};
|
||||||
|
const extendedContent = {
|
||||||
|
"MD001": true,
|
||||||
|
"MD002": true
|
||||||
|
};
|
||||||
|
const fsApi = {
|
||||||
|
"access": (p, m, cb) => {
|
||||||
|
t.is(p, extended);
|
||||||
|
return (cb || m)();
|
||||||
|
},
|
||||||
|
"readFile": (p, o, cb) => {
|
||||||
|
switch (p) {
|
||||||
|
case file:
|
||||||
|
t.is(p, file);
|
||||||
|
return cb(null, JSON.stringify(fileContent));
|
||||||
|
case extended:
|
||||||
|
t.is(p, extended);
|
||||||
|
return cb(null, JSON.stringify(extendedContent));
|
||||||
|
default:
|
||||||
|
return t.fail();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
markdownlint.readConfig(
|
||||||
|
file,
|
||||||
|
null,
|
||||||
|
fsApi,
|
||||||
|
function callback(err, actual) {
|
||||||
|
t.falsy(err);
|
||||||
|
const expected = {
|
||||||
|
...extendedContent,
|
||||||
|
...fileContent
|
||||||
|
};
|
||||||
|
delete expected.extends;
|
||||||
|
t.deepEqual(actual, expected, "Config object not correct.");
|
||||||
|
t.end();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
test.cb("configBadFile", (t) => {
|
test.cb("configBadFile", (t) => {
|
||||||
t.plan(4);
|
t.plan(4);
|
||||||
markdownlint.readConfig("./test/config/config-badfile.json",
|
markdownlint.readConfig("./test/config/config-badfile.json",
|
||||||
|
|
@ -1340,6 +1443,45 @@ test("configMultipleHybridSync", (t) => {
|
||||||
t.like(actual, expected, "Config object not correct.");
|
t.like(actual, expected, "Config object not correct.");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test("configCustomFileSystemSync", (t) => {
|
||||||
|
t.plan(4);
|
||||||
|
const file = path.resolve("/dir/file.json");
|
||||||
|
const extended = path.resolve("/dir/extended.json");
|
||||||
|
const fileContent = {
|
||||||
|
"extends": extended,
|
||||||
|
"default": true,
|
||||||
|
"MD001": false
|
||||||
|
};
|
||||||
|
const extendedContent = {
|
||||||
|
"MD001": true,
|
||||||
|
"MD002": true
|
||||||
|
};
|
||||||
|
const fsApi = {
|
||||||
|
"accessSync": (p) => {
|
||||||
|
t.is(p, extended);
|
||||||
|
},
|
||||||
|
"readFileSync": (p) => {
|
||||||
|
switch (p) {
|
||||||
|
case file:
|
||||||
|
t.is(p, file);
|
||||||
|
return JSON.stringify(fileContent);
|
||||||
|
case extended:
|
||||||
|
t.is(p, extended);
|
||||||
|
return JSON.stringify(extendedContent);
|
||||||
|
default:
|
||||||
|
return t.fail();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const actual = markdownlint.readConfigSync(file, null, fsApi);
|
||||||
|
const expected = {
|
||||||
|
...extendedContent,
|
||||||
|
...fileContent
|
||||||
|
};
|
||||||
|
delete expected.extends;
|
||||||
|
t.deepEqual(actual, expected, "Config object not correct.");
|
||||||
|
});
|
||||||
|
|
||||||
test("configBadHybridSync", (t) => {
|
test("configBadHybridSync", (t) => {
|
||||||
t.plan(1);
|
t.plan(1);
|
||||||
t.throws(
|
t.throws(
|
||||||
|
|
@ -1367,6 +1509,49 @@ test.cb("configSinglePromise", (t) => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test.cb("configCustomFileSystemPromise", (t) => {
|
||||||
|
t.plan(4);
|
||||||
|
const file = path.resolve("/dir/file.json");
|
||||||
|
const extended = path.resolve("/dir/extended.json");
|
||||||
|
const fileContent = {
|
||||||
|
"extends": extended,
|
||||||
|
"default": true,
|
||||||
|
"MD001": false
|
||||||
|
};
|
||||||
|
const extendedContent = {
|
||||||
|
"MD001": true,
|
||||||
|
"MD002": true
|
||||||
|
};
|
||||||
|
const fsApi = {
|
||||||
|
"access": (p, m, cb) => {
|
||||||
|
t.is(p, extended);
|
||||||
|
return (cb || m)();
|
||||||
|
},
|
||||||
|
"readFile": (p, o, cb) => {
|
||||||
|
switch (p) {
|
||||||
|
case file:
|
||||||
|
t.is(p, file);
|
||||||
|
return cb(null, JSON.stringify(fileContent));
|
||||||
|
case extended:
|
||||||
|
t.is(p, extended);
|
||||||
|
return cb(null, JSON.stringify(extendedContent));
|
||||||
|
default:
|
||||||
|
return t.fail();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
markdownlint.promises.readConfig(file, null, fsApi)
|
||||||
|
.then((actual) => {
|
||||||
|
const expected = {
|
||||||
|
...extendedContent,
|
||||||
|
...fileContent
|
||||||
|
};
|
||||||
|
delete expected.extends;
|
||||||
|
t.deepEqual(actual, expected, "Config object not correct.");
|
||||||
|
t.end();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
test.cb("configBadFilePromise", (t) => {
|
test.cb("configBadFilePromise", (t) => {
|
||||||
t.plan(2);
|
t.plan(2);
|
||||||
markdownlint.promises.readConfig("./test/config/config-badfile.json")
|
markdownlint.promises.readConfig("./test/config/config-badfile.json")
|
||||||
|
|
|
||||||
43
test/proper-names-links.md
Normal file
43
test/proper-names-links.md
Normal file
|
|
@ -0,0 +1,43 @@
|
||||||
|
# Proper names in links
|
||||||
|
|
||||||
|
javascript {MD044}
|
||||||
|
|
||||||
|
Learn about JavaScript here: https://example.com/javascript/about
|
||||||
|
|
||||||
|
Learn about JavaScript here: <https://example.com/javascript/about>
|
||||||
|
|
||||||
|
Learn about [JavaScript](https://example.com/javascript/about).
|
||||||
|
|
||||||
|
Learn about [JavaScript](wiki/javascript/about).
|
||||||
|
|
||||||
|
Learn about [JavaScript](wiki/javascript).
|
||||||
|
|
||||||
|
Learn about [JavaScript](javascript/about).
|
||||||
|
|
||||||
|
Learn about [JavaScript](javascript).
|
||||||
|
|
||||||
|
Learn about [JavaScript][js].
|
||||||
|
|
||||||
|
Learn about [JavaScript][example-js].
|
||||||
|
|
||||||
|
Learn about [JavaScript][javascript].
|
||||||
|
|
||||||
|
Learn about [javascript][js]. {MD044}
|
||||||
|
|
||||||
|
Learn about [javascript][example-js]. {MD044}
|
||||||
|
|
||||||
|
Learn about [javascript]. {MD044}
|
||||||
|
|
||||||
|
[js]: https://example.com/javascript/about
|
||||||
|
[example-js]: javascript
|
||||||
|
[javascript]: https://example.com/js
|
||||||
|
[javascript]: https://example.com/js {MD044}
|
||||||
|
|
||||||
|
<!-- markdownlint-configure-file {
|
||||||
|
"proper-names": {
|
||||||
|
"names": [
|
||||||
|
"JavaScript"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"no-bare-urls": false
|
||||||
|
} -->
|
||||||
|
|
@ -22,4 +22,22 @@ node.js is runtime
|
||||||
|
|
||||||
A short paragraph
|
A short paragraph
|
||||||
about node.js and {MD044}
|
about node.js and {MD044}
|
||||||
javascript. {MD044}
|
also javascript. {MD044}
|
||||||
|
|
||||||
|
`javascript`
|
||||||
|
|
||||||
|
`code
|
||||||
|
javascript`
|
||||||
|
|
||||||
|
`code
|
||||||
|
javascript
|
||||||
|
code`
|
||||||
|
|
||||||
|
`javascript
|
||||||
|
code`
|
||||||
|
|
||||||
|
text JavaScript text `javascript` text JavaScript text
|
||||||
|
text `javascript` text JavaScript text `javascript` text
|
||||||
|
|
||||||
|
text javascript text `javascript` text {MD044}
|
||||||
|
text `javascript` text javascript text {MD044}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@
|
||||||
"github.com",
|
"github.com",
|
||||||
"github.com/about",
|
"github.com/about",
|
||||||
"npm",
|
"npm",
|
||||||
"NPM",
|
|
||||||
"Vue",
|
"Vue",
|
||||||
"Vuex",
|
"Vuex",
|
||||||
"vue-router"
|
"vue-router"
|
||||||
|
|
|
||||||
|
|
@ -32,14 +32,16 @@ The library vue-router
|
||||||
|
|
||||||
Not Vue-router {MD044}
|
Not Vue-router {MD044}
|
||||||
|
|
||||||
Or vue-router-extra {MD044}
|
But vue-router-extra is different
|
||||||
|
|
||||||
Or extra-vue-router {MD044}
|
As is extra-vue-router
|
||||||
|
|
||||||
Quoted "Vue" and "vue-router"
|
Quoted "Vue" and "vue-router"
|
||||||
|
|
||||||
Emphasized *Vue* and *vue-router*
|
Emphasized *Vue* and *vue-router*
|
||||||
|
|
||||||
|
Underscored _Vue_ and _vue-router_
|
||||||
|
|
||||||
Call it npm
|
Call it npm
|
||||||
Or NPM
|
|
||||||
But not Npm {MD044}
|
But not Npm {MD044}
|
||||||
|
Or NPM {MD044}
|
||||||
|
|
|
||||||
15
test/proper-names-substrings.md
Normal file
15
test/proper-names-substrings.md
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
# Proper Names as Substrings
|
||||||
|
|
||||||
|
The proper case is: @aws-control-tower
|
||||||
|
|
||||||
|
Similarly, aws-vault and AWS and @aws-control-tower are all correct.
|
||||||
|
|
||||||
|
<!-- markdownlint-configure-file {
|
||||||
|
"proper-names": {
|
||||||
|
"names": [
|
||||||
|
"AWS",
|
||||||
|
"aws-vault",
|
||||||
|
"@aws-control-tower"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
} -->
|
||||||
|
|
@ -72,12 +72,12 @@ javascript. {MD044}
|
||||||
|
|
||||||
{MD044} `javascript`
|
{MD044} `javascript`
|
||||||
|
|
||||||
{MD044} `code
|
`code
|
||||||
javascript`
|
javascript` {MD044}
|
||||||
|
|
||||||
{MD044} `code
|
`code
|
||||||
javascript
|
javascript {MD044}
|
||||||
code`
|
code`
|
||||||
|
|
||||||
{MD044} `javascript
|
`javascript {MD044}
|
||||||
code`
|
code`
|
||||||
|
|
|
||||||
14
test/required-headings-missing-last-zero-or-more.json
Normal file
14
test/required-headings-missing-last-zero-or-more.json
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
"default": true,
|
||||||
|
"MD043": {
|
||||||
|
"headings": [
|
||||||
|
"# One",
|
||||||
|
"*",
|
||||||
|
"### Three",
|
||||||
|
"*",
|
||||||
|
"### Five",
|
||||||
|
"*",
|
||||||
|
"#### FOO"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
15
test/required-headings-missing-last-zero-or-more.md
Normal file
15
test/required-headings-missing-last-zero-or-more.md
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
# One
|
||||||
|
|
||||||
|
## Two
|
||||||
|
|
||||||
|
### THREE
|
||||||
|
|
||||||
|
## four
|
||||||
|
|
||||||
|
## Five
|
||||||
|
|
||||||
|
### SiX
|
||||||
|
|
||||||
|
#### FOO
|
||||||
|
|
||||||
|
{MD043:16}
|
||||||
14
test/required-headings-missing-middle-zero-or-more.json
Normal file
14
test/required-headings-missing-middle-zero-or-more.json
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
"default": true,
|
||||||
|
"MD043": {
|
||||||
|
"headings": [
|
||||||
|
"# One",
|
||||||
|
"*",
|
||||||
|
"### Three",
|
||||||
|
"*",
|
||||||
|
"### FOO",
|
||||||
|
"*",
|
||||||
|
"#### 7"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
15
test/required-headings-missing-middle-zero-or-more.md
Normal file
15
test/required-headings-missing-middle-zero-or-more.md
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
# One
|
||||||
|
|
||||||
|
## Two
|
||||||
|
|
||||||
|
### THREE
|
||||||
|
|
||||||
|
## four
|
||||||
|
|
||||||
|
## Five
|
||||||
|
|
||||||
|
### SiX
|
||||||
|
|
||||||
|
#### 7
|
||||||
|
|
||||||
|
{MD043:16}
|
||||||
11
test/required-headings-zero-or-more-last.json
Normal file
11
test/required-headings-zero-or-more-last.json
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"default": true,
|
||||||
|
"MD043": {
|
||||||
|
"headings": [
|
||||||
|
"# One",
|
||||||
|
"## Two",
|
||||||
|
"### Three",
|
||||||
|
"*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
5
test/required-headings-zero-or-more-last.md
Normal file
5
test/required-headings-zero-or-more-last.md
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
# One
|
||||||
|
|
||||||
|
## Two
|
||||||
|
|
||||||
|
### THREE
|
||||||
|
|
@ -4,8 +4,6 @@
|
||||||
|-------------|-----------------|
|
|-------------|-----------------|
|
||||||
|`(?:\["'\](?<1>\[^"'\]*)["']|(?<1>\S+))`|...|
|
|`(?:\["'\](?<1>\[^"'\]*)["']|(?<1>\S+))`|...|
|
||||||
|
|
||||||
{MD011:5}
|
|
||||||
|
|
||||||
|Pattern|Description|
|
|Pattern|Description|
|
||||||
|-------------|-----------------|
|
|-------------|-----------------|
|
||||||
|`(?:\["'\](?<1>\[^"'\]*)["']\|(?<1>\S+))`|...|
|
|`(?:\["'\](?<1>\[^"'\]*)["']\|(?<1>\S+))`|...|
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,26 @@
|
||||||
# reversed_link
|
# reversed_link
|
||||||
|
|
||||||
|
Go to [this website](https://www.example.com)
|
||||||
|
|
||||||
Go to (this website)[https://www.example.com] {MD011}
|
Go to (this website)[https://www.example.com] {MD011}
|
||||||
|
|
||||||
|
Go to (this)[website](https://www.example.com)
|
||||||
|
|
||||||
However, this shouldn't trigger inside code blocks:
|
However, this shouldn't trigger inside code blocks:
|
||||||
|
|
||||||
myObj.getFiles("test")[0]
|
myObj.getFiles("test")[0]
|
||||||
|
|
||||||
|
Nor code fences:
|
||||||
|
|
||||||
|
```js
|
||||||
|
myObj.getFiles(test)[0];
|
||||||
|
```
|
||||||
|
|
||||||
Nor inline code: `myobj.getFiles("test")[0]`
|
Nor inline code: `myobj.getFiles("test")[0]`
|
||||||
|
|
||||||
Two (issues)[https://www.example.com/one] in {MD011}
|
Two (issues)[https://www.example.com/one] in {MD011}
|
||||||
the (same text)[https://www.example.com/two]. {MD011}
|
the (same text)[https://www.example.com/two]. {MD011}
|
||||||
|
|
||||||
<!-- markdownlint-disable line-length -->
|
|
||||||
Two (issues)[https://www.example.com/three] on the (same line)[https://www.example.com/four]. {MD011}
|
Two (issues)[https://www.example.com/three] on the (same line)[https://www.example.com/four]. {MD011}
|
||||||
|
|
||||||
`code code
|
`code code
|
||||||
|
|
@ -31,16 +40,40 @@ var IDENT_RE = '([a-zA-Z]|\\.[a-zA-Z.])[a-zA-Z0-9._]*'; {MD011}
|
||||||
|
|
||||||
begin: /\B(([\/.])[\w\-.\/=]+)+/, {MD011}
|
begin: /\B(([\/.])[\w\-.\/=]+)+/, {MD011}
|
||||||
|
|
||||||
{begin: '%r\\(', end: '\\)[a-z]*'} {MD011}
|
{begin: '%r\\(', end: '\\)[a-z]*'}
|
||||||
|
|
||||||
return /(?:(?:(^|\/)[!.])|[*?+()|\[\]{}]|[+@]\()/.test(str); {MD011}
|
return /(?:(?:(^|\/)[!.])|[*?+()|\[\]{}]|[+@]\()/.test(str); {MD011}
|
||||||
|
|
||||||
## Escaped Parens
|
## Escaped Parens
|
||||||
|
|
||||||
(reversed)[link] {MD011}
|
(reversed)[link]
|
||||||
|
|
||||||
a ) a ( a )[a]~ {MD011}
|
a ) a ( a )[a]~
|
||||||
|
|
||||||
<!-- markdownlint-disable no-inline-html-->
|
a<pre>) a ( a )[a]~</pre>
|
||||||
|
|
||||||
a<pre>) a ( a )[a]~</pre> {MD011}
|
## Backslash Escapes
|
||||||
|
|
||||||
|
xxx(xxx)[xxx] {MD011}
|
||||||
|
|
||||||
|
xxx\(xxx)[xxx]
|
||||||
|
|
||||||
|
xxx(xxx\)[xxx]
|
||||||
|
|
||||||
|
xxx(xxx)\[xxx]
|
||||||
|
|
||||||
|
xxx(xxx)[xxx\]
|
||||||
|
|
||||||
|
## Consecutive Links
|
||||||
|
|
||||||
|
text [link](destination) text [link](destination) text
|
||||||
|
text [link](destination)[link](destination) text
|
||||||
|
text [link](destination)[link](destination)[link](destination) text
|
||||||
|
|
||||||
|
text (reversed)[link] text (reversed)[link] text {MD011}
|
||||||
|
|
||||||
|
<!-- markdownlint-configure-file {
|
||||||
|
"code-block-style": false,
|
||||||
|
"line-length": false,
|
||||||
|
"no-inline-html": false
|
||||||
|
} -->
|
||||||
|
|
|
||||||
|
|
@ -120,3 +120,10 @@ multi-line emphasis
|
||||||
scenario * that
|
scenario * that
|
||||||
should * not trigger
|
should * not trigger
|
||||||
violations * either`.
|
violations * either`.
|
||||||
|
|
||||||
|
<!-- markdownlint-disable MD031 -->
|
||||||
|
*text
|
||||||
|
```text
|
||||||
|
```
|
||||||
|
text *
|
||||||
|
<!-- markdownlint-restore -->
|
||||||
|
|
|
||||||
|
|
@ -341,3 +341,7 @@ text [reference*link] star * star text
|
||||||
| x** y | x** y |
|
| x** y | x** y |
|
||||||
| x _ y | x _ y |
|
| x _ y | x _ y |
|
||||||
| x__ y | x__ y |
|
| x__ y | x__ y |
|
||||||
|
|
||||||
|
```yaml /* autogenerated */
|
||||||
|
# YAML...
|
||||||
|
```
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue