mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 14:00:13 +01:00
Merge pull request #1 from rodway93/next
This commit is contained in:
commit
3917c7a966
124 changed files with 76831 additions and 1467 deletions
1
.github/dictionary.txt
vendored
1
.github/dictionary.txt
vendored
|
|
@ -32,6 +32,7 @@ config.
|
|||
CVE-\d+-\d+
|
||||
docs-util
|
||||
ECMAScript
|
||||
encodings
|
||||
ES2015
|
||||
ES6
|
||||
ESLint
|
||||
|
|
|
|||
65
.github/instructions/codacy.instructions.md
vendored
Normal file
65
.github/instructions/codacy.instructions.md
vendored
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
---
|
||||
description: Configuration for AI behavior when interacting with Codacy's MCP Server
|
||||
applyTo: '**'
|
||||
---
|
||||
---
|
||||
# Codacy Rules
|
||||
Configuration for AI behavior when interacting with Codacy's MCP Server
|
||||
|
||||
## CRITICAL: After ANY successful `edit_file` or `reapply` operation
|
||||
- YOU MUST IMMEDIATELY run the `codacy_cli_analyze` tool from Codacy's MCP Server for each file that was edited, with:
|
||||
- `rootPath`: set to the workspace path
|
||||
- `file`: set to the path of the edited file
|
||||
- `tool`: leave empty or unset
|
||||
- If any issues are found in the new edits, propose and apply fixes for them.
|
||||
- > NOTE: Failure to follow this rule is considered a critical error.
|
||||
|
||||
## After every response
|
||||
- If you made any file edits in this conversation, verify you ran `codacy_cli_analyze` tool from Codacy's MCP Server
|
||||
|
||||
## When there are no Codacy MCP Server tools available, or the MCP Server is not reachable
|
||||
- Suggest the user the following troubleshooting steps:
|
||||
- Try to reset the MCP on the extension
|
||||
- If the user is using VSCode, suggest them to review their Copilot > MCP settings in Github, under their organization or personal account. Refer them to Settings > Copilot > Enable MCP servers in Copilot. Suggested URL (https://github.com/settings/copilot/features) or https://github.com/organizations/{organization-name}/settings/copilot/features (This can only be done by their organization admins / owners)
|
||||
- If none of the above steps work, suggest the user to contact Codacy support
|
||||
|
||||
## Trying to call a tool that needs a rootPath as a parameter
|
||||
- Always use the standard, non-URL-encoded file system path
|
||||
|
||||
## CRITICAL: Dependencies and Security Checks
|
||||
- IMMEDIATELY after ANY of these actions:
|
||||
- Running npm/yarn/pnpm install
|
||||
- Adding dependencies to package.json
|
||||
- Adding requirements to requirements.txt
|
||||
- Adding dependencies to pom.xml
|
||||
- Adding dependencies to build.gradle
|
||||
- Any other package manager operations
|
||||
- You MUST run the `codacy_cli_analyze` tool with:
|
||||
- `rootPath`: set to the workspace path
|
||||
- `tool`: set to "trivy"
|
||||
- `file`: leave empty or unset
|
||||
- If any vulnerabilities are found because of the newly added packages:
|
||||
- Stop all other operations
|
||||
- Propose and apply fixes for the security issues
|
||||
- Only continue with the original task after security issues are resolved
|
||||
- EXAMPLE:
|
||||
- After: npm install react-markdown
|
||||
- Do: Run codacy_cli_analyze with trivy
|
||||
- Before: Continuing with any other tasks
|
||||
|
||||
## General
|
||||
- Repeat the relevant steps for each modified file.
|
||||
- "Propose fixes" means to both suggest and, if possible, automatically apply the fixes.
|
||||
- You MUST NOT wait for the user to ask for analysis or remind you to run the tool.
|
||||
- Do not run `codacy_cli_analyze` looking for changes in duplicated code or code complexity metrics.
|
||||
- Do not run `codacy_cli_analyze` looking for changes in code coverage.
|
||||
- Do not try to manually install Codacy CLI using either brew, npm, npx, or any other package manager.
|
||||
- If the Codacy CLI is not installed, just run the `codacy_cli_analyze` tool from Codacy's MCP Server.
|
||||
- When calling `codacy_cli_analyze`, only send provider, organization and repository if the project is a git repository.
|
||||
|
||||
## Whenever a call to a Codacy tool that uses `repository` or `organization` as a parameter returns a 404 error
|
||||
- Offer to run the `codacy_setup_repository` tool to add the repository to Codacy
|
||||
- If the user accepts, run the `codacy_setup_repository` tool
|
||||
- Do not ever try to run the `codacy_setup_repository` tool on your own
|
||||
- After setup, immediately retry the action that failed (only retry once)
|
||||
---
|
||||
7
.github/workflows/checkers.yml
vendored
7
.github/workflows/checkers.yml
vendored
|
|
@ -12,17 +12,16 @@ jobs:
|
|||
linkcheck:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
- uses: JustinBeckwith/linkinator-action@v1.11.0
|
||||
with:
|
||||
linksToSkip: '^https://github.com/.*/search\?q= ^https://opensource.org/ ^https://unix.stackexchange.com/'
|
||||
linksToSkip: '^https://github.com/ ^https://www.jwz.org/ ^https://opensource.org/ ^https://unix.stackexchange.com/'
|
||||
paths: '*.md doc/*.md helpers/*.md'
|
||||
timeout: 60000
|
||||
|
||||
spellcheck:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
- uses: tbroadley/spellchecker-cli-action@v1
|
||||
with:
|
||||
dictionaries: '.github/dictionary.txt'
|
||||
|
|
|
|||
12
.github/workflows/ci.yml
vendored
12
.github/workflows/ci.yml
vendored
|
|
@ -17,16 +17,16 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
os: [macos-latest, ubuntu-latest, windows-latest]
|
||||
node-version: [ 18, 20, 22, 23 ]
|
||||
node-version: [ 20, 22, 24 ]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@v5
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Install Dependencies
|
||||
run: npm install --no-package-lock
|
||||
run: npm install
|
||||
- name: Run CI Tests
|
||||
run: npm run ci
|
||||
|
||||
|
|
@ -34,13 +34,13 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
- name: Use pnpm latest
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: latest
|
||||
- name: Use Node.js latest
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@v5
|
||||
with:
|
||||
node-version: latest
|
||||
- name: Install dependencies
|
||||
|
|
|
|||
2
.github/workflows/codeql-analysis.yml
vendored
2
.github/workflows/codeql-analysis.yml
vendored
|
|
@ -21,7 +21,7 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v3
|
||||
|
|
|
|||
6
.github/workflows/test-repos.yml
vendored
6
.github/workflows/test-repos.yml
vendored
|
|
@ -18,13 +18,13 @@ jobs:
|
|||
node-version: [ latest ]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@v5
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Install Dependencies
|
||||
run: npm install --no-package-lock
|
||||
run: npm install
|
||||
- name: Clone Test Repos
|
||||
run: npm run clone-test-repos
|
||||
- name: Lint Test Repos
|
||||
|
|
|
|||
41
.github/workflows/update-test-repos.yml
vendored
Normal file
41
.github/workflows/update-test-repos.yml
vendored
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
name: UpdateTestRepos
|
||||
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- 'dependabot/**'
|
||||
schedule:
|
||||
- cron: '30 12 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
update:
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
ref: next
|
||||
- uses: actions/setup-node@v5
|
||||
- run: git config user.email "david@dlaa.me"
|
||||
- run: git config user.name "David Anson"
|
||||
- run: git checkout -b update-test-repos-$GITHUB_RUN_ID
|
||||
- run: npm install
|
||||
- run: npm run update-test-repos
|
||||
env:
|
||||
AVA_FORCE_CI: not-ci
|
||||
- run: git diff --exit-code
|
||||
continue-on-error: true
|
||||
id: diff
|
||||
- run: git add .
|
||||
if: ${{ success() && steps.diff.outcome == 'failure' }}
|
||||
- run: git commit -m "Update test repository snapshots."
|
||||
if: ${{ success() && steps.diff.outcome == 'failure' }}
|
||||
- run: git push --set-upstream origin update-test-repos-$GITHUB_RUN_ID
|
||||
if: ${{ success() && steps.diff.outcome == 'failure' }}
|
||||
- run: gh pr create --base next --body "" --title "Update test repository snapshots."
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
if: ${{ success() && steps.diff.outcome == 'failure' }}
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -9,3 +9,7 @@ npm-debug.log
|
|||
test-repos
|
||||
.DS_Store
|
||||
.vscode
|
||||
|
||||
|
||||
#Ignore vscode AI rules (válido por 1 hora a partir de 18/09/2025)
|
||||
.github\instructions\codacy.instructions.md
|
||||
|
|
|
|||
10
CHANGELOG.md
10
CHANGELOG.md
|
|
@ -1,5 +1,15 @@
|
|||
# Changelog
|
||||
|
||||
## 0.38.0
|
||||
|
||||
- Add MD059/descriptive-link-text
|
||||
- Improve MD025/MD027/MD036/MD038/MD041/MD043/MD045/MD051/MD052
|
||||
- `markdown-it` parser no longer a production dependency (breaking change)
|
||||
- Add `markdownItFactory` option, remove `markdownItPlugins` option
|
||||
- Remove support for end-of-life Node version 18
|
||||
- Improve performance
|
||||
- Update dependencies
|
||||
|
||||
## 0.37.4
|
||||
|
||||
- Stop using `module.createRequire`, export `resolveModule`
|
||||
|
|
|
|||
91
README.md
91
README.md
|
|
@ -149,6 +149,7 @@ playground for learning and exploring.
|
|||
- **[MD056](doc/md056.md)** *table-column-count* - Table column count
|
||||
- **[MD058](doc/md058.md)** *blanks-around-tables* - Tables should be surrounded by blank lines
|
||||
- **[MD059](doc/md059.md)** *descriptive-link-text* - Link text should be descriptive
|
||||
- **[MD060](doc/md060.md)** *table-column-style* - Table column style
|
||||
|
||||
<!-- markdownlint-restore -->
|
||||
|
||||
|
|
@ -190,7 +191,7 @@ rules at once.
|
|||
- **`ol`** - `MD029`, `MD030`, `MD032`
|
||||
- **`spaces`** - `MD018`, `MD019`, `MD020`, `MD021`, `MD023`
|
||||
- **`spelling`** - `MD044`
|
||||
- **`table`** - `MD055`, `MD056`, `MD058`
|
||||
- **`table`** - `MD055`, `MD056`, `MD058`, `MD060`
|
||||
- **`ul`** - `MD004`, `MD005`, `MD007`, `MD030`, `MD032`
|
||||
- **`url`** - `MD034`
|
||||
- **`whitespace`** - `MD009`, `MD010`, `MD012`, `MD027`, `MD028`, `MD030`,
|
||||
|
|
@ -421,9 +422,9 @@ object.
|
|||
See [ValidatingConfiguration.md](schema/ValidatingConfiguration.md) for ways to
|
||||
use the JSON Schema to validate configuration.
|
||||
|
||||
For more advanced scenarios, styles can reference and extend other styles.
|
||||
The `readConfig` and `readConfigSync` functions can be used to read such
|
||||
styles.
|
||||
For more advanced scenarios, styles can reference and build upon other styles
|
||||
via the `extends` keyword and a file path or (installed) package name. The
|
||||
`readConfig` function can be used to read such aggregate styles from code.
|
||||
|
||||
For example, assuming a `base.json` configuration file:
|
||||
|
||||
|
|
@ -619,28 +620,15 @@ By default, properly-formatted inline comments can be used to create exceptions
|
|||
for parts of a document. Setting `noInlineConfig` to `true` ignores all such
|
||||
comments.
|
||||
|
||||
##### options.resultVersion
|
||||
##### ~~options.resultVersion~~
|
||||
|
||||
Type: `Number`
|
||||
This property is *deprecated* and should be removed. The default format of the
|
||||
`result` object remains the same as setting `resultVersion` to `3`. For
|
||||
continued access to other (previously *deprecated*) formats:
|
||||
|
||||
Specifies which version of the `result` object to return (see the "Usage"
|
||||
section below for examples).
|
||||
|
||||
Passing a `resultVersion` of `0` corresponds to the original, simple format
|
||||
where each error is identified by rule name and line number. *Deprecated*
|
||||
|
||||
Passing a `resultVersion` of `1` corresponds to a detailed format where each
|
||||
error includes information about the line number, rule name, alias, description,
|
||||
as well as any additional detail or context that is available. *Deprecated*
|
||||
|
||||
Passing a `resultVersion` of `2` corresponds to a detailed format where each
|
||||
error includes information about the line number, rule names, description, as
|
||||
well as any additional detail or context that is available. *Deprecated*
|
||||
|
||||
Passing a `resultVersion` of `3` corresponds to the detailed version `2` format
|
||||
with additional information about how to fix automatically-fixable errors. In
|
||||
this mode, all errors that occur on each line are reported (other versions
|
||||
report only the first error for each rule). This is the default behavior.
|
||||
```javascript
|
||||
import { convertToResultVersion0, convertToResultVersion1, convertToResultVersion2 } from "markdownlint/helpers";
|
||||
```
|
||||
|
||||
##### options.strings
|
||||
|
||||
|
|
@ -671,16 +659,16 @@ Standard completion callback.
|
|||
|
||||
Type: `Object`
|
||||
|
||||
Call `result.toString()` for convenience or see below for an example of the
|
||||
structure of the `result` object. Passing the value `true` to `toString()`
|
||||
uses rule aliases (ex: `no-hard-tabs`) instead of names (ex: `MD010`).
|
||||
Map of input file names and string identifiers to issues within.
|
||||
|
||||
See the [Usage section](#usage) for an example of the structure of this object.
|
||||
|
||||
### Config
|
||||
|
||||
The `options.config` configuration object is simple and can be stored in a file
|
||||
for readability and easy reuse. The `readConfig` and `readConfigSync` functions
|
||||
load configuration settings and support the `extends` keyword for referencing
|
||||
other files (see above).
|
||||
for readability and easy reuse. The `readConfig` function loads configuration
|
||||
settings and supports the `extends` keyword for referencing files or packages
|
||||
(see above).
|
||||
|
||||
By default, configuration files are parsed as JSON (and named
|
||||
`.markdownlint.json`). Custom parsers can be provided to handle other formats
|
||||
|
|
@ -849,7 +837,7 @@ console.log(getVersion());
|
|||
|
||||
## Usage
|
||||
|
||||
Invoke `lint` and use the `result` object's `toString` method:
|
||||
Invoke `lint` as an asynchronous call:
|
||||
|
||||
```javascript
|
||||
import { lint as lintAsync } from "markdownlint/async";
|
||||
|
|
@ -864,34 +852,21 @@ const options = {
|
|||
|
||||
lintAsync(options, function callback(error, results) {
|
||||
if (!error && results) {
|
||||
console.log(results.toString());
|
||||
console.dir(results, { "colors": true, "depth": null });
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
Output:
|
||||
|
||||
```text
|
||||
bad.string: 3: MD010/no-hard-tabs Hard tabs [Column: 19]
|
||||
bad.string: 1: MD018/no-missing-space-atx No space after hash on atx style heading [Context: "#bad.string"]
|
||||
bad.string: 3: MD018/no-missing-space-atx No space after hash on atx style heading [Context: "#This string fails some rules."]
|
||||
bad.string: 1: MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "#bad.string"]
|
||||
bad.md: 3: MD010/no-hard-tabs Hard tabs [Column: 17]
|
||||
bad.md: 1: MD018/no-missing-space-atx No space after hash on atx style heading [Context: "#bad.md"]
|
||||
bad.md: 3: MD018/no-missing-space-atx No space after hash on atx style heading [Context: "#This file fails some rules."]
|
||||
bad.md: 1: MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "#bad.md"]
|
||||
```
|
||||
|
||||
Or as a synchronous call:
|
||||
|
||||
```javascript
|
||||
import { lint as lintSync } from "markdownlint/sync";
|
||||
|
||||
const results = lintSync(options);
|
||||
console.log(results.toString());
|
||||
console.dir(results, { "colors": true, "depth": null });
|
||||
```
|
||||
|
||||
To examine the `result` object directly via a `Promise`-based call:
|
||||
Or as a `Promise`-based call:
|
||||
|
||||
```javascript
|
||||
import { lint as lintPromise } from "markdownlint/promise";
|
||||
|
|
@ -900,7 +875,7 @@ const results = await lintPromise(options);
|
|||
console.dir(results, { "colors": true, "depth": null });
|
||||
```
|
||||
|
||||
Output:
|
||||
All of which return an object like:
|
||||
|
||||
```json
|
||||
{
|
||||
|
|
@ -912,38 +887,36 @@ Output:
|
|||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md010.md",
|
||||
"errorDetail": "Column: 17",
|
||||
"errorContext": null,
|
||||
"errorRange": [ 17, 1 ] },
|
||||
"errorRange": [ 17, 1 ],
|
||||
"fixInfo": { "editColumn": 17, "deleteCount": 1, "insertText": ' ' } }
|
||||
{ "lineNumber": 1,
|
||||
"ruleNames": [ "MD018", "no-missing-space-atx" ],
|
||||
"ruleDescription": "No space after hash on atx style heading",
|
||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md018.md",
|
||||
"errorDetail": null,
|
||||
"errorContext": "#bad.md",
|
||||
"errorRange": [ 1, 2 ] },
|
||||
"errorRange": [ 1, 2 ],
|
||||
"fixInfo": { "editColumn": 2, "insertText": ' ' } }
|
||||
{ "lineNumber": 3,
|
||||
"ruleNames": [ "MD018", "no-missing-space-atx" ],
|
||||
"ruleDescription": "No space after hash on atx style heading",
|
||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md018.md",
|
||||
"errorDetail": null,
|
||||
"errorContext": "#This file fails\tsome rules.",
|
||||
"errorRange": [ 1, 2 ] },
|
||||
"errorRange": [ 1, 2 ],
|
||||
"fixInfo": { "editColumn": 2, "insertText": ' ' } }
|
||||
{ "lineNumber": 1,
|
||||
"ruleNames": [ "MD041", "first-line-heading", "first-line-h1" ],
|
||||
"ruleDescription": "First line in a file should be a top-level heading",
|
||||
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/md041.md",
|
||||
"errorDetail": null,
|
||||
"errorContext": "#bad.md",
|
||||
"errorRange": null }
|
||||
"errorRange": null,
|
||||
"fixInfo": null }
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Integration with the [gulp](https://gulpjs.com/) build system is
|
||||
straightforward: [`gulpfile.cjs`](example/gulpfile.cjs).
|
||||
|
||||
Integration with the [Grunt](https://gruntjs.com/) build system is similar:
|
||||
[`Gruntfile.cjs`](example/Gruntfile.cjs).
|
||||
|
||||
## Browser
|
||||
|
||||
`markdownlint` also works in the browser.
|
||||
|
|
@ -969,7 +942,7 @@ const options = {
|
|||
}
|
||||
};
|
||||
|
||||
const results = globalThis.markdownlint.lintSync(options).toString();
|
||||
const results = globalThis.markdownlint.lintSync(options);
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
export { applyFixes, getVersion } from "markdownlint";
|
||||
export { lint as lintSync } from "markdownlint/sync";
|
||||
export { frontMatterRe } from "markdownlint/helpers";
|
||||
export { compile, parse, postprocess, preprocess } from "micromark";
|
||||
export { directive, directiveHtml } from "micromark-extension-directive";
|
||||
export { gfmAutolinkLiteral, gfmAutolinkLiteralHtml } from "micromark-extension-gfm-autolink-literal";
|
||||
|
|
|
|||
|
|
@ -47,6 +47,9 @@ textarea {
|
|||
font-style: italic;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
.error {
|
||||
background: rgb(255, 0, 0, 0.3);
|
||||
}
|
||||
.flex-rows {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
|
@ -64,7 +67,7 @@ textarea {
|
|||
min-height: 0;
|
||||
}
|
||||
.highlight {
|
||||
background: yellow;
|
||||
background: rgb(255, 0, 0, 0.8);
|
||||
}
|
||||
.inset {
|
||||
box-sizing: border-box;
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@
|
|||
|
||||
// Renders Markdown to HTML
|
||||
function render(markdown) {
|
||||
markdown = markdown.replace(markdownlint.frontMatterRe, "");
|
||||
const match = /^\?renderer=([a-z-]+)$/.exec(globalThis.location.search);
|
||||
const renderer = match ? match[1] : "micromark";
|
||||
if (renderer === "markdown-it") {
|
||||
|
|
@ -78,13 +79,29 @@
|
|||
};
|
||||
try {
|
||||
return micromark.compile(compileOptions)(events);
|
||||
} catch (error) {
|
||||
} catch(error) {
|
||||
return `[Exception: "${error}"]`;
|
||||
}
|
||||
}
|
||||
return `[Unsupported renderer "${renderer}"]`;
|
||||
}
|
||||
|
||||
// Highlight error ranges
|
||||
function highlightErrors(results, className) {
|
||||
for (const result of results) {
|
||||
const { errorRange, lineNumber } = result;
|
||||
const line = document.getElementById(`l${lineNumber}`);
|
||||
line.classList.add(className);
|
||||
if (errorRange) {
|
||||
const [ col, len ] = errorRange;
|
||||
for (let i = 0; i < len; i++) {
|
||||
var char = document.getElementById(`l${lineNumber}c${col + i}`);
|
||||
char.classList.add(className);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Handle input
|
||||
function onMarkdownInput() {
|
||||
// Markdown
|
||||
|
|
@ -96,11 +113,14 @@
|
|||
var padding = lines.length.toString().replace(/\d/g, " ");
|
||||
numbered.innerHTML = lines
|
||||
.map(function mapNumberedLine(line, index) {
|
||||
line = sanitize(line);
|
||||
index++;
|
||||
var paddedIndex = (padding + index).slice(-padding.length);
|
||||
return "<span id='l" + index + "'><em>" + paddedIndex + "</em>: " +
|
||||
line + "</span>";
|
||||
return (
|
||||
`<span><em id='l${index}'>${paddedIndex}</em>: ` +
|
||||
// eslint-disable-next-line unicorn/prefer-spread
|
||||
line.split("").map((c, i) => `<span id='l${index}c${i + 1}'>${sanitize(c)}</span>`).join("") +
|
||||
"</span>"
|
||||
);
|
||||
}).join("\n");
|
||||
// Violations
|
||||
var options = {
|
||||
|
|
@ -115,7 +135,8 @@
|
|||
allLintErrors = markdownlint.lintSync(options).content;
|
||||
violations.innerHTML = allLintErrors.map(function mapResult(result) {
|
||||
var ruleName = result.ruleNames.slice(0, 2).join(" / ");
|
||||
return "<em><a href='#line' target='" + result.lineNumber + "'>" +
|
||||
var resultJson = encodeURIComponent(JSON.stringify(result)).replaceAll("'", "%27");
|
||||
return "<em><a href='#line' target='" + resultJson + "'>" +
|
||||
result.lineNumber + "</a></em> - <a href='" + result.ruleInformation +
|
||||
"'>" + ruleName + "</a> " +
|
||||
result.ruleDescription +
|
||||
|
|
@ -130,11 +151,13 @@
|
|||
"\"</span>]" :
|
||||
"") +
|
||||
(result.fixInfo ?
|
||||
" [<a href='#fix' target=\"" +
|
||||
encodeURIComponent(JSON.stringify(result)) +
|
||||
"\" class='detail'>Fix</a>]" :
|
||||
" [<a href='#fix' target='" +
|
||||
resultJson +
|
||||
"' class='detail'>Fix</a>]" :
|
||||
"");
|
||||
}).join("<br/>");
|
||||
// Highlight errors
|
||||
highlightErrors(allLintErrors, "error");
|
||||
}
|
||||
|
||||
// Load from a string or File object
|
||||
|
|
@ -177,29 +200,25 @@
|
|||
|
||||
// Handle violation navigation
|
||||
function onViolationClick(e) {
|
||||
const resultJson = JSON.parse(decodeURIComponent(e.target.target));
|
||||
switch (e.target.hash) {
|
||||
case "#fix":
|
||||
var errors = e.shiftKey ?
|
||||
allLintErrors :
|
||||
[ JSON.parse(decodeURIComponent(e.target.target)) ];
|
||||
[ resultJson ];
|
||||
var fixed = markdownlint.applyFixes(markdown.value, errors);
|
||||
markdown.value = fixed;
|
||||
onMarkdownInput();
|
||||
e.preventDefault();
|
||||
break;
|
||||
case "#line":
|
||||
var line = document.getElementById("l" + e.target.target);
|
||||
if (line) {
|
||||
var highlighted = document.getElementsByClassName("highlight");
|
||||
Array.prototype.forEach.call(
|
||||
highlighted,
|
||||
function forElement(element) {
|
||||
element.classList.remove("highlight");
|
||||
}
|
||||
);
|
||||
line.classList.add("highlight");
|
||||
line.scrollIntoView();
|
||||
// eslint-disable-next-line unicorn/no-useless-spread
|
||||
for (const element of [ ...document.getElementsByClassName("highlight") ]) {
|
||||
element.classList.remove("highlight");
|
||||
}
|
||||
highlightErrors([ resultJson ], "highlight");
|
||||
var line = document.getElementById(`l${resultJson.lineNumber}`);
|
||||
line.scrollIntoView();
|
||||
e.preventDefault();
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ const maxLineLength = 80;
|
|||
|
||||
const pathFor = (relativePath) => new URL(relativePath, import.meta.url);
|
||||
const inCode = (items) => items.map((item) => `\`${item}\``);
|
||||
const sortedComma = (items) => items.sort().join(", ");
|
||||
const sortedComma = (items) => items.toSorted().join(", ");
|
||||
const linesFrom = (text) => text.split(newLineRe);
|
||||
const wrapListItem = (line) => {
|
||||
const wrappedLines = [];
|
||||
|
|
@ -66,7 +66,7 @@ for (const rule of rules) {
|
|||
"Parameters:",
|
||||
""
|
||||
);
|
||||
for (const property of Object.keys(ruleData.properties).sort()) {
|
||||
for (const property of Object.keys(ruleData.properties).toSorted()) {
|
||||
const propData = ruleData.properties[property];
|
||||
const propType = [ propData.type ]
|
||||
.flat()
|
||||
|
|
@ -75,7 +75,7 @@ for (const rule of rules) {
|
|||
const defaultValue = Array.isArray(propData.default) ?
|
||||
JSON.stringify(propData.default) :
|
||||
propData.default;
|
||||
const allValues = propData.enum?.sort();
|
||||
const allValues = propData.enum?.toSorted();
|
||||
const listItem = `- \`${property}\`: ${propData.description} (` +
|
||||
`\`${propType}\`, default \`${defaultValue}\`` +
|
||||
(propData.enum ?
|
||||
|
|
|
|||
|
|
@ -26,6 +26,15 @@ level at a time:
|
|||
### Another Heading 3
|
||||
```
|
||||
|
||||
If [YAML](https://en.wikipedia.org/wiki/YAML) front matter is present and
|
||||
contains a `title` property (commonly used with blog posts), this rule treats
|
||||
that as a top level heading and will report a violation if the actual first
|
||||
heading is not a level 2 heading. To use a different property name in the
|
||||
front matter, specify the text of a regular expression via the
|
||||
`front_matter_title` parameter. To disable the use of front matter by this
|
||||
rule, specify `""` for `front_matter_title`. When front matter is not present,
|
||||
the first heading can be any level.
|
||||
|
||||
Rationale: Headings represent the structure of a document and can be confusing
|
||||
when skipped - especially for accessibility scenarios. More information:
|
||||
<https://www.w3.org/WAI/tutorials/page-structure/headings/>.
|
||||
|
|
|
|||
|
|
@ -39,3 +39,9 @@ parameter to the desired value.
|
|||
|
||||
Rationale: Hard tabs are often rendered inconsistently by different editors and
|
||||
can be harder to work with than spaces.
|
||||
|
||||
More information:
|
||||
|
||||
- <https://agiletribe.wordpress.com/2011/10/27/18-dont-use-tab-characters/>
|
||||
- <https://www.jwz.org/doc/tabs-vs-spaces.html>
|
||||
- <https://adamspiers.org/computing/why_no_tabs.html>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,11 @@ To fix this, use 'pure' Markdown instead of including raw HTML:
|
|||
# Markdown heading
|
||||
```
|
||||
|
||||
Note: To allow specific HTML elements, use the `allowed_elements` parameter.
|
||||
To allow specific HTML elements anywhere in Markdown content, set the
|
||||
`allowed_elements` parameter to a list of HTML element names. To allow a
|
||||
specific set of HTML elements within Markdown tables, set the
|
||||
`table_allowed_elements` parameter to a list of HTML element names. This can be
|
||||
used to permit the use of `<br>`-style line breaks only within Markdown tables.
|
||||
|
||||
Rationale: Raw HTML is allowed in Markdown, but this rule is included for
|
||||
those who want their documents to only include "pure" Markdown, or for those
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
This rule is triggered when an image is missing alternate text (alt text)
|
||||
This rule reports a violation when an image is missing alternate text (alt text)
|
||||
information.
|
||||
|
||||
Alternate text is commonly specified inline as:
|
||||
|
|
@ -23,12 +23,20 @@ Or with HTML as:
|
|||
<img src="image.jpg" alt="Alternate text" />
|
||||
```
|
||||
|
||||
Note: If the [HTML `aria-hidden` attribute][aria-hidden] is used to hide the
|
||||
image from assistive technology, this rule does not report a violation:
|
||||
|
||||
```html
|
||||
<img src="image.jpg" aria-hidden="true" />
|
||||
```
|
||||
|
||||
Guidance for writing alternate text is available from the [W3C][w3c],
|
||||
[Wikipedia][wikipedia], and [other locations][phase2technology].
|
||||
|
||||
Rationale: Alternate text is important for accessibility and describes the
|
||||
content of an image for people who may not be able to see it.
|
||||
|
||||
[aria-hidden]: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-hidden
|
||||
[phase2technology]: https://www.phase2technology.com/blog/no-more-excuses
|
||||
[w3c]: https://www.w3.org/WAI/alt/
|
||||
[wikipedia]: https://en.wikipedia.org/wiki/Alt_attribute
|
||||
|
|
|
|||
|
|
@ -74,6 +74,12 @@ And this link to content starting within line 19 running into line 21:
|
|||
[Link](#L19C5-L21C11)
|
||||
```
|
||||
|
||||
Some Markdown generators dynamically create and insert headings when building
|
||||
documents, for example by combining a fixed prefix like `figure-` and an
|
||||
incrementing numeric counter. To ignore such generated fragments, set the
|
||||
`ignored_pattern` [regular expression][RegEx] parameter to a pattern that
|
||||
matches (e.g., `^figure-`).
|
||||
|
||||
Rationale: [GitHub section links][github-section-links] are created
|
||||
automatically for every heading when Markdown content is displayed on GitHub.
|
||||
This makes it easy to link directly to different sections within a document.
|
||||
|
|
@ -89,3 +95,4 @@ append an incrementing integer as needed for uniqueness.
|
|||
[github-heading-algorithm]: https://github.com/gjtorikian/html-pipeline/blob/f13a1534cb650ba17af400d1acd3a22c28004c09/lib/html/pipeline/toc_filter.rb
|
||||
[github-linking-to-content]: https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-a-permanent-link-to-a-code-snippet#linking-to-markdown#linking-to-markdown
|
||||
[html-top-fragment]: https://html.spec.whatwg.org/multipage/browsing-the-web.html#scrolling-to-a-fragment
|
||||
[RegEx]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions
|
||||
|
|
|
|||
|
|
@ -28,3 +28,14 @@ so "shortcut" syntax is ignored by default. To include "shortcut" syntax, set
|
|||
the `include_shortcut` parameter to `true`. Note that doing so produces warnings
|
||||
for *all* text in the document that *could* be a shortcut. If bracketed text is
|
||||
intentional, brackets can be escaped with the `\` character: `\[example\]`.
|
||||
|
||||
If there are link labels that are deliberately unreferenced, they can be ignored
|
||||
by setting the `ignored_labels` parameter to the list of strings to ignore. The
|
||||
default value of this parameter ignores the checkbox syntax used by
|
||||
[GitHub Flavored Markdown task list items][gfm-tasklist]:
|
||||
|
||||
```markdown
|
||||
- [x] Checked task list item
|
||||
```
|
||||
|
||||
[gfm-tasklist]: https://github.github.com/gfm/#task-list-items-extension-
|
||||
|
|
|
|||
|
|
@ -17,9 +17,9 @@ reference has the corresponding label. The "full", "collapsed", and "shortcut"
|
|||
formats are all supported.
|
||||
|
||||
If there are reference definitions that are deliberately unreferenced, they can
|
||||
be ignored by setting the `ignored_definitions` parameter. The default value of
|
||||
this parameter ignores the following convention for adding non-HTML comments to
|
||||
Markdown:
|
||||
be ignored by setting the `ignored_definitions` parameter to the list of strings
|
||||
to ignore. The default value of this parameter ignores the following convention
|
||||
for adding non-HTML comments to Markdown:
|
||||
|
||||
```markdown
|
||||
[//]: # (This behaves like a comment)
|
||||
|
|
|
|||
|
|
@ -40,4 +40,4 @@ Rationale: Some parsers have difficulty with tables that are missing their
|
|||
leading or trailing pipe characters. The use of leading/trailing pipes can also
|
||||
help provide visual clarity.
|
||||
|
||||
[gfm-table-055]: https://github.github.com/gfm/#tables-extension-
|
||||
[gfm-table-055]: https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/organizing-information-with-tables
|
||||
|
|
|
|||
|
|
@ -28,4 +28,4 @@ of cells or it will not be recognized as a table (per specification).
|
|||
Rationale: Extra cells in a row are usually not shown, so their data is lost.
|
||||
Missing cells in a row create holes in the table and suggest an omission.
|
||||
|
||||
[gfm-table-056]: https://github.github.com/gfm/#tables-extension-
|
||||
[gfm-table-056]: https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/organizing-information-with-tables
|
||||
|
|
|
|||
|
|
@ -16,4 +16,7 @@ translations for every language.
|
|||
|
||||
Note: This rule checks Markdown links; HTML links are ignored.
|
||||
|
||||
More information: <https://webaim.org/techniques/hypertext/>
|
||||
More information:
|
||||
|
||||
- <https://webaim.org/techniques/hypertext/>
|
||||
- <https://www.w3.org/WAI/WCAG21/Understanding/link-purpose-link-only.html>
|
||||
|
|
|
|||
59
doc-build/md060.md
Normal file
59
doc-build/md060.md
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
This rule is triggered when the column separators of a
|
||||
[GitHub Flavored Markdown table][gfm-table-060] are used inconsistently.
|
||||
|
||||
This rule recognizes three table column styles based on popular use:
|
||||
|
||||
Style `aligned` looks the most like a table:
|
||||
|
||||
```markdown
|
||||
| Character | Meaning |
|
||||
| --------- | ------- |
|
||||
| Y | Yes |
|
||||
| N | No |
|
||||
```
|
||||
|
||||
Style `compact` uses a single space to pad cell content:
|
||||
|
||||
```markdown
|
||||
| Character | Meaning |
|
||||
| --- | --- |
|
||||
| Y | Yes |
|
||||
| N | No |
|
||||
```
|
||||
|
||||
Style `tight` uses no padding for cell content:
|
||||
|
||||
```markdown
|
||||
|Character|Meaning|
|
||||
|---|---|
|
||||
|Y|Yes|
|
||||
|N|No|
|
||||
```
|
||||
|
||||
When this rule's `style` parameter is set to `aligned`, `compact`, or `tight`,
|
||||
every table must match the corresponding pattern and errors will be reported for
|
||||
any violations. By default, or when the `any` style is used, each table is
|
||||
analyzed to see if it satisfies any supported style. If so, no errors are
|
||||
reported. If not, errors are be reported for whichever style would produce the
|
||||
*fewest* errors (i.e., whichever style is the closest match).
|
||||
|
||||
Note: Pipe alignment for the `aligned` style is based on character count, so
|
||||
wide characters and multi-character encodings can produce unexpected results.
|
||||
The following table is correctly aligned based on character count, though some
|
||||
editors render the emoji wider:
|
||||
|
||||
<!-- markdownlint-capture -->
|
||||
<!-- markdownlint-disable extended-ascii -->
|
||||
|
||||
```markdown
|
||||
| Response | Emoji |
|
||||
| -------- | ----- |
|
||||
| Yes | ✅ |
|
||||
| No | ❎ |
|
||||
```
|
||||
|
||||
<!-- markdownlint-restore -->
|
||||
|
||||
Rationale: Consistent formatting makes it easier to understand a document.
|
||||
|
||||
[gfm-table-060]: https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/organizing-information-with-tables
|
||||
149
doc/Rules.md
149
doc/Rules.md
|
|
@ -12,6 +12,11 @@ Tags: `headings`
|
|||
|
||||
Aliases: `heading-increment`
|
||||
|
||||
Parameters:
|
||||
|
||||
- `front_matter_title`: RegExp for matching title in front matter (`string`,
|
||||
default `^\s*title\s*[:=]`)
|
||||
|
||||
This rule is triggered when you skip heading levels in a Markdown document, for
|
||||
example:
|
||||
|
||||
|
|
@ -40,6 +45,15 @@ level at a time:
|
|||
### Another Heading 3
|
||||
```
|
||||
|
||||
If [YAML](https://en.wikipedia.org/wiki/YAML) front matter is present and
|
||||
contains a `title` property (commonly used with blog posts), this rule treats
|
||||
that as a top level heading and will report a violation if the actual first
|
||||
heading is not a level 2 heading. To use a different property name in the
|
||||
front matter, specify the text of a regular expression via the
|
||||
`front_matter_title` parameter. To disable the use of front matter by this
|
||||
rule, specify `""` for `front_matter_title`. When front matter is not present,
|
||||
the first heading can be any level.
|
||||
|
||||
Rationale: Headings represent the structure of a document and can be confusing
|
||||
when skipped - especially for accessibility scenarios. More information:
|
||||
<https://www.w3.org/WAI/tutorials/page-structure/headings/>.
|
||||
|
|
@ -383,6 +397,12 @@ parameter to the desired value.
|
|||
Rationale: Hard tabs are often rendered inconsistently by different editors and
|
||||
can be harder to work with than spaces.
|
||||
|
||||
More information:
|
||||
|
||||
- <https://agiletribe.wordpress.com/2011/10/27/18-dont-use-tab-characters/>
|
||||
- <https://www.jwz.org/doc/tabs-vs-spaces.html>
|
||||
- <https://adamspiers.org/computing/why_no_tabs.html>
|
||||
|
||||
<a name="md011"></a>
|
||||
|
||||
## `MD011` - Reversed link syntax
|
||||
|
|
@ -1026,6 +1046,8 @@ Parameters:
|
|||
- `style`: List style (`string`, default `one_or_ordered`, values `one` /
|
||||
`one_or_ordered` / `ordered` / `zero`)
|
||||
|
||||
Fixable: Some violations can be fixed by tooling
|
||||
|
||||
This rule is triggered for ordered lists that do not either start with '1.' or
|
||||
do not have a prefix that increases in numerical order (depending on the
|
||||
configured style). The less-common pattern of using '0.' as a first prefix or
|
||||
|
|
@ -1321,6 +1343,8 @@ Aliases: `no-inline-html`
|
|||
Parameters:
|
||||
|
||||
- `allowed_elements`: Allowed elements (`string[]`, default `[]`)
|
||||
- `table_allowed_elements`: Allowed elements in tables (`string[]`, default
|
||||
`[]`)
|
||||
|
||||
This rule is triggered whenever raw HTML is used in a Markdown document:
|
||||
|
||||
|
|
@ -1334,7 +1358,11 @@ To fix this, use 'pure' Markdown instead of including raw HTML:
|
|||
# Markdown heading
|
||||
```
|
||||
|
||||
Note: To allow specific HTML elements, use the `allowed_elements` parameter.
|
||||
To allow specific HTML elements anywhere in Markdown content, set the
|
||||
`allowed_elements` parameter to a list of HTML element names. To allow a
|
||||
specific set of HTML elements within Markdown tables, set the
|
||||
`table_allowed_elements` parameter to a list of HTML element names. This can be
|
||||
used to permit the use of `<br>`-style line breaks only within Markdown tables.
|
||||
|
||||
Rationale: Raw HTML is allowed in Markdown, but this rule is included for
|
||||
those who want their documents to only include "pure" Markdown, or for those
|
||||
|
|
@ -1908,7 +1936,7 @@ Tags: `accessibility`, `images`
|
|||
|
||||
Aliases: `no-alt-text`
|
||||
|
||||
This rule is triggered when an image is missing alternate text (alt text)
|
||||
This rule reports a violation when an image is missing alternate text (alt text)
|
||||
information.
|
||||
|
||||
Alternate text is commonly specified inline as:
|
||||
|
|
@ -1933,12 +1961,20 @@ Or with HTML as:
|
|||
<img src="image.jpg" alt="Alternate text" />
|
||||
```
|
||||
|
||||
Note: If the [HTML `aria-hidden` attribute][aria-hidden] is used to hide the
|
||||
image from assistive technology, this rule does not report a violation:
|
||||
|
||||
```html
|
||||
<img src="image.jpg" aria-hidden="true" />
|
||||
```
|
||||
|
||||
Guidance for writing alternate text is available from the [W3C][w3c],
|
||||
[Wikipedia][wikipedia], and [other locations][phase2technology].
|
||||
|
||||
Rationale: Alternate text is important for accessibility and describes the
|
||||
content of an image for people who may not be able to see it.
|
||||
|
||||
[aria-hidden]: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-hidden
|
||||
[phase2technology]: https://www.phase2technology.com/blog/no-more-excuses
|
||||
[w3c]: https://www.w3.org/WAI/alt/
|
||||
[wikipedia]: https://en.wikipedia.org/wiki/Alt_attribute
|
||||
|
|
@ -2156,6 +2192,8 @@ Aliases: `link-fragments`
|
|||
Parameters:
|
||||
|
||||
- `ignore_case`: Ignore case of fragments (`boolean`, default `false`)
|
||||
- `ignored_pattern`: Pattern for ignoring additional fragments (`string`,
|
||||
default ``)
|
||||
|
||||
Fixable: Some violations can be fixed by tooling
|
||||
|
||||
|
|
@ -2235,6 +2273,12 @@ And this link to content starting within line 19 running into line 21:
|
|||
[Link](#L19C5-L21C11)
|
||||
```
|
||||
|
||||
Some Markdown generators dynamically create and insert headings when building
|
||||
documents, for example by combining a fixed prefix like `figure-` and an
|
||||
incrementing numeric counter. To ignore such generated fragments, set the
|
||||
`ignored_pattern` [regular expression][RegEx] parameter to a pattern that
|
||||
matches (e.g., `^figure-`).
|
||||
|
||||
Rationale: [GitHub section links][github-section-links] are created
|
||||
automatically for every heading when Markdown content is displayed on GitHub.
|
||||
This makes it easy to link directly to different sections within a document.
|
||||
|
|
@ -2250,6 +2294,7 @@ append an incrementing integer as needed for uniqueness.
|
|||
[github-heading-algorithm]: https://github.com/gjtorikian/html-pipeline/blob/f13a1534cb650ba17af400d1acd3a22c28004c09/lib/html/pipeline/toc_filter.rb
|
||||
[github-linking-to-content]: https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-a-permanent-link-to-a-code-snippet#linking-to-markdown#linking-to-markdown
|
||||
[html-top-fragment]: https://html.spec.whatwg.org/multipage/browsing-the-web.html#scrolling-to-a-fragment
|
||||
[RegEx]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions
|
||||
|
||||
<a name="md052"></a>
|
||||
|
||||
|
|
@ -2261,6 +2306,7 @@ Aliases: `reference-links-images`
|
|||
|
||||
Parameters:
|
||||
|
||||
- `ignored_labels`: Ignored link labels (`string[]`, default `["x"]`)
|
||||
- `shortcut_syntax`: Include shortcut syntax (`boolean`, default `false`)
|
||||
|
||||
Links and images in Markdown can provide the link destination or image source
|
||||
|
|
@ -2294,6 +2340,17 @@ the `include_shortcut` parameter to `true`. Note that doing so produces warnings
|
|||
for *all* text in the document that *could* be a shortcut. If bracketed text is
|
||||
intentional, brackets can be escaped with the `\` character: `\[example\]`.
|
||||
|
||||
If there are link labels that are deliberately unreferenced, they can be ignored
|
||||
by setting the `ignored_labels` parameter to the list of strings to ignore. The
|
||||
default value of this parameter ignores the checkbox syntax used by
|
||||
[GitHub Flavored Markdown task list items][gfm-tasklist]:
|
||||
|
||||
```markdown
|
||||
- [x] Checked task list item
|
||||
```
|
||||
|
||||
[gfm-tasklist]: https://github.github.com/gfm/#task-list-items-extension-
|
||||
|
||||
<a name="md053"></a>
|
||||
|
||||
## `MD053` - Link and image reference definitions should be needed
|
||||
|
|
@ -2327,9 +2384,9 @@ reference has the corresponding label. The "full", "collapsed", and "shortcut"
|
|||
formats are all supported.
|
||||
|
||||
If there are reference definitions that are deliberately unreferenced, they can
|
||||
be ignored by setting the `ignored_definitions` parameter. The default value of
|
||||
this parameter ignores the following convention for adding non-HTML comments to
|
||||
Markdown:
|
||||
be ignored by setting the `ignored_definitions` parameter to the list of strings
|
||||
to ignore. The default value of this parameter ignores the following convention
|
||||
for adding non-HTML comments to Markdown:
|
||||
|
||||
```markdown
|
||||
[//]: # (This behaves like a comment)
|
||||
|
|
@ -2494,7 +2551,7 @@ Rationale: Some parsers have difficulty with tables that are missing their
|
|||
leading or trailing pipe characters. The use of leading/trailing pipes can also
|
||||
help provide visual clarity.
|
||||
|
||||
[gfm-table-055]: https://github.github.com/gfm/#tables-extension-
|
||||
[gfm-table-055]: https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/organizing-information-with-tables
|
||||
|
||||
<a name="md056"></a>
|
||||
|
||||
|
|
@ -2534,7 +2591,7 @@ of cells or it will not be recognized as a table (per specification).
|
|||
Rationale: Extra cells in a row are usually not shown, so their data is lost.
|
||||
Missing cells in a row create holes in the table and suggest an omission.
|
||||
|
||||
[gfm-table-056]: https://github.github.com/gfm/#tables-extension-
|
||||
[gfm-table-056]: https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/organizing-information-with-tables
|
||||
|
||||
<a name="md058"></a>
|
||||
|
||||
|
|
@ -2618,7 +2675,83 @@ translations for every language.
|
|||
|
||||
Note: This rule checks Markdown links; HTML links are ignored.
|
||||
|
||||
More information: <https://webaim.org/techniques/hypertext/>
|
||||
More information:
|
||||
|
||||
- <https://webaim.org/techniques/hypertext/>
|
||||
- <https://www.w3.org/WAI/WCAG21/Understanding/link-purpose-link-only.html>
|
||||
|
||||
<a name="md060"></a>
|
||||
|
||||
## `MD060` - Table column style
|
||||
|
||||
Tags: `table`
|
||||
|
||||
Aliases: `table-column-style`
|
||||
|
||||
Parameters:
|
||||
|
||||
- `style`: Table column style (`string`, default `any`, values `aligned` /
|
||||
`any` / `compact` / `tight`)
|
||||
|
||||
This rule is triggered when the column separators of a
|
||||
[GitHub Flavored Markdown table][gfm-table-060] are used inconsistently.
|
||||
|
||||
This rule recognizes three table column styles based on popular use:
|
||||
|
||||
Style `aligned` looks the most like a table:
|
||||
|
||||
```markdown
|
||||
| Character | Meaning |
|
||||
| --------- | ------- |
|
||||
| Y | Yes |
|
||||
| N | No |
|
||||
```
|
||||
|
||||
Style `compact` uses a single space to pad cell content:
|
||||
|
||||
```markdown
|
||||
| Character | Meaning |
|
||||
| --- | --- |
|
||||
| Y | Yes |
|
||||
| N | No |
|
||||
```
|
||||
|
||||
Style `tight` uses no padding for cell content:
|
||||
|
||||
```markdown
|
||||
|Character|Meaning|
|
||||
|---|---|
|
||||
|Y|Yes|
|
||||
|N|No|
|
||||
```
|
||||
|
||||
When this rule's `style` parameter is set to `aligned`, `compact`, or `tight`,
|
||||
every table must match the corresponding pattern and errors will be reported for
|
||||
any violations. By default, or when the `any` style is used, each table is
|
||||
analyzed to see if it satisfies any supported style. If so, no errors are
|
||||
reported. If not, errors are be reported for whichever style would produce the
|
||||
*fewest* errors (i.e., whichever style is the closest match).
|
||||
|
||||
Note: Pipe alignment for the `aligned` style is based on character count, so
|
||||
wide characters and multi-character encodings can produce unexpected results.
|
||||
The following table is correctly aligned based on character count, though some
|
||||
editors render the emoji wider:
|
||||
|
||||
<!-- markdownlint-capture -->
|
||||
<!-- markdownlint-disable extended-ascii -->
|
||||
|
||||
```markdown
|
||||
| Response | Emoji |
|
||||
| -------- | ----- |
|
||||
| Yes | ✅ |
|
||||
| No | ❎ |
|
||||
```
|
||||
|
||||
<!-- markdownlint-restore -->
|
||||
|
||||
Rationale: Consistent formatting makes it easier to understand a document.
|
||||
|
||||
[gfm-table-060]: https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/organizing-information-with-tables
|
||||
|
||||
<!-- markdownlint-configure-file {
|
||||
"no-inline-html": {
|
||||
|
|
|
|||
14
doc/md001.md
14
doc/md001.md
|
|
@ -4,6 +4,11 @@ Tags: `headings`
|
|||
|
||||
Aliases: `heading-increment`
|
||||
|
||||
Parameters:
|
||||
|
||||
- `front_matter_title`: RegExp for matching title in front matter (`string`,
|
||||
default `^\s*title\s*[:=]`)
|
||||
|
||||
This rule is triggered when you skip heading levels in a Markdown document, for
|
||||
example:
|
||||
|
||||
|
|
@ -32,6 +37,15 @@ level at a time:
|
|||
### Another Heading 3
|
||||
```
|
||||
|
||||
If [YAML](https://en.wikipedia.org/wiki/YAML) front matter is present and
|
||||
contains a `title` property (commonly used with blog posts), this rule treats
|
||||
that as a top level heading and will report a violation if the actual first
|
||||
heading is not a level 2 heading. To use a different property name in the
|
||||
front matter, specify the text of a regular expression via the
|
||||
`front_matter_title` parameter. To disable the use of front matter by this
|
||||
rule, specify `""` for `front_matter_title`. When front matter is not present,
|
||||
the first heading can be any level.
|
||||
|
||||
Rationale: Headings represent the structure of a document and can be confusing
|
||||
when skipped - especially for accessibility scenarios. More information:
|
||||
<https://www.w3.org/WAI/tutorials/page-structure/headings/>.
|
||||
|
|
|
|||
|
|
@ -54,3 +54,9 @@ parameter to the desired value.
|
|||
|
||||
Rationale: Hard tabs are often rendered inconsistently by different editors and
|
||||
can be harder to work with than spaces.
|
||||
|
||||
More information:
|
||||
|
||||
- <https://agiletribe.wordpress.com/2011/10/27/18-dont-use-tab-characters/>
|
||||
- <https://www.jwz.org/doc/tabs-vs-spaces.html>
|
||||
- <https://adamspiers.org/computing/why_no_tabs.html>
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ Parameters:
|
|||
- `style`: List style (`string`, default `one_or_ordered`, values `one` /
|
||||
`one_or_ordered` / `ordered` / `zero`)
|
||||
|
||||
Fixable: Some violations can be fixed by tooling
|
||||
|
||||
This rule is triggered for ordered lists that do not either start with '1.' or
|
||||
do not have a prefix that increases in numerical order (depending on the
|
||||
configured style). The less-common pattern of using '0.' as a first prefix or
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@ Aliases: `no-inline-html`
|
|||
Parameters:
|
||||
|
||||
- `allowed_elements`: Allowed elements (`string[]`, default `[]`)
|
||||
- `table_allowed_elements`: Allowed elements in tables (`string[]`, default
|
||||
`[]`)
|
||||
|
||||
This rule is triggered whenever raw HTML is used in a Markdown document:
|
||||
|
||||
|
|
@ -20,7 +22,11 @@ To fix this, use 'pure' Markdown instead of including raw HTML:
|
|||
# Markdown heading
|
||||
```
|
||||
|
||||
Note: To allow specific HTML elements, use the `allowed_elements` parameter.
|
||||
To allow specific HTML elements anywhere in Markdown content, set the
|
||||
`allowed_elements` parameter to a list of HTML element names. To allow a
|
||||
specific set of HTML elements within Markdown tables, set the
|
||||
`table_allowed_elements` parameter to a list of HTML element names. This can be
|
||||
used to permit the use of `<br>`-style line breaks only within Markdown tables.
|
||||
|
||||
Rationale: Raw HTML is allowed in Markdown, but this rule is included for
|
||||
those who want their documents to only include "pure" Markdown, or for those
|
||||
|
|
|
|||
10
doc/md045.md
10
doc/md045.md
|
|
@ -4,7 +4,7 @@ Tags: `accessibility`, `images`
|
|||
|
||||
Aliases: `no-alt-text`
|
||||
|
||||
This rule is triggered when an image is missing alternate text (alt text)
|
||||
This rule reports a violation when an image is missing alternate text (alt text)
|
||||
information.
|
||||
|
||||
Alternate text is commonly specified inline as:
|
||||
|
|
@ -29,12 +29,20 @@ Or with HTML as:
|
|||
<img src="image.jpg" alt="Alternate text" />
|
||||
```
|
||||
|
||||
Note: If the [HTML `aria-hidden` attribute][aria-hidden] is used to hide the
|
||||
image from assistive technology, this rule does not report a violation:
|
||||
|
||||
```html
|
||||
<img src="image.jpg" aria-hidden="true" />
|
||||
```
|
||||
|
||||
Guidance for writing alternate text is available from the [W3C][w3c],
|
||||
[Wikipedia][wikipedia], and [other locations][phase2technology].
|
||||
|
||||
Rationale: Alternate text is important for accessibility and describes the
|
||||
content of an image for people who may not be able to see it.
|
||||
|
||||
[aria-hidden]: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-hidden
|
||||
[phase2technology]: https://www.phase2technology.com/blog/no-more-excuses
|
||||
[w3c]: https://www.w3.org/WAI/alt/
|
||||
[wikipedia]: https://en.wikipedia.org/wiki/Alt_attribute
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@ Aliases: `link-fragments`
|
|||
Parameters:
|
||||
|
||||
- `ignore_case`: Ignore case of fragments (`boolean`, default `false`)
|
||||
- `ignored_pattern`: Pattern for ignoring additional fragments (`string`,
|
||||
default ``)
|
||||
|
||||
Fixable: Some violations can be fixed by tooling
|
||||
|
||||
|
|
@ -86,6 +88,12 @@ And this link to content starting within line 19 running into line 21:
|
|||
[Link](#L19C5-L21C11)
|
||||
```
|
||||
|
||||
Some Markdown generators dynamically create and insert headings when building
|
||||
documents, for example by combining a fixed prefix like `figure-` and an
|
||||
incrementing numeric counter. To ignore such generated fragments, set the
|
||||
`ignored_pattern` [regular expression][RegEx] parameter to a pattern that
|
||||
matches (e.g., `^figure-`).
|
||||
|
||||
Rationale: [GitHub section links][github-section-links] are created
|
||||
automatically for every heading when Markdown content is displayed on GitHub.
|
||||
This makes it easy to link directly to different sections within a document.
|
||||
|
|
@ -101,3 +109,4 @@ append an incrementing integer as needed for uniqueness.
|
|||
[github-heading-algorithm]: https://github.com/gjtorikian/html-pipeline/blob/f13a1534cb650ba17af400d1acd3a22c28004c09/lib/html/pipeline/toc_filter.rb
|
||||
[github-linking-to-content]: https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-a-permanent-link-to-a-code-snippet#linking-to-markdown#linking-to-markdown
|
||||
[html-top-fragment]: https://html.spec.whatwg.org/multipage/browsing-the-web.html#scrolling-to-a-fragment
|
||||
[RegEx]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions
|
||||
|
|
|
|||
12
doc/md052.md
12
doc/md052.md
|
|
@ -6,6 +6,7 @@ Aliases: `reference-links-images`
|
|||
|
||||
Parameters:
|
||||
|
||||
- `ignored_labels`: Ignored link labels (`string[]`, default `["x"]`)
|
||||
- `shortcut_syntax`: Include shortcut syntax (`boolean`, default `false`)
|
||||
|
||||
Links and images in Markdown can provide the link destination or image source
|
||||
|
|
@ -38,3 +39,14 @@ so "shortcut" syntax is ignored by default. To include "shortcut" syntax, set
|
|||
the `include_shortcut` parameter to `true`. Note that doing so produces warnings
|
||||
for *all* text in the document that *could* be a shortcut. If bracketed text is
|
||||
intentional, brackets can be escaped with the `\` character: `\[example\]`.
|
||||
|
||||
If there are link labels that are deliberately unreferenced, they can be ignored
|
||||
by setting the `ignored_labels` parameter to the list of strings to ignore. The
|
||||
default value of this parameter ignores the checkbox syntax used by
|
||||
[GitHub Flavored Markdown task list items][gfm-tasklist]:
|
||||
|
||||
```markdown
|
||||
- [x] Checked task list item
|
||||
```
|
||||
|
||||
[gfm-tasklist]: https://github.github.com/gfm/#task-list-items-extension-
|
||||
|
|
|
|||
|
|
@ -29,9 +29,9 @@ reference has the corresponding label. The "full", "collapsed", and "shortcut"
|
|||
formats are all supported.
|
||||
|
||||
If there are reference definitions that are deliberately unreferenced, they can
|
||||
be ignored by setting the `ignored_definitions` parameter. The default value of
|
||||
this parameter ignores the following convention for adding non-HTML comments to
|
||||
Markdown:
|
||||
be ignored by setting the `ignored_definitions` parameter to the list of strings
|
||||
to ignore. The default value of this parameter ignores the following convention
|
||||
for adding non-HTML comments to Markdown:
|
||||
|
||||
```markdown
|
||||
[//]: # (This behaves like a comment)
|
||||
|
|
|
|||
|
|
@ -52,4 +52,4 @@ Rationale: Some parsers have difficulty with tables that are missing their
|
|||
leading or trailing pipe characters. The use of leading/trailing pipes can also
|
||||
help provide visual clarity.
|
||||
|
||||
[gfm-table-055]: https://github.github.com/gfm/#tables-extension-
|
||||
[gfm-table-055]: https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/organizing-information-with-tables
|
||||
|
|
|
|||
|
|
@ -34,4 +34,4 @@ of cells or it will not be recognized as a table (per specification).
|
|||
Rationale: Extra cells in a row are usually not shown, so their data is lost.
|
||||
Missing cells in a row create holes in the table and suggest an omission.
|
||||
|
||||
[gfm-table-056]: https://github.github.com/gfm/#tables-extension-
|
||||
[gfm-table-056]: https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/organizing-information-with-tables
|
||||
|
|
|
|||
|
|
@ -27,4 +27,7 @@ translations for every language.
|
|||
|
||||
Note: This rule checks Markdown links; HTML links are ignored.
|
||||
|
||||
More information: <https://webaim.org/techniques/hypertext/>
|
||||
More information:
|
||||
|
||||
- <https://webaim.org/techniques/hypertext/>
|
||||
- <https://www.w3.org/WAI/WCAG21/Understanding/link-purpose-link-only.html>
|
||||
|
|
|
|||
70
doc/md060.md
Normal file
70
doc/md060.md
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
# `MD060` - Table column style
|
||||
|
||||
Tags: `table`
|
||||
|
||||
Aliases: `table-column-style`
|
||||
|
||||
Parameters:
|
||||
|
||||
- `style`: Table column style (`string`, default `any`, values `aligned` /
|
||||
`any` / `compact` / `tight`)
|
||||
|
||||
This rule is triggered when the column separators of a
|
||||
[GitHub Flavored Markdown table][gfm-table-060] are used inconsistently.
|
||||
|
||||
This rule recognizes three table column styles based on popular use:
|
||||
|
||||
Style `aligned` looks the most like a table:
|
||||
|
||||
```markdown
|
||||
| Character | Meaning |
|
||||
| --------- | ------- |
|
||||
| Y | Yes |
|
||||
| N | No |
|
||||
```
|
||||
|
||||
Style `compact` uses a single space to pad cell content:
|
||||
|
||||
```markdown
|
||||
| Character | Meaning |
|
||||
| --- | --- |
|
||||
| Y | Yes |
|
||||
| N | No |
|
||||
```
|
||||
|
||||
Style `tight` uses no padding for cell content:
|
||||
|
||||
```markdown
|
||||
|Character|Meaning|
|
||||
|---|---|
|
||||
|Y|Yes|
|
||||
|N|No|
|
||||
```
|
||||
|
||||
When this rule's `style` parameter is set to `aligned`, `compact`, or `tight`,
|
||||
every table must match the corresponding pattern and errors will be reported for
|
||||
any violations. By default, or when the `any` style is used, each table is
|
||||
analyzed to see if it satisfies any supported style. If so, no errors are
|
||||
reported. If not, errors are be reported for whichever style would produce the
|
||||
*fewest* errors (i.e., whichever style is the closest match).
|
||||
|
||||
Note: Pipe alignment for the `aligned` style is based on character count, so
|
||||
wide characters and multi-character encodings can produce unexpected results.
|
||||
The following table is correctly aligned based on character count, though some
|
||||
editors render the emoji wider:
|
||||
|
||||
<!-- markdownlint-capture -->
|
||||
<!-- markdownlint-disable extended-ascii -->
|
||||
|
||||
```markdown
|
||||
| Response | Emoji |
|
||||
| -------- | ----- |
|
||||
| Yes | ✅ |
|
||||
| No | ❎ |
|
||||
```
|
||||
|
||||
<!-- markdownlint-restore -->
|
||||
|
||||
Rationale: Consistent formatting makes it easier to understand a document.
|
||||
|
||||
[gfm-table-060]: https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/organizing-information-with-tables
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
// @ts-check
|
||||
|
||||
"use strict";
|
||||
|
||||
module.exports = function wrapper(grunt) {
|
||||
grunt.initConfig({
|
||||
"markdownlint": {
|
||||
"example": {
|
||||
"src": [ "*.md" ]
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
grunt.registerMultiTask("markdownlint", function task() {
|
||||
const done = this.async();
|
||||
import("markdownlint/async").then(({ lint }) => {
|
||||
lint(
|
||||
{ "files": this.filesSrc },
|
||||
function callback(err, result) {
|
||||
const resultString = err || ((result || "").toString());
|
||||
if (resultString) {
|
||||
grunt.fail.warn("\n" + resultString + "\n");
|
||||
}
|
||||
done(!err || !resultString);
|
||||
});
|
||||
}).catch(done);
|
||||
});
|
||||
};
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
// @ts-check
|
||||
|
||||
"use strict";
|
||||
|
||||
const gulp = require("gulp");
|
||||
const through2 = require("through2");
|
||||
|
||||
// Simple task wrapper
|
||||
gulp.task("markdownlint", function task() {
|
||||
return gulp.src("*.md", { "read": false })
|
||||
.pipe(through2.obj(function obj(file, enc, next) {
|
||||
import("markdownlint/async").then(({ lint }) => {
|
||||
lint(
|
||||
{ "files": [ file.relative ] },
|
||||
function callback(err, result) {
|
||||
const resultString = (result || "").toString();
|
||||
if (resultString) {
|
||||
console.log(resultString);
|
||||
}
|
||||
next(err, file);
|
||||
});
|
||||
}).catch(next);
|
||||
}));
|
||||
});
|
||||
|
|
@ -18,18 +18,18 @@ const options = {
|
|||
|
||||
if (true) {
|
||||
|
||||
// Makes a synchronous call, uses result.toString for pretty formatting
|
||||
// Makes a synchronous call
|
||||
const results = lintSync(options);
|
||||
console.log(results.toString());
|
||||
console.dir(results, { "colors": true, "depth": null });
|
||||
|
||||
}
|
||||
|
||||
if (true) {
|
||||
|
||||
// Makes an asynchronous call, uses result.toString for pretty formatting
|
||||
// Makes an asynchronous call
|
||||
lintAsync(options, function callback(error, results) {
|
||||
if (!error && results) {
|
||||
console.log(results.toString());
|
||||
console.dir(results, { "colors": true, "depth": null });
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -37,7 +37,7 @@ if (true) {
|
|||
|
||||
if (true) {
|
||||
|
||||
// Makes a Promise-based asynchronous call, displays the result object directly
|
||||
// Makes a Promise-based asynchronous call
|
||||
const results = await lintPromise(options);
|
||||
console.dir(results, { "colors": true, "depth": null });
|
||||
|
||||
|
|
|
|||
|
|
@ -171,13 +171,15 @@ lintAsync(options, assertLintResultsCallback);
|
|||
assertLintResultsCallback(null, await lintPromise(options));
|
||||
})();
|
||||
|
||||
const needsFixing = "# Heading\n";
|
||||
|
||||
assert.equal(
|
||||
applyFix(
|
||||
"# Fixing\n",
|
||||
needsFixing,
|
||||
{
|
||||
"insertText": "Head",
|
||||
"editColumn": 3,
|
||||
"deleteCount": 3
|
||||
"insertText": " ",
|
||||
"editColumn": 2,
|
||||
"deleteCount": 2
|
||||
},
|
||||
"\n"
|
||||
),
|
||||
|
|
@ -186,18 +188,13 @@ assert.equal(
|
|||
|
||||
assert.equal(
|
||||
applyFixes(
|
||||
"# Fixing\n",
|
||||
[
|
||||
{
|
||||
"lineNumber": 1,
|
||||
"fixInfo": {
|
||||
"insertText": "Head",
|
||||
"editColumn": 3,
|
||||
"deleteCount": 3
|
||||
}
|
||||
needsFixing,
|
||||
lintSync({
|
||||
"strings": {
|
||||
needsFixing
|
||||
}
|
||||
]
|
||||
),
|
||||
}).needsFixingwsl --update
|
||||
), t
|
||||
"# Heading\n"
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -22,8 +22,8 @@ be useful to custom rule authors and may avoid duplicating code.
|
|||
*None* - The entire body of code is tested to 100% coverage by the core
|
||||
`markdownlint` project, so there are no additional tests here.
|
||||
|
||||
[custom-rules]: https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/CustomRules.md
|
||||
[custom-rules]: https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/CustomRules.md
|
||||
[jsdoc]: https://en.m.wikipedia.org/wiki/JSDoc
|
||||
[markdown]: https://en.wikipedia.org/wiki/Markdown
|
||||
[markdownlint]: https://github.com/DavidAnson/markdownlint
|
||||
[rules]: https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/Rules.md
|
||||
[rules]: https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/Rules.md
|
||||
|
|
|
|||
|
|
@ -308,8 +308,8 @@ module.exports.addErrorDetailIf = addErrorDetailIf;
|
|||
* @param {RuleOnErrorFixInfo} [fixInfo] RuleOnErrorFixInfo instance.
|
||||
* @returns {void}
|
||||
*/
|
||||
function addErrorContext(
|
||||
onError, lineNumber, context, start, end, range, fixInfo) {
|
||||
function addErrorContext(onError, lineNumber, context, start, end, range, fixInfo) {
|
||||
// Normalize new line characters so Linux and Windows trim consistently
|
||||
context = ellipsify(context.replace(newLineRe, "\n"), start, end);
|
||||
addError(onError, lineNumber, undefined, context, range, fixInfo);
|
||||
}
|
||||
|
|
@ -538,3 +538,138 @@ function expandTildePath(file, os) {
|
|||
return homedir ? file.replace(/^~($|\/|\\)/, `${homedir}$1`) : file;
|
||||
}
|
||||
module.exports.expandTildePath = expandTildePath;
|
||||
|
||||
/** @typedef {import("../lib/markdownlint.mjs").LintError[]} LintErrors */
|
||||
/** @typedef {import("../lib/markdownlint.mjs").LintResults} LintResults */
|
||||
|
||||
/**
|
||||
* Converts lint errors from resultVersion 3 to 2.
|
||||
*
|
||||
* @param {LintErrors} errors Lint errors (v3).
|
||||
* @returns {LintErrors} Lint errors (v2).
|
||||
*/
|
||||
function convertLintErrorsVersion3To2(errors) {
|
||||
const noPrevious = {
|
||||
"ruleNames": [],
|
||||
"lineNumber": -1
|
||||
};
|
||||
return errors.filter((error, index, array) => {
|
||||
// @ts-ignore
|
||||
delete error.fixInfo;
|
||||
const previous = array[index - 1] || noPrevious;
|
||||
return (
|
||||
(error.ruleNames[0] !== previous.ruleNames[0]) ||
|
||||
(error.lineNumber !== previous.lineNumber)
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts lint errors from resultVersion 2 to 1.
|
||||
*
|
||||
* @param {LintErrors} errors Lint errors (v2).
|
||||
* @returns {LintErrors} Lint errors (v1).
|
||||
*/
|
||||
function convertLintErrorsVersion2To1(errors) {
|
||||
for (const error of errors) {
|
||||
// @ts-ignore
|
||||
error.ruleName = error.ruleNames[0];
|
||||
// @ts-ignore
|
||||
error.ruleAlias = error.ruleNames[1] || error.ruleName;
|
||||
// @ts-ignore
|
||||
delete error.ruleNames;
|
||||
}
|
||||
return errors;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts lint errors from resultVersion 2 to 0.
|
||||
*
|
||||
* @param {LintErrors} errors Lint errors (v2).
|
||||
* @returns {LintErrors} Lint errors (v0).
|
||||
*/
|
||||
function convertLintErrorsVersion2To0(errors) {
|
||||
const dictionary = {};
|
||||
for (const error of errors) {
|
||||
const ruleName = error.ruleNames[0];
|
||||
const ruleLines = dictionary[ruleName] || [];
|
||||
ruleLines.push(error.lineNumber);
|
||||
dictionary[ruleName] = ruleLines;
|
||||
}
|
||||
// @ts-ignore
|
||||
return dictionary;
|
||||
}
|
||||
|
||||
/**
|
||||
* Copies and transforms lint results from resultVersion 3 to ?.
|
||||
*
|
||||
* @param {LintResults} results Lint results (v3).
|
||||
* @param {(LintErrors) => LintErrors} transform Lint errors (v?).
|
||||
* @returns {LintResults} Lint results (v?).
|
||||
*/
|
||||
function copyAndTransformResults(results, transform) {
|
||||
const newResults = {};
|
||||
Object.defineProperty(newResults, "toString", { "value": results.toString });
|
||||
for (const key of Object.keys(results)) {
|
||||
const arr = results[key].map((r) => ({ ...r }));
|
||||
newResults[key] = transform(arr);
|
||||
}
|
||||
// @ts-ignore
|
||||
return newResults;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts lint results from resultVersion 3 to 0.
|
||||
*
|
||||
* @param {LintResults} results Lint results (v3).
|
||||
* @returns {LintResults} Lint results (v0).
|
||||
*/
|
||||
module.exports.convertToResultVersion0 = function convertToResultVersion0(results) {
|
||||
return copyAndTransformResults(results, (r) => convertLintErrorsVersion2To0(convertLintErrorsVersion3To2(r)));
|
||||
};
|
||||
|
||||
/**
|
||||
* Converts lint results from resultVersion 3 to 1.
|
||||
*
|
||||
* @param {LintResults} results Lint results (v3).
|
||||
* @returns {LintResults} Lint results (v1).
|
||||
*/
|
||||
module.exports.convertToResultVersion1 = function convertToResultVersion1(results) {
|
||||
return copyAndTransformResults(results, (r) => convertLintErrorsVersion2To1(convertLintErrorsVersion3To2(r)));
|
||||
};
|
||||
|
||||
/**
|
||||
* Converts lint results from resultVersion 3 to 2.
|
||||
*
|
||||
* @param {LintResults} results Lint results (v3).
|
||||
* @returns {LintResults} Lint results (v2).
|
||||
*/
|
||||
module.exports.convertToResultVersion2 = function convertToResultVersion2(results) {
|
||||
return copyAndTransformResults(results, convertLintErrorsVersion3To2);
|
||||
};
|
||||
|
||||
/**
|
||||
* Formats lint results to an array of strings.
|
||||
*
|
||||
* @param {LintResults|undefined} lintResults Lint results.
|
||||
* @returns {string[]} Lint error strings.
|
||||
*/
|
||||
module.exports.formatLintResults = function formatLintResults(lintResults) {
|
||||
const results = [];
|
||||
const entries = Object.entries(lintResults || {});
|
||||
entries.sort((a, b) => a[0].localeCompare(b[0]));
|
||||
for (const [ source, lintErrors ] of entries) {
|
||||
for (const lintError of lintErrors) {
|
||||
const { lineNumber, ruleNames, ruleDescription, errorDetail, errorContext, errorRange } = lintError;
|
||||
const rule = ruleNames.join("/");
|
||||
const line = `:${lineNumber}`;
|
||||
const rangeStart = (errorRange && errorRange[0]) || 0;
|
||||
const column = rangeStart ? `:${rangeStart}` : "";
|
||||
const description = ruleDescription;
|
||||
const detail = (errorDetail ? ` [${errorDetail}]` : "");
|
||||
const context = (errorContext ? ` [Context: "${errorContext}"]` : "");
|
||||
results.push(`${source}${line}${column} ${rule} ${description}${detail}${context}`);
|
||||
}
|
||||
}
|
||||
return results;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const { flatTokensSymbol, htmlFlowSymbol } = require("./shared.cjs");
|
||||
const { flatTokensSymbol, htmlFlowSymbol, newLineRe } = require("./shared.cjs");
|
||||
|
||||
// eslint-disable-next-line jsdoc/valid-types
|
||||
/** @typedef {import("micromark-util-types", { with: { "resolution-mode": "import" } }).TokenType} TokenType */
|
||||
|
|
@ -216,12 +216,11 @@ function getHeadingStyle(heading) {
|
|||
* @returns {string} Heading text.
|
||||
*/
|
||||
function getHeadingText(heading) {
|
||||
const headingText = getDescendantsByType(heading, [ [ "atxHeadingText", "setextHeadingText" ] ])
|
||||
return getDescendantsByType(heading, [ [ "atxHeadingText", "setextHeadingText" ] ])
|
||||
.flatMap((descendant) => descendant.children.filter((child) => child.type !== "htmlText"))
|
||||
.map((data) => data.text)
|
||||
.join("")
|
||||
.replace(/[\r\n]+/g, " ");
|
||||
return headingText || "";
|
||||
.replace(newLineRe, " ");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -270,6 +269,26 @@ function getParentOfType(token, types) {
|
|||
return current;
|
||||
}
|
||||
|
||||
const docfxTabSyntaxRe = /^#tab\//;
|
||||
|
||||
/**
|
||||
* Returns whether the specified Micromark token looks like a Docfx tab.
|
||||
*
|
||||
* @param {Token | null} heading Micromark token.
|
||||
* @returns {boolean} True iff the token looks like a Docfx tab.
|
||||
*/
|
||||
function isDocfxTab(heading) {
|
||||
// See https://dotnet.github.io/docfx/docs/markdown.html?tabs=linux%2Cdotnet#tabs
|
||||
if (heading?.type === "atxHeading") {
|
||||
const headingTexts = getDescendantsByType(heading, [ "atxHeadingText" ]);
|
||||
if ((headingTexts.length === 1) && (headingTexts[0].children.length === 1) && (headingTexts[0].children[0].type === "link")) {
|
||||
const resourceDestinationStrings = filterByTypes(headingTexts[0].children[0].children, [ "resourceDestinationString" ]);
|
||||
return (resourceDestinationStrings.length === 1) && docfxTabSyntaxRe.test(resourceDestinationStrings[0].text);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set containing token types that do not contain content.
|
||||
*
|
||||
|
|
@ -279,6 +298,7 @@ const nonContentTokens = new Set([
|
|||
"blockQuoteMarker",
|
||||
"blockQuotePrefix",
|
||||
"blockQuotePrefixWhitespace",
|
||||
"gfmFootnoteDefinitionIndent",
|
||||
"lineEnding",
|
||||
"lineEndingBlank",
|
||||
"linePrefix",
|
||||
|
|
@ -301,6 +321,7 @@ module.exports = {
|
|||
getHtmlTagInfo,
|
||||
getParentOfType,
|
||||
inHtmlFlow,
|
||||
isDocfxTab,
|
||||
isHtmlFlowComment,
|
||||
nonContentTokens
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "markdownlint-rule-helpers",
|
||||
"version": "0.28.0",
|
||||
"version": "0.29.0",
|
||||
"description": "A collection of markdownlint helper functions for custom rules",
|
||||
"main": "./helpers.cjs",
|
||||
"exports": {
|
||||
|
|
|
|||
|
|
@ -3,14 +3,19 @@
|
|||
import { getReferenceLinkImageData as helpersGetReferenceLinkImageData } from "../helpers/helpers.cjs";
|
||||
import { filterByTypes } from "../helpers/micromark-helpers.cjs";
|
||||
|
||||
/** @typedef {import("markdownlint").RuleParams} RuleParams */
|
||||
/** @typedef {import("markdownlint").MicromarkToken} MicromarkToken */
|
||||
/** @typedef {import("markdownlint").MicromarkTokenType} MicromarkTokenType */
|
||||
|
||||
/** @type {Map<string, object>} */
|
||||
const map = new Map();
|
||||
/** @type {RuleParams | undefined} */
|
||||
let params = undefined;
|
||||
|
||||
/**
|
||||
* Initializes (resets) the cache.
|
||||
*
|
||||
* @param {import("markdownlint").RuleParams} [p] Rule parameters object.
|
||||
* @param {RuleParams} [p] Rule parameters object.
|
||||
* @returns {void}
|
||||
*/
|
||||
export function initialize(p) {
|
||||
|
|
@ -18,6 +23,15 @@ export function initialize(p) {
|
|||
params = p;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the cached Micromark token array (for testing).
|
||||
*
|
||||
* @returns {MicromarkToken[]} Micromark tokens.
|
||||
*/
|
||||
export function micromarkTokens() {
|
||||
return params?.parsers.micromark.tokens || [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a cached object value - computes it and caches it.
|
||||
*
|
||||
|
|
@ -37,15 +51,15 @@ function getCached(name, getValue) {
|
|||
/**
|
||||
* Filters a list of Micromark tokens by type and caches the result.
|
||||
*
|
||||
* @param {import("markdownlint").MicromarkTokenType[]} types Types to allow.
|
||||
* @param {MicromarkTokenType[]} types Types to allow.
|
||||
* @param {boolean} [htmlFlow] Whether to include htmlFlow content.
|
||||
* @returns {import("markdownlint").MicromarkToken[]} Filtered tokens.
|
||||
* @returns {MicromarkToken[]} Filtered tokens.
|
||||
*/
|
||||
export function filterByTypesCached(types, htmlFlow) {
|
||||
return getCached(
|
||||
// eslint-disable-next-line prefer-rest-params
|
||||
JSON.stringify(arguments),
|
||||
() => filterByTypes(params.parsers.micromark.tokens, types, htmlFlow)
|
||||
() => filterByTypes(micromarkTokens(), types, htmlFlow)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -57,6 +71,6 @@ export function filterByTypesCached(types, htmlFlow) {
|
|||
export function getReferenceLinkImageData() {
|
||||
return getCached(
|
||||
getReferenceLinkImageData.name,
|
||||
() => helpersGetReferenceLinkImageData(params.parsers.micromark.tokens)
|
||||
() => helpersGetReferenceLinkImageData(micromarkTokens())
|
||||
);
|
||||
}
|
||||
|
|
|
|||
294
lib/configuration-strict.d.ts
vendored
294
lib/configuration-strict.d.ts
vendored
|
|
@ -19,15 +19,29 @@ export interface ConfigurationStrict {
|
|||
*/
|
||||
extends?: string | null;
|
||||
/**
|
||||
* MD001/heading-increment : Heading levels should only increment by one level at a time : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md001.md
|
||||
* MD001/heading-increment : Heading levels should only increment by one level at a time : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md001.md
|
||||
*/
|
||||
MD001?: boolean;
|
||||
MD001?:
|
||||
| boolean
|
||||
| {
|
||||
/**
|
||||
* RegExp for matching title in front matter
|
||||
*/
|
||||
front_matter_title?: string;
|
||||
};
|
||||
/**
|
||||
* MD001/heading-increment : Heading levels should only increment by one level at a time : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md001.md
|
||||
* MD001/heading-increment : Heading levels should only increment by one level at a time : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md001.md
|
||||
*/
|
||||
"heading-increment"?: boolean;
|
||||
"heading-increment"?:
|
||||
| boolean
|
||||
| {
|
||||
/**
|
||||
* RegExp for matching title in front matter
|
||||
*/
|
||||
front_matter_title?: string;
|
||||
};
|
||||
/**
|
||||
* MD003/heading-style : Heading style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md003.md
|
||||
* MD003/heading-style : Heading style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md003.md
|
||||
*/
|
||||
MD003?:
|
||||
| boolean
|
||||
|
|
@ -38,7 +52,7 @@ export interface ConfigurationStrict {
|
|||
style?: "consistent" | "atx" | "atx_closed" | "setext" | "setext_with_atx" | "setext_with_atx_closed";
|
||||
};
|
||||
/**
|
||||
* MD003/heading-style : Heading style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md003.md
|
||||
* MD003/heading-style : Heading style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md003.md
|
||||
*/
|
||||
"heading-style"?:
|
||||
| boolean
|
||||
|
|
@ -49,7 +63,7 @@ export interface ConfigurationStrict {
|
|||
style?: "consistent" | "atx" | "atx_closed" | "setext" | "setext_with_atx" | "setext_with_atx_closed";
|
||||
};
|
||||
/**
|
||||
* MD004/ul-style : Unordered list style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md004.md
|
||||
* MD004/ul-style : Unordered list style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md004.md
|
||||
*/
|
||||
MD004?:
|
||||
| boolean
|
||||
|
|
@ -60,7 +74,7 @@ export interface ConfigurationStrict {
|
|||
style?: "consistent" | "asterisk" | "plus" | "dash" | "sublist";
|
||||
};
|
||||
/**
|
||||
* MD004/ul-style : Unordered list style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md004.md
|
||||
* MD004/ul-style : Unordered list style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md004.md
|
||||
*/
|
||||
"ul-style"?:
|
||||
| boolean
|
||||
|
|
@ -71,15 +85,15 @@ export interface ConfigurationStrict {
|
|||
style?: "consistent" | "asterisk" | "plus" | "dash" | "sublist";
|
||||
};
|
||||
/**
|
||||
* MD005/list-indent : Inconsistent indentation for list items at the same level : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md005.md
|
||||
* MD005/list-indent : Inconsistent indentation for list items at the same level : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md005.md
|
||||
*/
|
||||
MD005?: boolean;
|
||||
/**
|
||||
* MD005/list-indent : Inconsistent indentation for list items at the same level : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md005.md
|
||||
* MD005/list-indent : Inconsistent indentation for list items at the same level : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md005.md
|
||||
*/
|
||||
"list-indent"?: boolean;
|
||||
/**
|
||||
* MD007/ul-indent : Unordered list indentation : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md007.md
|
||||
* MD007/ul-indent : Unordered list indentation : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md007.md
|
||||
*/
|
||||
MD007?:
|
||||
| boolean
|
||||
|
|
@ -98,7 +112,7 @@ export interface ConfigurationStrict {
|
|||
start_indent?: number;
|
||||
};
|
||||
/**
|
||||
* MD007/ul-indent : Unordered list indentation : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md007.md
|
||||
* MD007/ul-indent : Unordered list indentation : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md007.md
|
||||
*/
|
||||
"ul-indent"?:
|
||||
| boolean
|
||||
|
|
@ -117,7 +131,7 @@ export interface ConfigurationStrict {
|
|||
start_indent?: number;
|
||||
};
|
||||
/**
|
||||
* MD009/no-trailing-spaces : Trailing spaces : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md009.md
|
||||
* MD009/no-trailing-spaces : Trailing spaces : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md009.md
|
||||
*/
|
||||
MD009?:
|
||||
| boolean
|
||||
|
|
@ -136,7 +150,7 @@ export interface ConfigurationStrict {
|
|||
strict?: boolean;
|
||||
};
|
||||
/**
|
||||
* MD009/no-trailing-spaces : Trailing spaces : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md009.md
|
||||
* MD009/no-trailing-spaces : Trailing spaces : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md009.md
|
||||
*/
|
||||
"no-trailing-spaces"?:
|
||||
| boolean
|
||||
|
|
@ -155,7 +169,7 @@ export interface ConfigurationStrict {
|
|||
strict?: boolean;
|
||||
};
|
||||
/**
|
||||
* MD010/no-hard-tabs : Hard tabs : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md010.md
|
||||
* MD010/no-hard-tabs : Hard tabs : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md010.md
|
||||
*/
|
||||
MD010?:
|
||||
| boolean
|
||||
|
|
@ -174,7 +188,7 @@ export interface ConfigurationStrict {
|
|||
spaces_per_tab?: number;
|
||||
};
|
||||
/**
|
||||
* MD010/no-hard-tabs : Hard tabs : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md010.md
|
||||
* MD010/no-hard-tabs : Hard tabs : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md010.md
|
||||
*/
|
||||
"no-hard-tabs"?:
|
||||
| boolean
|
||||
|
|
@ -193,15 +207,15 @@ export interface ConfigurationStrict {
|
|||
spaces_per_tab?: number;
|
||||
};
|
||||
/**
|
||||
* MD011/no-reversed-links : Reversed link syntax : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md011.md
|
||||
* MD011/no-reversed-links : Reversed link syntax : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md011.md
|
||||
*/
|
||||
MD011?: boolean;
|
||||
/**
|
||||
* MD011/no-reversed-links : Reversed link syntax : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md011.md
|
||||
* MD011/no-reversed-links : Reversed link syntax : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md011.md
|
||||
*/
|
||||
"no-reversed-links"?: boolean;
|
||||
/**
|
||||
* MD012/no-multiple-blanks : Multiple consecutive blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md012.md
|
||||
* MD012/no-multiple-blanks : Multiple consecutive blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md
|
||||
*/
|
||||
MD012?:
|
||||
| boolean
|
||||
|
|
@ -212,7 +226,7 @@ export interface ConfigurationStrict {
|
|||
maximum?: number;
|
||||
};
|
||||
/**
|
||||
* MD012/no-multiple-blanks : Multiple consecutive blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md012.md
|
||||
* MD012/no-multiple-blanks : Multiple consecutive blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md
|
||||
*/
|
||||
"no-multiple-blanks"?:
|
||||
| boolean
|
||||
|
|
@ -223,7 +237,7 @@ export interface ConfigurationStrict {
|
|||
maximum?: number;
|
||||
};
|
||||
/**
|
||||
* MD013/line-length : Line length : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md013.md
|
||||
* MD013/line-length : Line length : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md013.md
|
||||
*/
|
||||
MD013?:
|
||||
| boolean
|
||||
|
|
@ -262,7 +276,7 @@ export interface ConfigurationStrict {
|
|||
stern?: boolean;
|
||||
};
|
||||
/**
|
||||
* MD013/line-length : Line length : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md013.md
|
||||
* MD013/line-length : Line length : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md013.md
|
||||
*/
|
||||
"line-length"?:
|
||||
| boolean
|
||||
|
|
@ -301,47 +315,47 @@ export interface ConfigurationStrict {
|
|||
stern?: boolean;
|
||||
};
|
||||
/**
|
||||
* MD014/commands-show-output : Dollar signs used before commands without showing output : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md014.md
|
||||
* MD014/commands-show-output : Dollar signs used before commands without showing output : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md014.md
|
||||
*/
|
||||
MD014?: boolean;
|
||||
/**
|
||||
* MD014/commands-show-output : Dollar signs used before commands without showing output : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md014.md
|
||||
* MD014/commands-show-output : Dollar signs used before commands without showing output : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md014.md
|
||||
*/
|
||||
"commands-show-output"?: boolean;
|
||||
/**
|
||||
* MD018/no-missing-space-atx : No space after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md018.md
|
||||
* MD018/no-missing-space-atx : No space after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md018.md
|
||||
*/
|
||||
MD018?: boolean;
|
||||
/**
|
||||
* MD018/no-missing-space-atx : No space after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md018.md
|
||||
* MD018/no-missing-space-atx : No space after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md018.md
|
||||
*/
|
||||
"no-missing-space-atx"?: boolean;
|
||||
/**
|
||||
* MD019/no-multiple-space-atx : Multiple spaces after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md019.md
|
||||
* MD019/no-multiple-space-atx : Multiple spaces after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md019.md
|
||||
*/
|
||||
MD019?: boolean;
|
||||
/**
|
||||
* MD019/no-multiple-space-atx : Multiple spaces after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md019.md
|
||||
* MD019/no-multiple-space-atx : Multiple spaces after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md019.md
|
||||
*/
|
||||
"no-multiple-space-atx"?: boolean;
|
||||
/**
|
||||
* MD020/no-missing-space-closed-atx : No space inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md020.md
|
||||
* MD020/no-missing-space-closed-atx : No space inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md020.md
|
||||
*/
|
||||
MD020?: boolean;
|
||||
/**
|
||||
* MD020/no-missing-space-closed-atx : No space inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md020.md
|
||||
* MD020/no-missing-space-closed-atx : No space inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md020.md
|
||||
*/
|
||||
"no-missing-space-closed-atx"?: boolean;
|
||||
/**
|
||||
* MD021/no-multiple-space-closed-atx : Multiple spaces inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md021.md
|
||||
* MD021/no-multiple-space-closed-atx : Multiple spaces inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md021.md
|
||||
*/
|
||||
MD021?: boolean;
|
||||
/**
|
||||
* MD021/no-multiple-space-closed-atx : Multiple spaces inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md021.md
|
||||
* MD021/no-multiple-space-closed-atx : Multiple spaces inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md021.md
|
||||
*/
|
||||
"no-multiple-space-closed-atx"?: boolean;
|
||||
/**
|
||||
* MD022/blanks-around-headings : Headings should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md022.md
|
||||
* MD022/blanks-around-headings : Headings should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md022.md
|
||||
*/
|
||||
MD022?:
|
||||
| boolean
|
||||
|
|
@ -356,7 +370,7 @@ export interface ConfigurationStrict {
|
|||
lines_below?: number | number[];
|
||||
};
|
||||
/**
|
||||
* MD022/blanks-around-headings : Headings should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md022.md
|
||||
* MD022/blanks-around-headings : Headings should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md022.md
|
||||
*/
|
||||
"blanks-around-headings"?:
|
||||
| boolean
|
||||
|
|
@ -371,15 +385,15 @@ export interface ConfigurationStrict {
|
|||
lines_below?: number | number[];
|
||||
};
|
||||
/**
|
||||
* MD023/heading-start-left : Headings must start at the beginning of the line : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md023.md
|
||||
* MD023/heading-start-left : Headings must start at the beginning of the line : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md023.md
|
||||
*/
|
||||
MD023?: boolean;
|
||||
/**
|
||||
* MD023/heading-start-left : Headings must start at the beginning of the line : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md023.md
|
||||
* MD023/heading-start-left : Headings must start at the beginning of the line : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md023.md
|
||||
*/
|
||||
"heading-start-left"?: boolean;
|
||||
/**
|
||||
* MD024/no-duplicate-heading : Multiple headings with the same content : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md024.md
|
||||
* MD024/no-duplicate-heading : Multiple headings with the same content : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md024.md
|
||||
*/
|
||||
MD024?:
|
||||
| boolean
|
||||
|
|
@ -390,7 +404,7 @@ export interface ConfigurationStrict {
|
|||
siblings_only?: boolean;
|
||||
};
|
||||
/**
|
||||
* MD024/no-duplicate-heading : Multiple headings with the same content : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md024.md
|
||||
* MD024/no-duplicate-heading : Multiple headings with the same content : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md024.md
|
||||
*/
|
||||
"no-duplicate-heading"?:
|
||||
| boolean
|
||||
|
|
@ -401,7 +415,7 @@ export interface ConfigurationStrict {
|
|||
siblings_only?: boolean;
|
||||
};
|
||||
/**
|
||||
* MD025/single-title/single-h1 : Multiple top-level headings in the same document : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md025.md
|
||||
* MD025/single-title/single-h1 : Multiple top-level headings in the same document : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md025.md
|
||||
*/
|
||||
MD025?:
|
||||
| boolean
|
||||
|
|
@ -416,7 +430,7 @@ export interface ConfigurationStrict {
|
|||
level?: number;
|
||||
};
|
||||
/**
|
||||
* MD025/single-title/single-h1 : Multiple top-level headings in the same document : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md025.md
|
||||
* MD025/single-title/single-h1 : Multiple top-level headings in the same document : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md025.md
|
||||
*/
|
||||
"single-title"?:
|
||||
| boolean
|
||||
|
|
@ -431,7 +445,7 @@ export interface ConfigurationStrict {
|
|||
level?: number;
|
||||
};
|
||||
/**
|
||||
* MD025/single-title/single-h1 : Multiple top-level headings in the same document : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md025.md
|
||||
* MD025/single-title/single-h1 : Multiple top-level headings in the same document : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md025.md
|
||||
*/
|
||||
"single-h1"?:
|
||||
| boolean
|
||||
|
|
@ -446,7 +460,7 @@ export interface ConfigurationStrict {
|
|||
level?: number;
|
||||
};
|
||||
/**
|
||||
* MD026/no-trailing-punctuation : Trailing punctuation in heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md026.md
|
||||
* MD026/no-trailing-punctuation : Trailing punctuation in heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md026.md
|
||||
*/
|
||||
MD026?:
|
||||
| boolean
|
||||
|
|
@ -457,7 +471,7 @@ export interface ConfigurationStrict {
|
|||
punctuation?: string;
|
||||
};
|
||||
/**
|
||||
* MD026/no-trailing-punctuation : Trailing punctuation in heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md026.md
|
||||
* MD026/no-trailing-punctuation : Trailing punctuation in heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md026.md
|
||||
*/
|
||||
"no-trailing-punctuation"?:
|
||||
| boolean
|
||||
|
|
@ -468,7 +482,7 @@ export interface ConfigurationStrict {
|
|||
punctuation?: string;
|
||||
};
|
||||
/**
|
||||
* MD027/no-multiple-space-blockquote : Multiple spaces after blockquote symbol : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md027.md
|
||||
* MD027/no-multiple-space-blockquote : Multiple spaces after blockquote symbol : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md027.md
|
||||
*/
|
||||
MD027?:
|
||||
| boolean
|
||||
|
|
@ -479,7 +493,7 @@ export interface ConfigurationStrict {
|
|||
list_items?: boolean;
|
||||
};
|
||||
/**
|
||||
* MD027/no-multiple-space-blockquote : Multiple spaces after blockquote symbol : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md027.md
|
||||
* MD027/no-multiple-space-blockquote : Multiple spaces after blockquote symbol : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md027.md
|
||||
*/
|
||||
"no-multiple-space-blockquote"?:
|
||||
| boolean
|
||||
|
|
@ -490,15 +504,15 @@ export interface ConfigurationStrict {
|
|||
list_items?: boolean;
|
||||
};
|
||||
/**
|
||||
* MD028/no-blanks-blockquote : Blank line inside blockquote : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md028.md
|
||||
* MD028/no-blanks-blockquote : Blank line inside blockquote : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md028.md
|
||||
*/
|
||||
MD028?: boolean;
|
||||
/**
|
||||
* MD028/no-blanks-blockquote : Blank line inside blockquote : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md028.md
|
||||
* MD028/no-blanks-blockquote : Blank line inside blockquote : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md028.md
|
||||
*/
|
||||
"no-blanks-blockquote"?: boolean;
|
||||
/**
|
||||
* MD029/ol-prefix : Ordered list item prefix : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md029.md
|
||||
* MD029/ol-prefix : Ordered list item prefix : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md029.md
|
||||
*/
|
||||
MD029?:
|
||||
| boolean
|
||||
|
|
@ -509,7 +523,7 @@ export interface ConfigurationStrict {
|
|||
style?: "one" | "ordered" | "one_or_ordered" | "zero";
|
||||
};
|
||||
/**
|
||||
* MD029/ol-prefix : Ordered list item prefix : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md029.md
|
||||
* MD029/ol-prefix : Ordered list item prefix : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md029.md
|
||||
*/
|
||||
"ol-prefix"?:
|
||||
| boolean
|
||||
|
|
@ -520,7 +534,7 @@ export interface ConfigurationStrict {
|
|||
style?: "one" | "ordered" | "one_or_ordered" | "zero";
|
||||
};
|
||||
/**
|
||||
* MD030/list-marker-space : Spaces after list markers : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md030.md
|
||||
* MD030/list-marker-space : Spaces after list markers : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md030.md
|
||||
*/
|
||||
MD030?:
|
||||
| boolean
|
||||
|
|
@ -543,7 +557,7 @@ export interface ConfigurationStrict {
|
|||
ol_multi?: number;
|
||||
};
|
||||
/**
|
||||
* MD030/list-marker-space : Spaces after list markers : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md030.md
|
||||
* MD030/list-marker-space : Spaces after list markers : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md030.md
|
||||
*/
|
||||
"list-marker-space"?:
|
||||
| boolean
|
||||
|
|
@ -566,7 +580,7 @@ export interface ConfigurationStrict {
|
|||
ol_multi?: number;
|
||||
};
|
||||
/**
|
||||
* MD031/blanks-around-fences : Fenced code blocks should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md031.md
|
||||
* MD031/blanks-around-fences : Fenced code blocks should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md031.md
|
||||
*/
|
||||
MD031?:
|
||||
| boolean
|
||||
|
|
@ -577,7 +591,7 @@ export interface ConfigurationStrict {
|
|||
list_items?: boolean;
|
||||
};
|
||||
/**
|
||||
* MD031/blanks-around-fences : Fenced code blocks should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md031.md
|
||||
* MD031/blanks-around-fences : Fenced code blocks should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md031.md
|
||||
*/
|
||||
"blanks-around-fences"?:
|
||||
| boolean
|
||||
|
|
@ -588,15 +602,15 @@ export interface ConfigurationStrict {
|
|||
list_items?: boolean;
|
||||
};
|
||||
/**
|
||||
* MD032/blanks-around-lists : Lists should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md032.md
|
||||
* MD032/blanks-around-lists : Lists should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md032.md
|
||||
*/
|
||||
MD032?: boolean;
|
||||
/**
|
||||
* MD032/blanks-around-lists : Lists should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md032.md
|
||||
* MD032/blanks-around-lists : Lists should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md032.md
|
||||
*/
|
||||
"blanks-around-lists"?: boolean;
|
||||
/**
|
||||
* MD033/no-inline-html : Inline HTML : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md033.md
|
||||
* MD033/no-inline-html : Inline HTML : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md033.md
|
||||
*/
|
||||
MD033?:
|
||||
| boolean
|
||||
|
|
@ -605,9 +619,13 @@ export interface ConfigurationStrict {
|
|||
* Allowed elements
|
||||
*/
|
||||
allowed_elements?: string[];
|
||||
/**
|
||||
* Allowed elements in tables
|
||||
*/
|
||||
table_allowed_elements?: string[];
|
||||
};
|
||||
/**
|
||||
* MD033/no-inline-html : Inline HTML : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md033.md
|
||||
* MD033/no-inline-html : Inline HTML : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md033.md
|
||||
*/
|
||||
"no-inline-html"?:
|
||||
| boolean
|
||||
|
|
@ -616,17 +634,21 @@ export interface ConfigurationStrict {
|
|||
* Allowed elements
|
||||
*/
|
||||
allowed_elements?: string[];
|
||||
/**
|
||||
* Allowed elements in tables
|
||||
*/
|
||||
table_allowed_elements?: string[];
|
||||
};
|
||||
/**
|
||||
* MD034/no-bare-urls : Bare URL used : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md034.md
|
||||
* MD034/no-bare-urls : Bare URL used : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md034.md
|
||||
*/
|
||||
MD034?: boolean;
|
||||
/**
|
||||
* MD034/no-bare-urls : Bare URL used : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md034.md
|
||||
* MD034/no-bare-urls : Bare URL used : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md034.md
|
||||
*/
|
||||
"no-bare-urls"?: boolean;
|
||||
/**
|
||||
* MD035/hr-style : Horizontal rule style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md035.md
|
||||
* MD035/hr-style : Horizontal rule style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md035.md
|
||||
*/
|
||||
MD035?:
|
||||
| boolean
|
||||
|
|
@ -637,7 +659,7 @@ export interface ConfigurationStrict {
|
|||
style?: string;
|
||||
};
|
||||
/**
|
||||
* MD035/hr-style : Horizontal rule style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md035.md
|
||||
* MD035/hr-style : Horizontal rule style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md035.md
|
||||
*/
|
||||
"hr-style"?:
|
||||
| boolean
|
||||
|
|
@ -648,7 +670,7 @@ export interface ConfigurationStrict {
|
|||
style?: string;
|
||||
};
|
||||
/**
|
||||
* MD036/no-emphasis-as-heading : Emphasis used instead of a heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md036.md
|
||||
* MD036/no-emphasis-as-heading : Emphasis used instead of a heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md036.md
|
||||
*/
|
||||
MD036?:
|
||||
| boolean
|
||||
|
|
@ -659,7 +681,7 @@ export interface ConfigurationStrict {
|
|||
punctuation?: string;
|
||||
};
|
||||
/**
|
||||
* MD036/no-emphasis-as-heading : Emphasis used instead of a heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md036.md
|
||||
* MD036/no-emphasis-as-heading : Emphasis used instead of a heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md036.md
|
||||
*/
|
||||
"no-emphasis-as-heading"?:
|
||||
| boolean
|
||||
|
|
@ -670,31 +692,31 @@ export interface ConfigurationStrict {
|
|||
punctuation?: string;
|
||||
};
|
||||
/**
|
||||
* MD037/no-space-in-emphasis : Spaces inside emphasis markers : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md037.md
|
||||
* MD037/no-space-in-emphasis : Spaces inside emphasis markers : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md037.md
|
||||
*/
|
||||
MD037?: boolean;
|
||||
/**
|
||||
* MD037/no-space-in-emphasis : Spaces inside emphasis markers : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md037.md
|
||||
* MD037/no-space-in-emphasis : Spaces inside emphasis markers : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md037.md
|
||||
*/
|
||||
"no-space-in-emphasis"?: boolean;
|
||||
/**
|
||||
* MD038/no-space-in-code : Spaces inside code span elements : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md038.md
|
||||
* MD038/no-space-in-code : Spaces inside code span elements : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md038.md
|
||||
*/
|
||||
MD038?: boolean;
|
||||
/**
|
||||
* MD038/no-space-in-code : Spaces inside code span elements : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md038.md
|
||||
* MD038/no-space-in-code : Spaces inside code span elements : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md038.md
|
||||
*/
|
||||
"no-space-in-code"?: boolean;
|
||||
/**
|
||||
* MD039/no-space-in-links : Spaces inside link text : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md039.md
|
||||
* MD039/no-space-in-links : Spaces inside link text : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md039.md
|
||||
*/
|
||||
MD039?: boolean;
|
||||
/**
|
||||
* MD039/no-space-in-links : Spaces inside link text : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md039.md
|
||||
* MD039/no-space-in-links : Spaces inside link text : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md039.md
|
||||
*/
|
||||
"no-space-in-links"?: boolean;
|
||||
/**
|
||||
* MD040/fenced-code-language : Fenced code blocks should have a language specified : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md040.md
|
||||
* MD040/fenced-code-language : Fenced code blocks should have a language specified : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md040.md
|
||||
*/
|
||||
MD040?:
|
||||
| boolean
|
||||
|
|
@ -709,7 +731,7 @@ export interface ConfigurationStrict {
|
|||
language_only?: boolean;
|
||||
};
|
||||
/**
|
||||
* MD040/fenced-code-language : Fenced code blocks should have a language specified : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md040.md
|
||||
* MD040/fenced-code-language : Fenced code blocks should have a language specified : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md040.md
|
||||
*/
|
||||
"fenced-code-language"?:
|
||||
| boolean
|
||||
|
|
@ -724,7 +746,7 @@ export interface ConfigurationStrict {
|
|||
language_only?: boolean;
|
||||
};
|
||||
/**
|
||||
* MD041/first-line-heading/first-line-h1 : First line in a file should be a top-level heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md041.md
|
||||
* MD041/first-line-heading/first-line-h1 : First line in a file should be a top-level heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md041.md
|
||||
*/
|
||||
MD041?:
|
||||
| boolean
|
||||
|
|
@ -743,7 +765,7 @@ export interface ConfigurationStrict {
|
|||
level?: number;
|
||||
};
|
||||
/**
|
||||
* MD041/first-line-heading/first-line-h1 : First line in a file should be a top-level heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md041.md
|
||||
* MD041/first-line-heading/first-line-h1 : First line in a file should be a top-level heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md041.md
|
||||
*/
|
||||
"first-line-heading"?:
|
||||
| boolean
|
||||
|
|
@ -762,7 +784,7 @@ export interface ConfigurationStrict {
|
|||
level?: number;
|
||||
};
|
||||
/**
|
||||
* MD041/first-line-heading/first-line-h1 : First line in a file should be a top-level heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md041.md
|
||||
* MD041/first-line-heading/first-line-h1 : First line in a file should be a top-level heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md041.md
|
||||
*/
|
||||
"first-line-h1"?:
|
||||
| boolean
|
||||
|
|
@ -781,15 +803,15 @@ export interface ConfigurationStrict {
|
|||
level?: number;
|
||||
};
|
||||
/**
|
||||
* MD042/no-empty-links : No empty links : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md042.md
|
||||
* MD042/no-empty-links : No empty links : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md042.md
|
||||
*/
|
||||
MD042?: boolean;
|
||||
/**
|
||||
* MD042/no-empty-links : No empty links : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md042.md
|
||||
* MD042/no-empty-links : No empty links : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md042.md
|
||||
*/
|
||||
"no-empty-links"?: boolean;
|
||||
/**
|
||||
* MD043/required-headings : Required heading structure : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md043.md
|
||||
* MD043/required-headings : Required heading structure : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md043.md
|
||||
*/
|
||||
MD043?:
|
||||
| boolean
|
||||
|
|
@ -804,7 +826,7 @@ export interface ConfigurationStrict {
|
|||
match_case?: boolean;
|
||||
};
|
||||
/**
|
||||
* MD043/required-headings : Required heading structure : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md043.md
|
||||
* MD043/required-headings : Required heading structure : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md043.md
|
||||
*/
|
||||
"required-headings"?:
|
||||
| boolean
|
||||
|
|
@ -819,7 +841,7 @@ export interface ConfigurationStrict {
|
|||
match_case?: boolean;
|
||||
};
|
||||
/**
|
||||
* MD044/proper-names : Proper names should have the correct capitalization : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md044.md
|
||||
* MD044/proper-names : Proper names should have the correct capitalization : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md044.md
|
||||
*/
|
||||
MD044?:
|
||||
| boolean
|
||||
|
|
@ -838,7 +860,7 @@ export interface ConfigurationStrict {
|
|||
html_elements?: boolean;
|
||||
};
|
||||
/**
|
||||
* MD044/proper-names : Proper names should have the correct capitalization : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md044.md
|
||||
* MD044/proper-names : Proper names should have the correct capitalization : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md044.md
|
||||
*/
|
||||
"proper-names"?:
|
||||
| boolean
|
||||
|
|
@ -857,15 +879,15 @@ export interface ConfigurationStrict {
|
|||
html_elements?: boolean;
|
||||
};
|
||||
/**
|
||||
* MD045/no-alt-text : Images should have alternate text (alt text) : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md045.md
|
||||
* MD045/no-alt-text : Images should have alternate text (alt text) : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md045.md
|
||||
*/
|
||||
MD045?: boolean;
|
||||
/**
|
||||
* MD045/no-alt-text : Images should have alternate text (alt text) : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md045.md
|
||||
* MD045/no-alt-text : Images should have alternate text (alt text) : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md045.md
|
||||
*/
|
||||
"no-alt-text"?: boolean;
|
||||
/**
|
||||
* MD046/code-block-style : Code block style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md046.md
|
||||
* MD046/code-block-style : Code block style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md046.md
|
||||
*/
|
||||
MD046?:
|
||||
| boolean
|
||||
|
|
@ -876,7 +898,7 @@ export interface ConfigurationStrict {
|
|||
style?: "consistent" | "fenced" | "indented";
|
||||
};
|
||||
/**
|
||||
* MD046/code-block-style : Code block style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md046.md
|
||||
* MD046/code-block-style : Code block style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md046.md
|
||||
*/
|
||||
"code-block-style"?:
|
||||
| boolean
|
||||
|
|
@ -887,15 +909,15 @@ export interface ConfigurationStrict {
|
|||
style?: "consistent" | "fenced" | "indented";
|
||||
};
|
||||
/**
|
||||
* MD047/single-trailing-newline : Files should end with a single newline character : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md047.md
|
||||
* MD047/single-trailing-newline : Files should end with a single newline character : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md047.md
|
||||
*/
|
||||
MD047?: boolean;
|
||||
/**
|
||||
* MD047/single-trailing-newline : Files should end with a single newline character : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md047.md
|
||||
* MD047/single-trailing-newline : Files should end with a single newline character : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md047.md
|
||||
*/
|
||||
"single-trailing-newline"?: boolean;
|
||||
/**
|
||||
* MD048/code-fence-style : Code fence style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md048.md
|
||||
* MD048/code-fence-style : Code fence style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md048.md
|
||||
*/
|
||||
MD048?:
|
||||
| boolean
|
||||
|
|
@ -906,7 +928,7 @@ export interface ConfigurationStrict {
|
|||
style?: "consistent" | "backtick" | "tilde";
|
||||
};
|
||||
/**
|
||||
* MD048/code-fence-style : Code fence style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md048.md
|
||||
* MD048/code-fence-style : Code fence style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md048.md
|
||||
*/
|
||||
"code-fence-style"?:
|
||||
| boolean
|
||||
|
|
@ -917,7 +939,7 @@ export interface ConfigurationStrict {
|
|||
style?: "consistent" | "backtick" | "tilde";
|
||||
};
|
||||
/**
|
||||
* MD049/emphasis-style : Emphasis style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md049.md
|
||||
* MD049/emphasis-style : Emphasis style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md049.md
|
||||
*/
|
||||
MD049?:
|
||||
| boolean
|
||||
|
|
@ -928,7 +950,7 @@ export interface ConfigurationStrict {
|
|||
style?: "consistent" | "asterisk" | "underscore";
|
||||
};
|
||||
/**
|
||||
* MD049/emphasis-style : Emphasis style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md049.md
|
||||
* MD049/emphasis-style : Emphasis style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md049.md
|
||||
*/
|
||||
"emphasis-style"?:
|
||||
| boolean
|
||||
|
|
@ -939,7 +961,7 @@ export interface ConfigurationStrict {
|
|||
style?: "consistent" | "asterisk" | "underscore";
|
||||
};
|
||||
/**
|
||||
* MD050/strong-style : Strong style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md050.md
|
||||
* MD050/strong-style : Strong style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md050.md
|
||||
*/
|
||||
MD050?:
|
||||
| boolean
|
||||
|
|
@ -950,7 +972,7 @@ export interface ConfigurationStrict {
|
|||
style?: "consistent" | "asterisk" | "underscore";
|
||||
};
|
||||
/**
|
||||
* MD050/strong-style : Strong style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md050.md
|
||||
* MD050/strong-style : Strong style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md050.md
|
||||
*/
|
||||
"strong-style"?:
|
||||
| boolean
|
||||
|
|
@ -961,7 +983,7 @@ export interface ConfigurationStrict {
|
|||
style?: "consistent" | "asterisk" | "underscore";
|
||||
};
|
||||
/**
|
||||
* MD051/link-fragments : Link fragments should be valid : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md051.md
|
||||
* MD051/link-fragments : Link fragments should be valid : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md051.md
|
||||
*/
|
||||
MD051?:
|
||||
| boolean
|
||||
|
|
@ -970,9 +992,13 @@ export interface ConfigurationStrict {
|
|||
* Ignore case of fragments
|
||||
*/
|
||||
ignore_case?: boolean;
|
||||
/**
|
||||
* Pattern for ignoring additional fragments
|
||||
*/
|
||||
ignored_pattern?: string;
|
||||
};
|
||||
/**
|
||||
* MD051/link-fragments : Link fragments should be valid : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md051.md
|
||||
* MD051/link-fragments : Link fragments should be valid : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md051.md
|
||||
*/
|
||||
"link-fragments"?:
|
||||
| boolean
|
||||
|
|
@ -981,31 +1007,43 @@ export interface ConfigurationStrict {
|
|||
* Ignore case of fragments
|
||||
*/
|
||||
ignore_case?: boolean;
|
||||
/**
|
||||
* Pattern for ignoring additional fragments
|
||||
*/
|
||||
ignored_pattern?: string;
|
||||
};
|
||||
/**
|
||||
* MD052/reference-links-images : Reference links and images should use a label that is defined : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md052.md
|
||||
* MD052/reference-links-images : Reference links and images should use a label that is defined : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md052.md
|
||||
*/
|
||||
MD052?:
|
||||
| boolean
|
||||
| {
|
||||
/**
|
||||
* Include shortcut syntax
|
||||
* Ignored link labels
|
||||
*/
|
||||
shortcut_syntax?: boolean;
|
||||
};
|
||||
/**
|
||||
* MD052/reference-links-images : Reference links and images should use a label that is defined : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md052.md
|
||||
*/
|
||||
"reference-links-images"?:
|
||||
| boolean
|
||||
| {
|
||||
ignored_labels?: string[];
|
||||
/**
|
||||
* Include shortcut syntax
|
||||
*/
|
||||
shortcut_syntax?: boolean;
|
||||
};
|
||||
/**
|
||||
* MD053/link-image-reference-definitions : Link and image reference definitions should be needed : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md053.md
|
||||
* MD052/reference-links-images : Reference links and images should use a label that is defined : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md052.md
|
||||
*/
|
||||
"reference-links-images"?:
|
||||
| boolean
|
||||
| {
|
||||
/**
|
||||
* Ignored link labels
|
||||
*/
|
||||
ignored_labels?: string[];
|
||||
/**
|
||||
* Include shortcut syntax
|
||||
*/
|
||||
shortcut_syntax?: boolean;
|
||||
};
|
||||
/**
|
||||
* MD053/link-image-reference-definitions : Link and image reference definitions should be needed : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md053.md
|
||||
*/
|
||||
MD053?:
|
||||
| boolean
|
||||
|
|
@ -1016,7 +1054,7 @@ export interface ConfigurationStrict {
|
|||
ignored_definitions?: string[];
|
||||
};
|
||||
/**
|
||||
* MD053/link-image-reference-definitions : Link and image reference definitions should be needed : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md053.md
|
||||
* MD053/link-image-reference-definitions : Link and image reference definitions should be needed : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md053.md
|
||||
*/
|
||||
"link-image-reference-definitions"?:
|
||||
| boolean
|
||||
|
|
@ -1027,7 +1065,7 @@ export interface ConfigurationStrict {
|
|||
ignored_definitions?: string[];
|
||||
};
|
||||
/**
|
||||
* MD054/link-image-style : Link and image style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md054.md
|
||||
* MD054/link-image-style : Link and image style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md054.md
|
||||
*/
|
||||
MD054?:
|
||||
| boolean
|
||||
|
|
@ -1058,7 +1096,7 @@ export interface ConfigurationStrict {
|
|||
url_inline?: boolean;
|
||||
};
|
||||
/**
|
||||
* MD054/link-image-style : Link and image style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md054.md
|
||||
* MD054/link-image-style : Link and image style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md054.md
|
||||
*/
|
||||
"link-image-style"?:
|
||||
| boolean
|
||||
|
|
@ -1089,7 +1127,7 @@ export interface ConfigurationStrict {
|
|||
url_inline?: boolean;
|
||||
};
|
||||
/**
|
||||
* MD055/table-pipe-style : Table pipe style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md055.md
|
||||
* MD055/table-pipe-style : Table pipe style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md055.md
|
||||
*/
|
||||
MD055?:
|
||||
| boolean
|
||||
|
|
@ -1100,7 +1138,7 @@ export interface ConfigurationStrict {
|
|||
style?: "consistent" | "leading_only" | "trailing_only" | "leading_and_trailing" | "no_leading_or_trailing";
|
||||
};
|
||||
/**
|
||||
* MD055/table-pipe-style : Table pipe style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md055.md
|
||||
* MD055/table-pipe-style : Table pipe style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md055.md
|
||||
*/
|
||||
"table-pipe-style"?:
|
||||
| boolean
|
||||
|
|
@ -1111,23 +1149,23 @@ export interface ConfigurationStrict {
|
|||
style?: "consistent" | "leading_only" | "trailing_only" | "leading_and_trailing" | "no_leading_or_trailing";
|
||||
};
|
||||
/**
|
||||
* MD056/table-column-count : Table column count : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md056.md
|
||||
* MD056/table-column-count : Table column count : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md056.md
|
||||
*/
|
||||
MD056?: boolean;
|
||||
/**
|
||||
* MD056/table-column-count : Table column count : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md056.md
|
||||
* MD056/table-column-count : Table column count : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md056.md
|
||||
*/
|
||||
"table-column-count"?: boolean;
|
||||
/**
|
||||
* MD058/blanks-around-tables : Tables should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md058.md
|
||||
* MD058/blanks-around-tables : Tables should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md058.md
|
||||
*/
|
||||
MD058?: boolean;
|
||||
/**
|
||||
* MD058/blanks-around-tables : Tables should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md058.md
|
||||
* MD058/blanks-around-tables : Tables should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md058.md
|
||||
*/
|
||||
"blanks-around-tables"?: boolean;
|
||||
/**
|
||||
* MD059/descriptive-link-text : Link text should be descriptive : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md059.md
|
||||
* MD059/descriptive-link-text : Link text should be descriptive : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md059.md
|
||||
*/
|
||||
MD059?:
|
||||
| boolean
|
||||
|
|
@ -1138,7 +1176,7 @@ export interface ConfigurationStrict {
|
|||
prohibited_texts?: string[];
|
||||
};
|
||||
/**
|
||||
* MD059/descriptive-link-text : Link text should be descriptive : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md059.md
|
||||
* MD059/descriptive-link-text : Link text should be descriptive : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md059.md
|
||||
*/
|
||||
"descriptive-link-text"?:
|
||||
| boolean
|
||||
|
|
@ -1148,6 +1186,28 @@ export interface ConfigurationStrict {
|
|||
*/
|
||||
prohibited_texts?: string[];
|
||||
};
|
||||
/**
|
||||
* MD060/table-column-style : Table column style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md060.md
|
||||
*/
|
||||
MD060?:
|
||||
| boolean
|
||||
| {
|
||||
/**
|
||||
* Table column style
|
||||
*/
|
||||
style?: "any" | "aligned" | "compact" | "tight";
|
||||
};
|
||||
/**
|
||||
* MD060/table-column-style : Table column style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md060.md
|
||||
*/
|
||||
"table-column-style"?:
|
||||
| boolean
|
||||
| {
|
||||
/**
|
||||
* Table column style
|
||||
*/
|
||||
style?: "any" | "aligned" | "compact" | "tight";
|
||||
};
|
||||
/**
|
||||
* headings : MD001, MD003, MD018, MD019, MD020, MD021, MD022, MD023, MD024, MD025, MD026, MD036, MD041, MD043
|
||||
*/
|
||||
|
|
@ -1241,7 +1301,7 @@ export interface ConfigurationStrict {
|
|||
*/
|
||||
images?: boolean;
|
||||
/**
|
||||
* table : MD055, MD056, MD058
|
||||
* table : MD055, MD056, MD058, MD060
|
||||
*/
|
||||
table?: boolean;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@ export const deprecatedRuleNames = [];
|
|||
export const fixableRuleNames = [
|
||||
"MD004", "MD005", "MD007", "MD009", "MD010", "MD011",
|
||||
"MD012", "MD014", "MD018", "MD019", "MD020", "MD021",
|
||||
"MD022", "MD023", "MD026", "MD027", "MD030", "MD031",
|
||||
"MD032", "MD034", "MD037", "MD038", "MD039", "MD044",
|
||||
"MD047", "MD049", "MD050", "MD051", "MD053", "MD054",
|
||||
"MD058"
|
||||
"MD022", "MD023", "MD026", "MD027", "MD029", "MD030",
|
||||
"MD031", "MD032", "MD034", "MD037", "MD038", "MD039",
|
||||
"MD044", "MD047", "MD049", "MD050", "MD051", "MD053",
|
||||
"MD054", "MD058"
|
||||
];
|
||||
export const homepage = "https://github.com/DavidAnson/markdownlint";
|
||||
export const version = "0.37.4";
|
||||
export const version = "0.38.0";
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ export type Configuration = import("./markdownlint.mjs").Configuration;
|
|||
export type ConfigurationParser = import("./markdownlint.mjs").ConfigurationParser;
|
||||
export type ConfigurationStrict = import("./markdownlint.mjs").ConfigurationStrict;
|
||||
export type FixInfo = import("./markdownlint.mjs").FixInfo;
|
||||
export type FixInfoNormalized = import("./markdownlint.mjs").FixInfoNormalized;
|
||||
export type LintCallback = import("./markdownlint.mjs").LintCallback;
|
||||
export type LintContentCallback = import("./markdownlint.mjs").LintContentCallback;
|
||||
export type LintError = import("./markdownlint.mjs").LintError;
|
||||
|
|
@ -23,8 +24,6 @@ export type RuleConfiguration = import("./markdownlint.mjs").RuleConfiguration;
|
|||
export type RuleFunction = import("./markdownlint.mjs").RuleFunction;
|
||||
export type RuleOnError = import("./markdownlint.mjs").RuleOnError;
|
||||
export type RuleOnErrorFixInfo = import("./markdownlint.mjs").RuleOnErrorFixInfo;
|
||||
export type RuleOnErrorFixInfoNormalized = import("./markdownlint.mjs").RuleOnErrorFixInfoNormalized;
|
||||
export type RuleOnErrorInfo = import("./markdownlint.mjs").RuleOnErrorInfo;
|
||||
export type RuleParams = import("./markdownlint.mjs").RuleParams;
|
||||
export type ToStringCallback = import("./markdownlint.mjs").ToStringCallback;
|
||||
export { applyFix, applyFixes, getVersion } from "./markdownlint.mjs";
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ export { resolveModule } from "./resolve-module.cjs";
|
|||
/** @typedef {import("./markdownlint.mjs").ConfigurationParser} ConfigurationParser */
|
||||
/** @typedef {import("./markdownlint.mjs").ConfigurationStrict} ConfigurationStrict */
|
||||
/** @typedef {import("./markdownlint.mjs").FixInfo} FixInfo */
|
||||
/** @typedef {import("./markdownlint.mjs").FixInfoNormalized} FixInfoNormalized */
|
||||
/** @typedef {import("./markdownlint.mjs").LintCallback} LintCallback */
|
||||
/** @typedef {import("./markdownlint.mjs").LintContentCallback} LintContentCallback */
|
||||
/** @typedef {import("./markdownlint.mjs").LintError} LintError */
|
||||
|
|
@ -27,7 +28,5 @@ export { resolveModule } from "./resolve-module.cjs";
|
|||
/** @typedef {import("./markdownlint.mjs").RuleFunction} RuleFunction */
|
||||
/** @typedef {import("./markdownlint.mjs").RuleOnError} RuleOnError */
|
||||
/** @typedef {import("./markdownlint.mjs").RuleOnErrorFixInfo} RuleOnErrorFixInfo */
|
||||
/** @typedef {import("./markdownlint.mjs").RuleOnErrorFixInfoNormalized} RuleOnErrorFixInfoNormalized */
|
||||
/** @typedef {import("./markdownlint.mjs").RuleOnErrorInfo} RuleOnErrorInfo */
|
||||
/** @typedef {import("./markdownlint.mjs").RuleParams} RuleParams */
|
||||
/** @typedef {import("./markdownlint.mjs").ToStringCallback} ToStringCallback */
|
||||
|
|
|
|||
|
|
@ -63,25 +63,42 @@ export function readConfigSync(file: string, parsers?: ConfigurationParser[], fs
|
|||
* Applies the specified fix to a Markdown content line.
|
||||
*
|
||||
* @param {string} line Line of Markdown content.
|
||||
* @param {RuleOnErrorFixInfo} fixInfo RuleOnErrorFixInfo instance.
|
||||
* @param {FixInfo} fixInfo FixInfo instance.
|
||||
* @param {string} [lineEnding] Line ending to use.
|
||||
* @returns {string | null} Fixed content or null if deleted.
|
||||
*/
|
||||
export function applyFix(line: string, fixInfo: RuleOnErrorFixInfo, lineEnding?: string): string | null;
|
||||
export function applyFix(line: string, fixInfo: FixInfo, lineEnding?: string): string | null;
|
||||
/**
|
||||
* Applies as many of the specified fixes as possible to Markdown content.
|
||||
*
|
||||
* @param {string} input Lines of Markdown content.
|
||||
* @param {RuleOnErrorInfo[]} errors RuleOnErrorInfo instances.
|
||||
* @param {LintError[]} errors LintError instances.
|
||||
* @returns {string} Fixed content.
|
||||
*/
|
||||
export function applyFixes(input: string, errors: RuleOnErrorInfo[]): string;
|
||||
export function applyFixes(input: string, errors: LintError[]): string;
|
||||
/**
|
||||
* Gets the (semantic) version of the library.
|
||||
*
|
||||
* @returns {string} SemVer string.
|
||||
*/
|
||||
export function getVersion(): string;
|
||||
/**
|
||||
* Result object for getEnabledRulesPerLineNumber.
|
||||
*/
|
||||
export type EnabledRulesPerLineNumberResult = {
|
||||
/**
|
||||
* Effective configuration.
|
||||
*/
|
||||
effectiveConfig: Configuration;
|
||||
/**
|
||||
* Enabled rules per line number.
|
||||
*/
|
||||
enabledRulesPerLineNumber: any[];
|
||||
/**
|
||||
* Enabled rule list.
|
||||
*/
|
||||
enabledRuleList: Rule[];
|
||||
};
|
||||
/**
|
||||
* Function to implement rule logic.
|
||||
*/
|
||||
|
|
@ -303,27 +320,6 @@ export type RuleOnErrorFixInfo = {
|
|||
*/
|
||||
insertText?: string;
|
||||
};
|
||||
/**
|
||||
* RuleOnErrorInfo with all optional properties present.
|
||||
*/
|
||||
export type RuleOnErrorFixInfoNormalized = {
|
||||
/**
|
||||
* Line number (1-based).
|
||||
*/
|
||||
lineNumber: number;
|
||||
/**
|
||||
* Column of the fix (1-based).
|
||||
*/
|
||||
editColumn: number;
|
||||
/**
|
||||
* Count of characters to delete.
|
||||
*/
|
||||
deleteCount: number;
|
||||
/**
|
||||
* Text to insert (after deleting).
|
||||
*/
|
||||
insertText: string;
|
||||
};
|
||||
/**
|
||||
* Rule definition.
|
||||
*/
|
||||
|
|
@ -414,10 +410,6 @@ export type Options = {
|
|||
* True to ignore HTML directives.
|
||||
*/
|
||||
noInlineConfig?: boolean;
|
||||
/**
|
||||
* Results object version.
|
||||
*/
|
||||
resultVersion?: number;
|
||||
/**
|
||||
* Strings to lint.
|
||||
*/
|
||||
|
|
@ -430,11 +422,7 @@ export type Options = {
|
|||
*/
|
||||
export type Plugin = any[];
|
||||
/**
|
||||
* Function to pretty-print lint results.
|
||||
*/
|
||||
export type ToStringCallback = (ruleAliases?: boolean) => string;
|
||||
/**
|
||||
* Lint results (for resultVersion 3).
|
||||
* Lint results.
|
||||
*/
|
||||
export type LintResults = {
|
||||
[x: string]: LintError[];
|
||||
|
|
@ -470,11 +458,11 @@ export type LintError = {
|
|||
/**
|
||||
* Column number (1-based) and length.
|
||||
*/
|
||||
errorRange: number[];
|
||||
errorRange: number[] | null;
|
||||
/**
|
||||
* Fix information.
|
||||
*/
|
||||
fixInfo?: FixInfo;
|
||||
fixInfo: FixInfo | null;
|
||||
};
|
||||
/**
|
||||
* Fix information.
|
||||
|
|
@ -497,6 +485,27 @@ export type FixInfo = {
|
|||
*/
|
||||
insertText?: string;
|
||||
};
|
||||
/**
|
||||
* FixInfo with all optional properties present.
|
||||
*/
|
||||
export type FixInfoNormalized = {
|
||||
/**
|
||||
* Line number (1-based).
|
||||
*/
|
||||
lineNumber: number;
|
||||
/**
|
||||
* Column of the fix (1-based).
|
||||
*/
|
||||
editColumn: number;
|
||||
/**
|
||||
* Count of characters to delete.
|
||||
*/
|
||||
deleteCount: number;
|
||||
/**
|
||||
* Text to insert (after deleting).
|
||||
*/
|
||||
insertText: string;
|
||||
};
|
||||
/**
|
||||
* Called with the result of linting a string or document.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -108,9 +108,15 @@ function validateRuleList(ruleList, synchronous) {
|
|||
* @returns {LintResults} New LintResults instance.
|
||||
*/
|
||||
function newResults(ruleList) {
|
||||
const lintResults = {};
|
||||
// eslint-disable-next-line jsdoc/require-jsdoc
|
||||
/**
|
||||
* Returns the string representation of a LintResults instance.
|
||||
*
|
||||
* @param {boolean} useAlias True if rule alias should be used instead of name.
|
||||
* @returns {string} String representation of the instance.
|
||||
*/
|
||||
function toString(useAlias) {
|
||||
// eslint-disable-next-line consistent-this, no-invalid-this, unicorn/no-this-assignment
|
||||
const lintResults = this;
|
||||
let ruleNameToRule = null;
|
||||
const results = [];
|
||||
const keys = Object.keys(lintResults);
|
||||
|
|
@ -161,6 +167,7 @@ function newResults(ruleList) {
|
|||
}
|
||||
return results.join("\n");
|
||||
}
|
||||
const lintResults = {};
|
||||
Object.defineProperty(lintResults, "toString", { "value": toString });
|
||||
// @ts-ignore
|
||||
return lintResults;
|
||||
|
|
@ -269,6 +276,15 @@ function getEffectiveConfig(ruleList, config, aliasToRuleNames) {
|
|||
return effectiveConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
* Result object for getEnabledRulesPerLineNumber.
|
||||
*
|
||||
* @typedef {Object} EnabledRulesPerLineNumberResult
|
||||
* @property {Configuration} effectiveConfig Effective configuration.
|
||||
* @property {any[]} enabledRulesPerLineNumber Enabled rules per line number.
|
||||
* @property {Rule[]} enabledRuleList Enabled rule list.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Create a mapping of enabled rules per line.
|
||||
*
|
||||
|
|
@ -280,7 +296,7 @@ function getEffectiveConfig(ruleList, config, aliasToRuleNames) {
|
|||
* @param {ConfigurationParser[] | undefined} configParsers Configuration parsers.
|
||||
* @param {Object.<string, string[]>} aliasToRuleNames Map of alias to rule
|
||||
* names.
|
||||
* @returns {Object} Effective configuration and enabled rules per line number.
|
||||
* @returns {EnabledRulesPerLineNumberResult} Effective configuration and enabled rules per line number.
|
||||
*/
|
||||
function getEnabledRulesPerLineNumber(
|
||||
ruleList,
|
||||
|
|
@ -461,12 +477,14 @@ function lintContent(
|
|||
const needMarkdownItTokens = enabledRuleList.some(
|
||||
(rule) => (rule.parser === "markdownit") || (rule.parser === undefined)
|
||||
);
|
||||
const needMicromarkTokens = enabledRuleList.some(
|
||||
(rule) => (rule.parser === "micromark")
|
||||
);
|
||||
const customRulesPresent = (ruleList.length !== rules.length);
|
||||
// Parse content into parser tokens
|
||||
const micromarkTokens = micromarkParse(
|
||||
content,
|
||||
{ "freezeTokens": customRulesPresent }
|
||||
);
|
||||
const micromarkTokens = needMicromarkTokens ?
|
||||
micromarkParse(content, { "freezeTokens": customRulesPresent }) :
|
||||
[];
|
||||
// Hide the content of HTML comments from rules
|
||||
const preClearedContent = content;
|
||||
content = helpers.clearHtmlCommentText(content);
|
||||
|
|
@ -504,7 +522,8 @@ function lintContent(
|
|||
"config": null
|
||||
});
|
||||
// Function to run for each rule
|
||||
let results = [];
|
||||
/** @type {LintError[]} */
|
||||
const results = [];
|
||||
/**
|
||||
* @param {Rule} rule Rule.
|
||||
* @returns {Promise<void> | null} Promise.
|
||||
|
|
@ -612,12 +631,11 @@ function lintContent(
|
|||
const information = errorInfo.information || rule.information;
|
||||
results.push({
|
||||
lineNumber,
|
||||
"ruleName": rule.names[0],
|
||||
"ruleNames": rule.names,
|
||||
"ruleDescription": rule.description,
|
||||
"ruleInformation": information ? information.href : null,
|
||||
"errorDetail": errorInfo.detail || null,
|
||||
"errorContext": errorInfo.context || null,
|
||||
"errorDetail": errorInfo.detail?.replace(helpers.newLineRe, " ") || null,
|
||||
"errorContext": errorInfo.context?.replace(helpers.newLineRe, " ") || null,
|
||||
"errorRange": errorInfo.range ? [ ...errorInfo.range ] : null,
|
||||
"fixInfo": fixInfo ? cleanFixInfo : null
|
||||
});
|
||||
|
|
@ -639,7 +657,7 @@ function lintContent(
|
|||
// Synchronous rule
|
||||
try {
|
||||
invokeRuleFunction();
|
||||
} catch (error) {
|
||||
} catch(error) {
|
||||
if (handleRuleFailures) {
|
||||
catchCallsOnError(error);
|
||||
} else {
|
||||
|
|
@ -651,46 +669,9 @@ function lintContent(
|
|||
const formatResults = () => {
|
||||
// Sort results by rule name by line number
|
||||
results.sort((a, b) => (
|
||||
a.ruleName.localeCompare(b.ruleName) ||
|
||||
a.ruleNames[0].localeCompare(b.ruleNames[0]) ||
|
||||
a.lineNumber - b.lineNumber
|
||||
));
|
||||
if (resultVersion < 3) {
|
||||
// Remove fixInfo and multiple errors for the same rule and line number
|
||||
const noPrevious = {
|
||||
"ruleName": null,
|
||||
"lineNumber": -1
|
||||
};
|
||||
results = results.filter((error, index, array) => {
|
||||
delete error.fixInfo;
|
||||
const previous = array[index - 1] || noPrevious;
|
||||
return (
|
||||
(error.ruleName !== previous.ruleName) ||
|
||||
(error.lineNumber !== previous.lineNumber)
|
||||
);
|
||||
});
|
||||
}
|
||||
if (resultVersion === 0) {
|
||||
// Return a dictionary of rule->[line numbers]
|
||||
const dictionary = {};
|
||||
for (const error of results) {
|
||||
const ruleLines = dictionary[error.ruleName] || [];
|
||||
ruleLines.push(error.lineNumber);
|
||||
dictionary[error.ruleName] = ruleLines;
|
||||
}
|
||||
// @ts-ignore
|
||||
results = dictionary;
|
||||
} else if (resultVersion === 1) {
|
||||
// Use ruleAlias instead of ruleNames
|
||||
for (const error of results) {
|
||||
error.ruleAlias = error.ruleNames[1] || error.ruleName;
|
||||
delete error.ruleNames;
|
||||
}
|
||||
} else {
|
||||
// resultVersion 2 or 3: Remove unwanted ruleName
|
||||
for (const error of results) {
|
||||
delete error.ruleName;
|
||||
}
|
||||
}
|
||||
return results;
|
||||
};
|
||||
// Run all rules
|
||||
|
|
@ -710,7 +691,7 @@ function lintContent(
|
|||
} else {
|
||||
callbackSuccess();
|
||||
}
|
||||
} catch (error) {
|
||||
} catch(error) {
|
||||
callbackError(error);
|
||||
} finally {
|
||||
cacheInitialize();
|
||||
|
|
@ -843,9 +824,9 @@ function lintInput(options, synchronous, callback) {
|
|||
options.frontMatter;
|
||||
const handleRuleFailures = !!options.handleRuleFailures;
|
||||
const noInlineConfig = !!options.noInlineConfig;
|
||||
const resultVersion = (options.resultVersion === undefined) ?
|
||||
3 :
|
||||
options.resultVersion;
|
||||
// eslint-disable-next-line dot-notation
|
||||
// Bracket notation is intentionally used here to access 'resultVersion' in case it is a deprecated or reserved property, and to avoid potential issues with dot notation.
|
||||
const resultVersion = (options["resultVersion"] === undefined) ? 3 : options["resultVersion"];
|
||||
const markdownItFactory =
|
||||
options.markdownItFactory ||
|
||||
(() => { throw new Error("The option 'markdownItFactory' was required (due to the option 'customRules' including a rule requiring the 'markdown-it' parser), but 'markdownItFactory' was not set."); });
|
||||
|
|
@ -912,7 +893,16 @@ function lintInput(options, synchronous, callback) {
|
|||
} else if (concurrency === 0) {
|
||||
// Finish
|
||||
done = true;
|
||||
return callback(null, results);
|
||||
// Deprecated: Convert results to specified resultVersion
|
||||
let convertedResults = results;
|
||||
if (resultVersion === 0) {
|
||||
convertedResults = helpers.convertToResultVersion0(results);
|
||||
} else if (resultVersion === 1) {
|
||||
convertedResults = helpers.convertToResultVersion1(results);
|
||||
} else if (resultVersion === 2) {
|
||||
convertedResults = helpers.convertToResultVersion2(results);
|
||||
}
|
||||
return callback(null, convertedResults);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
@ -1206,9 +1196,9 @@ export function readConfigSync(file, parsers, fs) {
|
|||
/**
|
||||
* Normalizes the fields of a RuleOnErrorFixInfo instance.
|
||||
*
|
||||
* @param {RuleOnErrorFixInfo} fixInfo RuleOnErrorFixInfo instance.
|
||||
* @param {FixInfo} fixInfo RuleOnErrorFixInfo instance.
|
||||
* @param {number} [lineNumber] Line number.
|
||||
* @returns {RuleOnErrorFixInfoNormalized} Normalized RuleOnErrorFixInfo instance.
|
||||
* @returns {FixInfoNormalized} Normalized RuleOnErrorFixInfo instance.
|
||||
*/
|
||||
function normalizeFixInfo(fixInfo, lineNumber = 0) {
|
||||
return {
|
||||
|
|
@ -1223,7 +1213,7 @@ function normalizeFixInfo(fixInfo, lineNumber = 0) {
|
|||
* Applies the specified fix to a Markdown content line.
|
||||
*
|
||||
* @param {string} line Line of Markdown content.
|
||||
* @param {RuleOnErrorFixInfo} fixInfo RuleOnErrorFixInfo instance.
|
||||
* @param {FixInfo} fixInfo FixInfo instance.
|
||||
* @param {string} [lineEnding] Line ending to use.
|
||||
* @returns {string | null} Fixed content or null if deleted.
|
||||
*/
|
||||
|
|
@ -1239,7 +1229,7 @@ export function applyFix(line, fixInfo, lineEnding = "\n") {
|
|||
* Applies as many of the specified fixes as possible to Markdown content.
|
||||
*
|
||||
* @param {string} input Lines of Markdown content.
|
||||
* @param {RuleOnErrorInfo[]} errors RuleOnErrorInfo instances.
|
||||
* @param {LintError[]} errors LintError instances.
|
||||
* @returns {string} Fixed content.
|
||||
*/
|
||||
export function applyFixes(input, errors) {
|
||||
|
|
@ -1335,8 +1325,6 @@ export function getVersion() {
|
|||
* @returns {void}
|
||||
*/
|
||||
|
||||
/* eslint-disable jsdoc/valid-types */
|
||||
|
||||
/**
|
||||
* Rule parameters.
|
||||
*
|
||||
|
|
@ -1349,8 +1337,6 @@ export function getVersion() {
|
|||
* @property {string} version Version of the markdownlint library.
|
||||
*/
|
||||
|
||||
/* eslint-enable jsdoc/valid-types */
|
||||
|
||||
/**
|
||||
* Markdown parser data.
|
||||
*
|
||||
|
|
@ -1440,16 +1426,6 @@ export function getVersion() {
|
|||
* @property {string} [insertText] Text to insert (after deleting).
|
||||
*/
|
||||
|
||||
/**
|
||||
* RuleOnErrorInfo with all optional properties present.
|
||||
*
|
||||
* @typedef {Object} RuleOnErrorFixInfoNormalized
|
||||
* @property {number} lineNumber Line number (1-based).
|
||||
* @property {number} editColumn Column of the fix (1-based).
|
||||
* @property {number} deleteCount Count of characters to delete.
|
||||
* @property {string} insertText Text to insert (after deleting).
|
||||
*/
|
||||
|
||||
/**
|
||||
* Rule definition.
|
||||
*
|
||||
|
|
@ -1499,7 +1475,6 @@ export function getVersion() {
|
|||
* @property {boolean} [handleRuleFailures] True to catch exceptions.
|
||||
* @property {MarkdownItFactory} [markdownItFactory] Function to create a markdown-it parser.
|
||||
* @property {boolean} [noInlineConfig] True to ignore HTML directives.
|
||||
* @property {number} [resultVersion] Results object version.
|
||||
* @property {Object.<string, string>} [strings] Strings to lint.
|
||||
*/
|
||||
|
||||
|
|
@ -1510,18 +1485,9 @@ export function getVersion() {
|
|||
*/
|
||||
|
||||
/**
|
||||
* Function to pretty-print lint results.
|
||||
*
|
||||
* @callback ToStringCallback
|
||||
* @param {boolean} [ruleAliases] True to use rule aliases.
|
||||
* @returns {string} Pretty-printed results.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Lint results (for resultVersion 3).
|
||||
* Lint results.
|
||||
*
|
||||
* @typedef {Object.<string, LintError[]>} LintResults
|
||||
* @property {ToStringCallback} toString String representation.
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
@ -1534,8 +1500,8 @@ export function getVersion() {
|
|||
* @property {string} ruleInformation Link to more information.
|
||||
* @property {string} errorDetail Detail about the error.
|
||||
* @property {string} errorContext Context for the error.
|
||||
* @property {number[]} errorRange Column number (1-based) and length.
|
||||
* @property {FixInfo} [fixInfo] Fix information.
|
||||
* @property {number[]|null} errorRange Column number (1-based) and length.
|
||||
* @property {FixInfo|null} fixInfo Fix information.
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
@ -1548,6 +1514,16 @@ export function getVersion() {
|
|||
* @property {string} [insertText] Text to insert (after deleting).
|
||||
*/
|
||||
|
||||
/**
|
||||
* FixInfo with all optional properties present.
|
||||
*
|
||||
* @typedef {Object} FixInfoNormalized
|
||||
* @property {number} lineNumber Line number (1-based).
|
||||
* @property {number} editColumn Column of the fix (1-based).
|
||||
* @property {number} deleteCount Count of characters to delete.
|
||||
* @property {string} insertText Text to insert (after deleting).
|
||||
*/
|
||||
|
||||
/**
|
||||
* Called with the result of linting a string or document.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// @ts-check
|
||||
|
||||
import { addErrorDetailIf } from "../helpers/helpers.cjs";
|
||||
import { addErrorDetailIf, frontMatterHasTitle } from "../helpers/helpers.cjs";
|
||||
import { getHeadingLevel } from "../helpers/micromark-helpers.cjs";
|
||||
import { filterByTypesCached } from "./cache.mjs";
|
||||
|
||||
|
|
@ -11,7 +11,11 @@ export default {
|
|||
"tags": [ "headings" ],
|
||||
"parser": "micromark",
|
||||
"function": function MD001(params, onError) {
|
||||
let prevLevel = Number.MAX_SAFE_INTEGER;
|
||||
const hasTitle = frontMatterHasTitle(
|
||||
params.frontMatterLines,
|
||||
params.config.front_matter_title
|
||||
);
|
||||
let prevLevel = hasTitle ? 1 : Number.MAX_SAFE_INTEGER;
|
||||
for (const heading of filterByTypesCached([ "atxHeading", "setextHeading" ])) {
|
||||
const level = getHeadingLevel(heading);
|
||||
if (level > prevLevel) {
|
||||
|
|
|
|||
|
|
@ -53,8 +53,9 @@ export default {
|
|||
const nesting = unorderedListNesting.get(parent);
|
||||
if (nesting !== undefined) {
|
||||
// listItemPrefix for listUnordered
|
||||
const baseIndent = (getParentOfType(token, [ "gfmFootnoteDefinition" ])) ? 4 : 0;
|
||||
const expectedIndent =
|
||||
(startIndented ? startIndent : 0) + (nesting * indent);
|
||||
baseIndent + (startIndented ? startIndent : 0) + (nesting * indent);
|
||||
const blockQuoteAdjustment =
|
||||
(lastBlockQuotePrefix?.endLine === startLine) ?
|
||||
(lastBlockQuotePrefix.endColumn - 1) :
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// @ts-check
|
||||
|
||||
import { addErrorContext, frontMatterHasTitle } from "../helpers/helpers.cjs";
|
||||
import { getHeadingLevel, getHeadingText, isHtmlFlowComment, nonContentTokens } from "../helpers/micromark-helpers.cjs";
|
||||
import { getHeadingLevel, getHeadingText, isDocfxTab, isHtmlFlowComment, nonContentTokens } from "../helpers/micromark-helpers.cjs";
|
||||
import { filterByTypesCached } from "./cache.mjs";
|
||||
|
||||
/** @type {import("markdownlint").Rule} */
|
||||
|
|
@ -14,7 +14,7 @@ export default {
|
|||
const level = Number(params.config.level || 1);
|
||||
const { tokens } = params.parsers.micromark;
|
||||
const matchingHeadings = filterByTypesCached([ "atxHeading", "setextHeading" ])
|
||||
.filter((heading) => level === getHeadingLevel(heading));
|
||||
.filter((heading) => (level === getHeadingLevel(heading)) && !isDocfxTab(heading));
|
||||
if (matchingHeadings.length > 0) {
|
||||
const foundFrontMatterTitle =
|
||||
frontMatterHasTitle(
|
||||
|
|
|
|||
|
|
@ -11,13 +11,17 @@ const listStyleExamples = {
|
|||
};
|
||||
|
||||
/**
|
||||
* Gets the value of an ordered list item prefix token.
|
||||
* Gets the column and text of an ordered list item prefix token.
|
||||
*
|
||||
* @param {import("markdownlint").MicromarkToken} listItemPrefix List item prefix token.
|
||||
* @returns {number} List item value.
|
||||
* @returns {{column: number, value: number}} List item value column and text.
|
||||
*/
|
||||
function getOrderedListItemValue(listItemPrefix) {
|
||||
return Number(getDescendantsByType(listItemPrefix, [ "listItemValue" ])[0].text);
|
||||
const listItemValue = getDescendantsByType(listItemPrefix, [ "listItemValue" ])[0];
|
||||
return {
|
||||
"column": listItemValue.startColumn,
|
||||
"value": Number(listItemValue.text)
|
||||
};
|
||||
}
|
||||
|
||||
/** @type {import("markdownlint").Rule} */
|
||||
|
|
@ -34,11 +38,11 @@ export default {
|
|||
let incrementing = false;
|
||||
// Check for incrementing number pattern 1/2/3 or 0/1/2
|
||||
if (listItemPrefixes.length >= 2) {
|
||||
const firstValue = getOrderedListItemValue(listItemPrefixes[0]);
|
||||
const secondValue = getOrderedListItemValue(listItemPrefixes[1]);
|
||||
if ((secondValue !== 1) || (firstValue === 0)) {
|
||||
const first = getOrderedListItemValue(listItemPrefixes[0]);
|
||||
const second = getOrderedListItemValue(listItemPrefixes[1]);
|
||||
if ((second.value !== 1) || (first.value === 0)) {
|
||||
incrementing = true;
|
||||
if (firstValue === 0) {
|
||||
if (first.value === 0) {
|
||||
expected = 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -54,7 +58,13 @@ export default {
|
|||
}
|
||||
// Validate each list item marker
|
||||
for (const listItemPrefix of listItemPrefixes) {
|
||||
const actual = getOrderedListItemValue(listItemPrefix);
|
||||
const orderedListItemValue = getOrderedListItemValue(listItemPrefix);
|
||||
const actual = orderedListItemValue.value;
|
||||
const fixInfo = {
|
||||
"editColumn": orderedListItemValue.column,
|
||||
"deleteCount": orderedListItemValue.value.toString().length,
|
||||
"insertText": expected.toString()
|
||||
};
|
||||
addErrorDetailIf(
|
||||
onError,
|
||||
listItemPrefix.startLine,
|
||||
|
|
@ -62,7 +72,8 @@ export default {
|
|||
actual,
|
||||
"Style: " + listStyleExamples[listStyle],
|
||||
undefined,
|
||||
[ listItemPrefix.startColumn, listItemPrefix.endColumn - listItemPrefix.startColumn ]
|
||||
[ listItemPrefix.startColumn, listItemPrefix.endColumn - listItemPrefix.startColumn ],
|
||||
fixInfo
|
||||
);
|
||||
if (listStyle === "ordered") {
|
||||
expected++;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import { filterByTypesCached } from "./cache.mjs";
|
|||
|
||||
const codeFencePrefixRe = /^(.*?)[`~]/;
|
||||
|
||||
// eslint-disable-next-line jsdoc/valid-types
|
||||
/** @typedef {readonly string[]} ReadonlyStringArray */
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// @ts-check
|
||||
|
||||
import { addError, nextLinesRe } from "../helpers/helpers.cjs";
|
||||
import { getHtmlTagInfo } from "../helpers/micromark-helpers.cjs";
|
||||
import { getHtmlTagInfo, getParentOfType } from "../helpers/micromark-helpers.cjs";
|
||||
import { filterByTypesCached } from "./cache.mjs";
|
||||
|
||||
/** @type {import("markdownlint").Rule} */
|
||||
|
|
@ -14,12 +14,19 @@ export default {
|
|||
let allowedElements = params.config.allowed_elements;
|
||||
allowedElements = Array.isArray(allowedElements) ? allowedElements : [];
|
||||
allowedElements = allowedElements.map((element) => element.toLowerCase());
|
||||
let tableAllowedElements = params.config.table_allowed_elements ?? allowedElements;
|
||||
tableAllowedElements = Array.isArray(tableAllowedElements) ? tableAllowedElements : [];
|
||||
tableAllowedElements = tableAllowedElements.map((element) => element.toLowerCase());
|
||||
for (const token of filterByTypesCached([ "htmlText" ], true)) {
|
||||
const htmlTagInfo = getHtmlTagInfo(token);
|
||||
const elementName = htmlTagInfo?.name.toLowerCase();
|
||||
const inTable = !!getParentOfType(token, [ "table" ]);
|
||||
if (
|
||||
htmlTagInfo &&
|
||||
!htmlTagInfo.close &&
|
||||
!allowedElements.includes(htmlTagInfo.name.toLowerCase())
|
||||
!htmlTagInfo.close && !(
|
||||
(!inTable && allowedElements.includes(elementName)) ||
|
||||
(inTable && tableAllowedElements.includes(elementName))
|
||||
)
|
||||
) {
|
||||
const range = [
|
||||
token.startColumn,
|
||||
|
|
|
|||
|
|
@ -11,6 +11,11 @@ const emphasisTypes = [
|
|||
[ "strong", "strongText" ]
|
||||
];
|
||||
|
||||
const isParagraphChildMeaningful = (token) => !(
|
||||
(token.type === "htmlText") ||
|
||||
((token.type === "data") && (token.text.trim().length === 0))
|
||||
);
|
||||
|
||||
/** @type {import("markdownlint").Rule} */
|
||||
export default {
|
||||
"names": [ "MD036", "no-emphasis-as-heading" ],
|
||||
|
|
@ -22,9 +27,14 @@ export default {
|
|||
punctuation = String((punctuation === undefined) ? allPunctuation : punctuation);
|
||||
const punctuationRe = new RegExp("[" + punctuation + "]$");
|
||||
const paragraphTokens =
|
||||
filterByTypesCached([ "paragraph" ])
|
||||
filterByTypesCached([ "paragraph" ], true)
|
||||
.filter((token) =>
|
||||
(token.parent?.type === "content") && !token.parent?.parent && (token.children.length === 1)
|
||||
(token.parent?.type === "content") &&
|
||||
(
|
||||
!token.parent?.parent ||
|
||||
((token.parent?.parent?.type === "htmlFlow") && !token.parent?.parent?.parent)
|
||||
) &&
|
||||
(token.children.filter(isParagraphChildMeaningful).length === 1)
|
||||
);
|
||||
for (const emphasisType of emphasisTypes) {
|
||||
const textTokens = getDescendantsByType(paragraphTokens, emphasisType);
|
||||
|
|
|
|||
|
|
@ -50,15 +50,17 @@ export default {
|
|||
if (startMatch) {
|
||||
const [ startSpaceCharacter ] = startMatch;
|
||||
const startContext = `${marker}${startSpaceCharacter}`;
|
||||
const column = startToken.endColumn;
|
||||
const count = startSpaceCharacter.length - 1;
|
||||
addError(
|
||||
onError,
|
||||
startToken.startLine,
|
||||
undefined,
|
||||
startContext,
|
||||
[ startToken.startColumn, startContext.length ],
|
||||
[ column, count ],
|
||||
{
|
||||
"editColumn": startToken.endColumn,
|
||||
"deleteCount": startSpaceCharacter.length - 1
|
||||
"editColumn": column,
|
||||
"deleteCount": count
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
@ -71,16 +73,17 @@ export default {
|
|||
if (endMatch) {
|
||||
const [ endSpaceCharacter ] = endMatch;
|
||||
const endContext = `${endSpaceCharacter}${marker}`;
|
||||
const column = endToken.startColumn - (endSpaceCharacter.length - 1);
|
||||
const count = endSpaceCharacter.length - 1;
|
||||
addError(
|
||||
onError,
|
||||
endToken.startLine,
|
||||
undefined,
|
||||
endContext,
|
||||
[ endToken.endColumn - endContext.length, endContext.length ],
|
||||
[ column, count ],
|
||||
{
|
||||
"editColumn":
|
||||
endToken.startColumn - (endSpaceCharacter.length - 1),
|
||||
"deleteCount": endSpaceCharacter.length - 1
|
||||
"editColumn": column,
|
||||
"deleteCount": count
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import { getHtmlTagInfo, getDescendantsByType } from "../helpers/micromark-helpe
|
|||
import { filterByTypesCached } from "./cache.mjs";
|
||||
|
||||
const altRe = getHtmlAttributeRe("alt");
|
||||
const ariaHiddenRe = getHtmlAttributeRe("aria-hidden");
|
||||
|
||||
/** @type {import("markdownlint").Rule} */
|
||||
export default {
|
||||
|
|
@ -40,7 +41,8 @@ export default {
|
|||
htmlTagInfo &&
|
||||
!htmlTagInfo.close &&
|
||||
(htmlTagInfo.name.toLowerCase() === "img") &&
|
||||
!altRe.test(text)
|
||||
!altRe.test(text) &&
|
||||
(ariaHiddenRe.exec(text)?.[1].toLowerCase() !== "true")
|
||||
) {
|
||||
const range = [
|
||||
startColumn,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// @ts-check
|
||||
|
||||
import { addError, getHtmlAttributeRe } from "../helpers/helpers.cjs";
|
||||
import { filterByPredicate, filterByTypes, getHtmlTagInfo } from "../helpers/micromark-helpers.cjs";
|
||||
import { filterByPredicate, filterByTypes, getHtmlTagInfo, isDocfxTab } from "../helpers/micromark-helpers.cjs";
|
||||
import { filterByTypesCached } from "./cache.mjs";
|
||||
|
||||
// Regular expression for identifying HTML anchor names
|
||||
|
|
@ -66,6 +66,8 @@ export default {
|
|||
"parser": "micromark",
|
||||
"function": function MD051(params, onError) {
|
||||
const ignoreCase = params.config.ignore_case || false;
|
||||
const ignoredPattern = params.config.ignored_pattern || "";
|
||||
const ignoredPatternRe = new RegExp(ignoredPattern || "^$");
|
||||
/** @type {Map<string, number>} */
|
||||
const fragments = new Map([ [ "#top", 0 ] ]);
|
||||
|
||||
|
|
@ -108,18 +110,23 @@ export default {
|
|||
[ "definition", "definitionDestinationString" ]
|
||||
];
|
||||
for (const [ parentType, definitionType ] of parentChilds) {
|
||||
const links = filterByTypesCached([ parentType ]);
|
||||
const links = filterByTypesCached([ parentType ])
|
||||
.filter(
|
||||
(link) => !((link.parent?.type === "atxHeadingText") && isDocfxTab(link.parent.parent))
|
||||
);
|
||||
for (const link of links) {
|
||||
const definitions = filterByTypes(link.children, [ definitionType ]);
|
||||
for (const definition of definitions) {
|
||||
const { endColumn, startColumn } = definition;
|
||||
const text = unescapeStringTokenText(definition);
|
||||
const encodedText = `#${encodeURIComponent(text.slice(1))}`;
|
||||
const textSliceOne = text.slice(1);
|
||||
const encodedText = `#${encodeURIComponent(textSliceOne)}`;
|
||||
if (
|
||||
(text.length > 1) &&
|
||||
text.startsWith("#") &&
|
||||
!fragments.has(encodedText) &&
|
||||
!lineFragmentRe.test(encodedText)
|
||||
!lineFragmentRe.test(encodedText) &&
|
||||
!ignoredPatternRe.test(textSliceOne)
|
||||
) {
|
||||
let context = undefined;
|
||||
let range = undefined;
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ export default {
|
|||
"function": function MD052(params, onError) {
|
||||
const { config, lines } = params;
|
||||
const shortcutSyntax = config.shortcut_syntax || false;
|
||||
const ignoredLabels = new Set(config.ignored_labels || [ "x" ]);
|
||||
const { definitions, references, shortcuts } = getReferenceLinkImageData();
|
||||
const entries = shortcutSyntax ?
|
||||
[ ...references.entries(), ...shortcuts.entries() ] :
|
||||
|
|
@ -20,7 +21,7 @@ export default {
|
|||
// Look for links/images that use an undefined link reference
|
||||
for (const reference of entries) {
|
||||
const [ label, datas ] = reference;
|
||||
if (!definitions.has(label)) {
|
||||
if (!definitions.has(label) && !ignoredLabels.has(label)) {
|
||||
for (const data of datas) {
|
||||
const [ lineIndex, index, length ] = data;
|
||||
// Context will be incomplete if reporting for a multi-line link
|
||||
|
|
|
|||
118
lib/md060.mjs
Normal file
118
lib/md060.mjs
Normal file
|
|
@ -0,0 +1,118 @@
|
|||
// @ts-check
|
||||
|
||||
import { filterByTypes } from "../helpers/micromark-helpers.cjs";
|
||||
import { filterByTypesCached } from "./cache.mjs";
|
||||
|
||||
/** @typedef {import("micromark-extension-gfm-table")} */
|
||||
/** @typedef {import("markdownlint").RuleOnErrorInfo} RuleOnErrorInfo */
|
||||
|
||||
/**
|
||||
* Adds a RuleOnErrorInfo object to a list of RuleOnErrorInfo objects.
|
||||
*
|
||||
* @param {RuleOnErrorInfo[]} errors List of errors.
|
||||
* @param {number} lineNumber Line number.
|
||||
* @param {number} column Column number.
|
||||
* @param {string} detail Detail message.
|
||||
*/
|
||||
function addError(errors, lineNumber, column, detail) {
|
||||
errors.push({
|
||||
lineNumber,
|
||||
detail,
|
||||
"range": [ column, 1 ]
|
||||
});
|
||||
}
|
||||
|
||||
/** @type {import("markdownlint").Rule} */
|
||||
export default {
|
||||
"names": [ "MD060", "table-column-style" ],
|
||||
"description": "Table column style",
|
||||
"tags": [ "table" ],
|
||||
"parser": "micromark",
|
||||
"function": function MD060(params, onError) {
|
||||
const style = String(params.config.style || "any");
|
||||
const styleAlignedAllowed = (style === "any") || (style === "aligned");
|
||||
const styleCompactAllowed = (style === "any") || (style === "compact");
|
||||
const styleTightAllowed = (style === "any") || (style === "tight");
|
||||
|
||||
// Scan all tables/rows
|
||||
const tables = filterByTypesCached([ "table" ]);
|
||||
for (const table of tables) {
|
||||
const rows = filterByTypes(table.children, [ "tableDelimiterRow", "tableRow" ]);
|
||||
const headingRow = rows[0];
|
||||
|
||||
// Determine errors for style "aligned"
|
||||
const errorsIfAligned = [];
|
||||
if (styleAlignedAllowed) {
|
||||
const headingDividerColumns = filterByTypes(headingRow.children, [ "tableCellDivider" ]).map((divider) => divider.startColumn);
|
||||
for (const row of rows.slice(1)) {
|
||||
const remainingHeadingDividerColumns = new Set(headingDividerColumns);
|
||||
const rowDividerColumns = filterByTypes(row.children, [ "tableCellDivider" ]).map((divider) => divider.startColumn);
|
||||
for (const dividerColumn of rowDividerColumns) {
|
||||
if ((remainingHeadingDividerColumns.size > 0) && !remainingHeadingDividerColumns.delete(dividerColumn)) {
|
||||
addError(errorsIfAligned, row.startLine, dividerColumn, "Table pipe does not align with heading for style \"aligned\"");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Determine errors for styles "compact" and "tight"
|
||||
const errorsIfCompact = [];
|
||||
const errorsIfTight = [];
|
||||
if (
|
||||
(styleCompactAllowed || styleTightAllowed) &&
|
||||
!(styleAlignedAllowed && (errorsIfAligned.length === 0))
|
||||
) {
|
||||
for (const row of rows) {
|
||||
const tokensOfInterest = filterByTypes(row.children, [ "tableCellDivider", "tableContent", "whitespace" ]);
|
||||
for (let i = 0; i < tokensOfInterest.length; i++) {
|
||||
const { startColumn, startLine, type } = tokensOfInterest[i];
|
||||
if (type === "tableCellDivider") {
|
||||
const previous = tokensOfInterest[i - 1];
|
||||
if (previous) {
|
||||
if (previous.type === "whitespace") {
|
||||
if (previous.text.length !== 1) {
|
||||
addError(errorsIfCompact, startLine, startColumn, "Table pipe has extra space to the left for style \"compact\"");
|
||||
}
|
||||
addError(errorsIfTight, startLine, startColumn, "Table pipe has space to the left for style \"tight\"");
|
||||
} else {
|
||||
addError(errorsIfCompact, startLine, startColumn, "Table pipe is missing space to the left for style \"compact\"");
|
||||
}
|
||||
}
|
||||
const next = tokensOfInterest[i + 1];
|
||||
if (next) {
|
||||
if (next.type === "whitespace") {
|
||||
if (next.endColumn !== row.endColumn) {
|
||||
if (next.text.length !== 1) {
|
||||
addError(errorsIfCompact, startLine, startColumn, "Table pipe has extra space to the right for style \"compact\"");
|
||||
}
|
||||
addError(errorsIfTight, startLine, startColumn, "Table pipe has space to the right for style \"tight\"");
|
||||
}
|
||||
} else {
|
||||
addError(errorsIfCompact, startLine, startColumn, "Table pipe is missing space to the right for style \"compact\"");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Report errors for whatever (allowed) style has the fewest
|
||||
let errorInfos = errorsIfAligned;
|
||||
if (
|
||||
styleCompactAllowed &&
|
||||
((errorsIfCompact.length < errorInfos.length) || !styleAlignedAllowed)
|
||||
) {
|
||||
errorInfos = errorsIfCompact;
|
||||
}
|
||||
if (
|
||||
styleTightAllowed &&
|
||||
((errorsIfTight.length < errorInfos.length) || (!styleAlignedAllowed && !styleCompactAllowed))
|
||||
) {
|
||||
errorInfos = errorsIfTight;
|
||||
}
|
||||
for (const errorInfo of errorInfos) {
|
||||
onError(errorInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
@ -28,7 +28,7 @@ export default function parseConfiguration(name, content, parsers) {
|
|||
config = (result && (typeof result === "object") && !Array.isArray(result)) ? result : {};
|
||||
// Succeeded
|
||||
return false;
|
||||
} catch (error) {
|
||||
} catch(error) {
|
||||
errors.push(`Parser ${index++}: ${error.message}`);
|
||||
}
|
||||
// Failed, try the next parser
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ import md055 from "./md055.mjs";
|
|||
import md056 from "./md056.mjs";
|
||||
import md058 from "./md058.mjs";
|
||||
import md059 from "./md059.mjs";
|
||||
import md060 from "./md060.mjs";
|
||||
|
||||
const rules = [
|
||||
md001,
|
||||
|
|
@ -110,7 +111,8 @@ const rules = [
|
|||
md056,
|
||||
// md057: See https://github.com/markdownlint/markdownlint
|
||||
md058,
|
||||
md059
|
||||
md059,
|
||||
md060
|
||||
];
|
||||
for (const rule of rules) {
|
||||
const name = rule.names[0].toLowerCase();
|
||||
|
|
|
|||
32
package.json
32
package.json
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "markdownlint",
|
||||
"version": "0.37.4",
|
||||
"version": "0.38.0",
|
||||
"description": "A Node.js style checker and lint tool for Markdown/CommonMark files.",
|
||||
"type": "module",
|
||||
"exports": {
|
||||
|
|
@ -39,11 +39,10 @@
|
|||
"build-declaration": "tsc --allowJs --checkJs --declaration --emitDeclarationOnly --module nodenext --outDir dts --rootDir . --target es2015 lib/exports.mjs lib/exports-async.mjs lib/exports-promise.mjs lib/exports-sync.mjs lib/markdownlint.mjs lib/resolve-module.cjs && node scripts/index.mjs copy dts/lib/exports.d.mts lib/exports.d.mts && node scripts/index.mjs copy dts/lib/exports-async.d.mts lib/exports-async.d.mts && node scripts/index.mjs copy dts/lib/exports-promise.d.mts lib/exports-promise.d.mts && node scripts/index.mjs copy dts/lib/exports-sync.d.mts lib/exports-sync.d.mts && node scripts/index.mjs copy dts/lib/markdownlint.d.mts lib/markdownlint.d.mts && node scripts/index.mjs copy dts/lib/resolve-module.d.cts lib/resolve-module.d.cts && node scripts/index.mjs remove dts",
|
||||
"build-demo": "node scripts/index.mjs copy node_modules/markdown-it/dist/markdown-it.min.js demo/markdown-it.min.js && cd demo && webpack --no-stats",
|
||||
"build-docs": "node doc-build/build-rules.mjs",
|
||||
"build-example": "npm install --no-save --ignore-scripts grunt grunt-cli gulp through2",
|
||||
"ci": "npm-run-all --continue-on-error --parallel build-demo lint serial-config-docs serial-declaration test-cover && git diff --exit-code",
|
||||
"clone-test-repos-apache-airflow": "cd test-repos && git clone https://github.com/apache/airflow apache-airflow --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-electron-electron": "cd test-repos && git clone https://github.com/electron/electron electron-electron --depth 1 --no-tags --quiet && cd electron-electron && npm install --ignore-scripts @electron/lint-roller typescript@4",
|
||||
"clone-test-repos-electron-electron": "cd test-repos && git clone https://github.com/electron/electron electron-electron --depth 1 --no-tags --quiet && cd electron-electron && node ../../scripts/index.mjs delete package.json && npm install --no-save --ignore-scripts @electron/lint-roller",
|
||||
"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-mdn-content": "cd test-repos && git clone https://github.com/mdn/content mdn-content --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",
|
||||
|
|
@ -54,7 +53,7 @@
|
|||
"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-apache-airflow && npm run clone-test-repos-dotnet-docs && npm run clone-test-repos-electron-electron && npm run clone-test-repos-eslint-eslint && npm run clone-test-repos-mdn-content && 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-v8-v8-dev && npm run clone-test-repos-webhintio-hint && npm run clone-test-repos-webpack-webpack-js-org",
|
||||
"declaration": "npm run build-declaration && npm run test-declaration",
|
||||
"example": "cd example && node standalone.mjs && grunt markdownlint --force && gulp markdownlint",
|
||||
"example": "cd example && node standalone.mjs",
|
||||
"lint": "eslint --max-warnings 0",
|
||||
"lint-test-repos": "ava --timeout=10m test/markdownlint-test-repos-*.mjs",
|
||||
"serial-config-docs": "npm run build-config && npm run build-docs",
|
||||
|
|
@ -67,10 +66,11 @@
|
|||
"test-extra": "ava --timeout=10m test/markdownlint-test-extra-parse.mjs test/markdownlint-test-extra-type.mjs",
|
||||
"update-snapshots": "ava --update-snapshots test/markdownlint-test-custom-rules.mjs test/markdownlint-test-exports.mjs test/markdownlint-test-micromark.mjs test/markdownlint-test-scenarios-*.mjs",
|
||||
"update-snapshots-test-repos": "ava --timeout=10m --update-snapshots test/markdownlint-test-repos-*.mjs",
|
||||
"update-test-repos": "node scripts/index.mjs remove ./test-repos && npm run clone-test-repos && npm run update-snapshots-test-repos",
|
||||
"upgrade": "npx --yes npm-check-updates --upgrade"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
"node": ">=20"
|
||||
},
|
||||
"dependencies": {
|
||||
"micromark": "4.0.2",
|
||||
|
|
@ -83,17 +83,17 @@
|
|||
"micromark-util-types": "2.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "9.22.0",
|
||||
"@stylistic/eslint-plugin": "4.2.0",
|
||||
"@eslint/js": "9.35.0",
|
||||
"@stylistic/eslint-plugin": "5.3.1",
|
||||
"ajv": "8.17.1",
|
||||
"ava": "6.2.0",
|
||||
"ava": "6.4.1",
|
||||
"c8": "10.1.3",
|
||||
"character-entities": "2.0.2",
|
||||
"eslint": "9.22.0",
|
||||
"eslint-plugin-jsdoc": "50.6.8",
|
||||
"eslint-plugin-n": "17.16.2",
|
||||
"eslint-plugin-regexp": "2.7.0",
|
||||
"eslint-plugin-unicorn": "57.0.0",
|
||||
"eslint": "9.35.0",
|
||||
"eslint-plugin-jsdoc": "57.2.0",
|
||||
"eslint-plugin-n": "17.23.0",
|
||||
"eslint-plugin-regexp": "2.10.0",
|
||||
"eslint-plugin-unicorn": "61.0.2",
|
||||
"gemoji": "8.1.0",
|
||||
"globby": "14.1.0",
|
||||
"js-yaml": "4.1.0",
|
||||
|
|
@ -104,12 +104,12 @@
|
|||
"markdown-it-sub": "2.0.0",
|
||||
"markdown-it-sup": "2.0.0",
|
||||
"markdownlint-rule-extended-ascii": "0.2.1",
|
||||
"nano-spawn": "0.2.0",
|
||||
"nano-spawn": "1.0.3",
|
||||
"npm-run-all": "4.1.5",
|
||||
"terser-webpack-plugin": "5.3.14",
|
||||
"toml": "3.0.0",
|
||||
"typescript": "5.8.2",
|
||||
"webpack": "5.98.0",
|
||||
"typescript": "5.9.2",
|
||||
"webpack": "5.101.3",
|
||||
"webpack-cli": "6.0.1"
|
||||
},
|
||||
"keywords": [
|
||||
|
|
|
|||
|
|
@ -7,25 +7,28 @@
|
|||
// Path to configuration file to extend
|
||||
"extends": null,
|
||||
|
||||
// MD001/heading-increment : Heading levels should only increment by one level at a time : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md001.md
|
||||
"MD001": true,
|
||||
// MD001/heading-increment : Heading levels should only increment by one level at a time : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md001.md
|
||||
"MD001": {
|
||||
// RegExp for matching title in front matter
|
||||
"front_matter_title": "^\\s*title\\s*[:=]"
|
||||
},
|
||||
|
||||
// MD003/heading-style : Heading style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md003.md
|
||||
// MD003/heading-style : Heading style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md003.md
|
||||
"MD003": {
|
||||
// Heading style
|
||||
"style": "consistent"
|
||||
},
|
||||
|
||||
// MD004/ul-style : Unordered list style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md004.md
|
||||
// MD004/ul-style : Unordered list style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md004.md
|
||||
"MD004": {
|
||||
// List style
|
||||
"style": "consistent"
|
||||
},
|
||||
|
||||
// MD005/list-indent : Inconsistent indentation for list items at the same level : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md005.md
|
||||
// MD005/list-indent : Inconsistent indentation for list items at the same level : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md005.md
|
||||
"MD005": true,
|
||||
|
||||
// MD007/ul-indent : Unordered list indentation : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md007.md
|
||||
// MD007/ul-indent : Unordered list indentation : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md007.md
|
||||
"MD007": {
|
||||
// Spaces for indent
|
||||
"indent": 2,
|
||||
|
|
@ -35,7 +38,7 @@
|
|||
"start_indent": 2
|
||||
},
|
||||
|
||||
// MD009/no-trailing-spaces : Trailing spaces : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md009.md
|
||||
// MD009/no-trailing-spaces : Trailing spaces : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md009.md
|
||||
"MD009": {
|
||||
// Spaces for line break
|
||||
"br_spaces": 2,
|
||||
|
|
@ -45,7 +48,7 @@
|
|||
"strict": false
|
||||
},
|
||||
|
||||
// MD010/no-hard-tabs : Hard tabs : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md010.md
|
||||
// MD010/no-hard-tabs : Hard tabs : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md010.md
|
||||
"MD010": {
|
||||
// Include code blocks
|
||||
"code_blocks": true,
|
||||
|
|
@ -55,16 +58,16 @@
|
|||
"spaces_per_tab": 1
|
||||
},
|
||||
|
||||
// MD011/no-reversed-links : Reversed link syntax : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md011.md
|
||||
// MD011/no-reversed-links : Reversed link syntax : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md011.md
|
||||
"MD011": true,
|
||||
|
||||
// MD012/no-multiple-blanks : Multiple consecutive blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md012.md
|
||||
// MD012/no-multiple-blanks : Multiple consecutive blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md
|
||||
"MD012": {
|
||||
// Consecutive blank lines
|
||||
"maximum": 1
|
||||
},
|
||||
|
||||
// MD013/line-length : Line length : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md013.md
|
||||
// MD013/line-length : Line length : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md013.md
|
||||
"MD013": {
|
||||
// Number of characters
|
||||
"line_length": 80,
|
||||
|
|
@ -84,22 +87,22 @@
|
|||
"stern": false
|
||||
},
|
||||
|
||||
// MD014/commands-show-output : Dollar signs used before commands without showing output : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md014.md
|
||||
// MD014/commands-show-output : Dollar signs used before commands without showing output : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md014.md
|
||||
"MD014": true,
|
||||
|
||||
// MD018/no-missing-space-atx : No space after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md018.md
|
||||
// MD018/no-missing-space-atx : No space after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md018.md
|
||||
"MD018": true,
|
||||
|
||||
// MD019/no-multiple-space-atx : Multiple spaces after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md019.md
|
||||
// MD019/no-multiple-space-atx : Multiple spaces after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md019.md
|
||||
"MD019": true,
|
||||
|
||||
// MD020/no-missing-space-closed-atx : No space inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md020.md
|
||||
// MD020/no-missing-space-closed-atx : No space inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md020.md
|
||||
"MD020": true,
|
||||
|
||||
// MD021/no-multiple-space-closed-atx : Multiple spaces inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md021.md
|
||||
// MD021/no-multiple-space-closed-atx : Multiple spaces inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md021.md
|
||||
"MD021": true,
|
||||
|
||||
// MD022/blanks-around-headings : Headings should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md022.md
|
||||
// MD022/blanks-around-headings : Headings should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md022.md
|
||||
"MD022": {
|
||||
// Blank lines above heading
|
||||
"lines_above": 1,
|
||||
|
|
@ -107,16 +110,16 @@
|
|||
"lines_below": 1
|
||||
},
|
||||
|
||||
// MD023/heading-start-left : Headings must start at the beginning of the line : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md023.md
|
||||
// MD023/heading-start-left : Headings must start at the beginning of the line : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md023.md
|
||||
"MD023": true,
|
||||
|
||||
// MD024/no-duplicate-heading : Multiple headings with the same content : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md024.md
|
||||
// MD024/no-duplicate-heading : Multiple headings with the same content : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md024.md
|
||||
"MD024": {
|
||||
// Only check sibling headings
|
||||
"siblings_only": false
|
||||
},
|
||||
|
||||
// MD025/single-title/single-h1 : Multiple top-level headings in the same document : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md025.md
|
||||
// MD025/single-title/single-h1 : Multiple top-level headings in the same document : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md025.md
|
||||
"MD025": {
|
||||
// RegExp for matching title in front matter
|
||||
"front_matter_title": "^\\s*title\\s*[:=]",
|
||||
|
|
@ -124,28 +127,28 @@
|
|||
"level": 1
|
||||
},
|
||||
|
||||
// MD026/no-trailing-punctuation : Trailing punctuation in heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md026.md
|
||||
// MD026/no-trailing-punctuation : Trailing punctuation in heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md026.md
|
||||
"MD026": {
|
||||
// Punctuation characters
|
||||
"punctuation": ".,;:!。,;:!"
|
||||
},
|
||||
|
||||
// MD027/no-multiple-space-blockquote : Multiple spaces after blockquote symbol : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md027.md
|
||||
// MD027/no-multiple-space-blockquote : Multiple spaces after blockquote symbol : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md027.md
|
||||
"MD027": {
|
||||
// Include list items
|
||||
"list_items": true
|
||||
},
|
||||
|
||||
// MD028/no-blanks-blockquote : Blank line inside blockquote : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md028.md
|
||||
// MD028/no-blanks-blockquote : Blank line inside blockquote : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md028.md
|
||||
"MD028": true,
|
||||
|
||||
// MD029/ol-prefix : Ordered list item prefix : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md029.md
|
||||
// MD029/ol-prefix : Ordered list item prefix : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md029.md
|
||||
"MD029": {
|
||||
// List style
|
||||
"style": "one_or_ordered"
|
||||
},
|
||||
|
||||
// MD030/list-marker-space : Spaces after list markers : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md030.md
|
||||
// MD030/list-marker-space : Spaces after list markers : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md030.md
|
||||
"MD030": {
|
||||
// Spaces for single-line unordered list items
|
||||
"ul_single": 1,
|
||||
|
|
@ -157,46 +160,48 @@
|
|||
"ol_multi": 1
|
||||
},
|
||||
|
||||
// MD031/blanks-around-fences : Fenced code blocks should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md031.md
|
||||
// MD031/blanks-around-fences : Fenced code blocks should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md031.md
|
||||
"MD031": {
|
||||
// Include list items
|
||||
"list_items": true
|
||||
},
|
||||
|
||||
// MD032/blanks-around-lists : Lists should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md032.md
|
||||
// MD032/blanks-around-lists : Lists should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md032.md
|
||||
"MD032": true,
|
||||
|
||||
// MD033/no-inline-html : Inline HTML : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md033.md
|
||||
// MD033/no-inline-html : Inline HTML : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md033.md
|
||||
"MD033": {
|
||||
// Allowed elements
|
||||
"allowed_elements": []
|
||||
"allowed_elements": [],
|
||||
// Allowed elements in tables
|
||||
"table_allowed_elements": []
|
||||
},
|
||||
|
||||
// MD034/no-bare-urls : Bare URL used : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md034.md
|
||||
// MD034/no-bare-urls : Bare URL used : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md034.md
|
||||
"MD034": true,
|
||||
|
||||
// MD035/hr-style : Horizontal rule style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md035.md
|
||||
// MD035/hr-style : Horizontal rule style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md035.md
|
||||
"MD035": {
|
||||
// Horizontal rule style
|
||||
"style": "consistent"
|
||||
},
|
||||
|
||||
// MD036/no-emphasis-as-heading : Emphasis used instead of a heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md036.md
|
||||
// MD036/no-emphasis-as-heading : Emphasis used instead of a heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md036.md
|
||||
"MD036": {
|
||||
// Punctuation characters
|
||||
"punctuation": ".,;:!?。,;:!?"
|
||||
},
|
||||
|
||||
// MD037/no-space-in-emphasis : Spaces inside emphasis markers : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md037.md
|
||||
// MD037/no-space-in-emphasis : Spaces inside emphasis markers : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md037.md
|
||||
"MD037": true,
|
||||
|
||||
// MD038/no-space-in-code : Spaces inside code span elements : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md038.md
|
||||
// MD038/no-space-in-code : Spaces inside code span elements : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md038.md
|
||||
"MD038": true,
|
||||
|
||||
// MD039/no-space-in-links : Spaces inside link text : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md039.md
|
||||
// MD039/no-space-in-links : Spaces inside link text : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md039.md
|
||||
"MD039": true,
|
||||
|
||||
// MD040/fenced-code-language : Fenced code blocks should have a language specified : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md040.md
|
||||
// MD040/fenced-code-language : Fenced code blocks should have a language specified : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md040.md
|
||||
"MD040": {
|
||||
// List of languages
|
||||
"allowed_languages": [],
|
||||
|
|
@ -204,7 +209,7 @@
|
|||
"language_only": false
|
||||
},
|
||||
|
||||
// MD041/first-line-heading/first-line-h1 : First line in a file should be a top-level heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md041.md
|
||||
// MD041/first-line-heading/first-line-h1 : First line in a file should be a top-level heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md041.md
|
||||
"MD041": {
|
||||
// Allow content before first heading
|
||||
"allow_preamble": false,
|
||||
|
|
@ -214,10 +219,10 @@
|
|||
"level": 1
|
||||
},
|
||||
|
||||
// MD042/no-empty-links : No empty links : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md042.md
|
||||
// MD042/no-empty-links : No empty links : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md042.md
|
||||
"MD042": true,
|
||||
|
||||
// MD043/required-headings : Required heading structure : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md043.md
|
||||
// MD043/required-headings : Required heading structure : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md043.md
|
||||
"MD043": {
|
||||
// List of headings
|
||||
"headings": [],
|
||||
|
|
@ -225,7 +230,7 @@
|
|||
"match_case": false
|
||||
},
|
||||
|
||||
// MD044/proper-names : Proper names should have the correct capitalization : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md044.md
|
||||
// MD044/proper-names : Proper names should have the correct capitalization : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md044.md
|
||||
"MD044": {
|
||||
// List of proper names
|
||||
"names": [],
|
||||
|
|
@ -235,49 +240,55 @@
|
|||
"html_elements": true
|
||||
},
|
||||
|
||||
// MD045/no-alt-text : Images should have alternate text (alt text) : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md045.md
|
||||
// MD045/no-alt-text : Images should have alternate text (alt text) : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md045.md
|
||||
"MD045": true,
|
||||
|
||||
// MD046/code-block-style : Code block style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md046.md
|
||||
// MD046/code-block-style : Code block style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md046.md
|
||||
"MD046": {
|
||||
// Block style
|
||||
"style": "consistent"
|
||||
},
|
||||
|
||||
// MD047/single-trailing-newline : Files should end with a single newline character : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md047.md
|
||||
// MD047/single-trailing-newline : Files should end with a single newline character : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md047.md
|
||||
"MD047": true,
|
||||
|
||||
// MD048/code-fence-style : Code fence style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md048.md
|
||||
// MD048/code-fence-style : Code fence style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md048.md
|
||||
"MD048": {
|
||||
// Code fence style
|
||||
"style": "consistent"
|
||||
},
|
||||
|
||||
// MD049/emphasis-style : Emphasis style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md049.md
|
||||
// MD049/emphasis-style : Emphasis style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md049.md
|
||||
"MD049": {
|
||||
// Emphasis style
|
||||
"style": "consistent"
|
||||
},
|
||||
|
||||
// MD050/strong-style : Strong style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md050.md
|
||||
// MD050/strong-style : Strong style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md050.md
|
||||
"MD050": {
|
||||
// Strong style
|
||||
"style": "consistent"
|
||||
},
|
||||
|
||||
// MD051/link-fragments : Link fragments should be valid : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md051.md
|
||||
// MD051/link-fragments : Link fragments should be valid : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md051.md
|
||||
"MD051": {
|
||||
// Ignore case of fragments
|
||||
"ignore_case": false
|
||||
"ignore_case": false,
|
||||
// Pattern for ignoring additional fragments
|
||||
"ignored_pattern": ""
|
||||
},
|
||||
|
||||
// MD052/reference-links-images : Reference links and images should use a label that is defined : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md052.md
|
||||
// MD052/reference-links-images : Reference links and images should use a label that is defined : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md052.md
|
||||
"MD052": {
|
||||
// Ignored link labels
|
||||
"ignored_labels": [
|
||||
"x"
|
||||
],
|
||||
// Include shortcut syntax
|
||||
"shortcut_syntax": false
|
||||
},
|
||||
|
||||
// MD053/link-image-reference-definitions : Link and image reference definitions should be needed : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md053.md
|
||||
// MD053/link-image-reference-definitions : Link and image reference definitions should be needed : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md053.md
|
||||
"MD053": {
|
||||
// Ignored definitions
|
||||
"ignored_definitions": [
|
||||
|
|
@ -285,7 +296,7 @@
|
|||
]
|
||||
},
|
||||
|
||||
// MD054/link-image-style : Link and image style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md054.md
|
||||
// MD054/link-image-style : Link and image style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md054.md
|
||||
"MD054": {
|
||||
// Allow autolinks
|
||||
"autolink": true,
|
||||
|
|
@ -301,19 +312,19 @@
|
|||
"url_inline": true
|
||||
},
|
||||
|
||||
// MD055/table-pipe-style : Table pipe style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md055.md
|
||||
// MD055/table-pipe-style : Table pipe style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md055.md
|
||||
"MD055": {
|
||||
// Table pipe style
|
||||
"style": "consistent"
|
||||
},
|
||||
|
||||
// MD056/table-column-count : Table column count : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md056.md
|
||||
// MD056/table-column-count : Table column count : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md056.md
|
||||
"MD056": true,
|
||||
|
||||
// MD058/blanks-around-tables : Tables should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md058.md
|
||||
// MD058/blanks-around-tables : Tables should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md058.md
|
||||
"MD058": true,
|
||||
|
||||
// MD059/descriptive-link-text : Link text should be descriptive : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md059.md
|
||||
// MD059/descriptive-link-text : Link text should be descriptive : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md059.md
|
||||
"MD059": {
|
||||
// Prohibited link texts
|
||||
"prohibited_texts": [
|
||||
|
|
@ -322,5 +333,11 @@
|
|||
"link",
|
||||
"more"
|
||||
]
|
||||
},
|
||||
|
||||
// MD060/table-column-style : Table column style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md060.md
|
||||
"MD060": {
|
||||
// Table column style
|
||||
"style": "any"
|
||||
}
|
||||
}
|
||||
|
|
@ -6,23 +6,25 @@ default: true
|
|||
# Path to configuration file to extend
|
||||
extends: null
|
||||
|
||||
# MD001/heading-increment : Heading levels should only increment by one level at a time : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md001.md
|
||||
MD001: true
|
||||
# MD001/heading-increment : Heading levels should only increment by one level at a time : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md001.md
|
||||
MD001:
|
||||
# RegExp for matching title in front matter
|
||||
front_matter_title: "^\\s*title\\s*[:=]"
|
||||
|
||||
# MD003/heading-style : Heading style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md003.md
|
||||
# MD003/heading-style : Heading style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md003.md
|
||||
MD003:
|
||||
# Heading style
|
||||
style: "consistent"
|
||||
|
||||
# MD004/ul-style : Unordered list style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md004.md
|
||||
# MD004/ul-style : Unordered list style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md004.md
|
||||
MD004:
|
||||
# List style
|
||||
style: "consistent"
|
||||
|
||||
# MD005/list-indent : Inconsistent indentation for list items at the same level : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md005.md
|
||||
# MD005/list-indent : Inconsistent indentation for list items at the same level : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md005.md
|
||||
MD005: true
|
||||
|
||||
# MD007/ul-indent : Unordered list indentation : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md007.md
|
||||
# MD007/ul-indent : Unordered list indentation : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md007.md
|
||||
MD007:
|
||||
# Spaces for indent
|
||||
indent: 2
|
||||
|
|
@ -31,7 +33,7 @@ MD007:
|
|||
# Spaces for first level indent (when start_indented is set)
|
||||
start_indent: 2
|
||||
|
||||
# MD009/no-trailing-spaces : Trailing spaces : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md009.md
|
||||
# MD009/no-trailing-spaces : Trailing spaces : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md009.md
|
||||
MD009:
|
||||
# Spaces for line break
|
||||
br_spaces: 2
|
||||
|
|
@ -40,7 +42,7 @@ MD009:
|
|||
# Include unnecessary breaks
|
||||
strict: false
|
||||
|
||||
# MD010/no-hard-tabs : Hard tabs : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md010.md
|
||||
# MD010/no-hard-tabs : Hard tabs : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md010.md
|
||||
MD010:
|
||||
# Include code blocks
|
||||
code_blocks: true
|
||||
|
|
@ -49,15 +51,15 @@ MD010:
|
|||
# Number of spaces for each hard tab
|
||||
spaces_per_tab: 1
|
||||
|
||||
# MD011/no-reversed-links : Reversed link syntax : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md011.md
|
||||
# MD011/no-reversed-links : Reversed link syntax : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md011.md
|
||||
MD011: true
|
||||
|
||||
# MD012/no-multiple-blanks : Multiple consecutive blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md012.md
|
||||
# MD012/no-multiple-blanks : Multiple consecutive blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md
|
||||
MD012:
|
||||
# Consecutive blank lines
|
||||
maximum: 1
|
||||
|
||||
# MD013/line-length : Line length : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md013.md
|
||||
# MD013/line-length : Line length : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md013.md
|
||||
MD013:
|
||||
# Number of characters
|
||||
line_length: 80
|
||||
|
|
@ -76,62 +78,62 @@ MD013:
|
|||
# Stern length checking
|
||||
stern: false
|
||||
|
||||
# MD014/commands-show-output : Dollar signs used before commands without showing output : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md014.md
|
||||
# MD014/commands-show-output : Dollar signs used before commands without showing output : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md014.md
|
||||
MD014: true
|
||||
|
||||
# MD018/no-missing-space-atx : No space after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md018.md
|
||||
# MD018/no-missing-space-atx : No space after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md018.md
|
||||
MD018: true
|
||||
|
||||
# MD019/no-multiple-space-atx : Multiple spaces after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md019.md
|
||||
# MD019/no-multiple-space-atx : Multiple spaces after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md019.md
|
||||
MD019: true
|
||||
|
||||
# MD020/no-missing-space-closed-atx : No space inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md020.md
|
||||
# MD020/no-missing-space-closed-atx : No space inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md020.md
|
||||
MD020: true
|
||||
|
||||
# MD021/no-multiple-space-closed-atx : Multiple spaces inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md021.md
|
||||
# MD021/no-multiple-space-closed-atx : Multiple spaces inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md021.md
|
||||
MD021: true
|
||||
|
||||
# MD022/blanks-around-headings : Headings should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md022.md
|
||||
# MD022/blanks-around-headings : Headings should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md022.md
|
||||
MD022:
|
||||
# Blank lines above heading
|
||||
lines_above: 1
|
||||
# Blank lines below heading
|
||||
lines_below: 1
|
||||
|
||||
# MD023/heading-start-left : Headings must start at the beginning of the line : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md023.md
|
||||
# MD023/heading-start-left : Headings must start at the beginning of the line : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md023.md
|
||||
MD023: true
|
||||
|
||||
# MD024/no-duplicate-heading : Multiple headings with the same content : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md024.md
|
||||
# MD024/no-duplicate-heading : Multiple headings with the same content : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md024.md
|
||||
MD024:
|
||||
# Only check sibling headings
|
||||
siblings_only: false
|
||||
|
||||
# MD025/single-title/single-h1 : Multiple top-level headings in the same document : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md025.md
|
||||
# MD025/single-title/single-h1 : Multiple top-level headings in the same document : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md025.md
|
||||
MD025:
|
||||
# RegExp for matching title in front matter
|
||||
front_matter_title: "^\\s*title\\s*[:=]"
|
||||
# Heading level
|
||||
level: 1
|
||||
|
||||
# MD026/no-trailing-punctuation : Trailing punctuation in heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md026.md
|
||||
# MD026/no-trailing-punctuation : Trailing punctuation in heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md026.md
|
||||
MD026:
|
||||
# Punctuation characters
|
||||
punctuation: ".,;:!。,;:!"
|
||||
|
||||
# MD027/no-multiple-space-blockquote : Multiple spaces after blockquote symbol : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md027.md
|
||||
# MD027/no-multiple-space-blockquote : Multiple spaces after blockquote symbol : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md027.md
|
||||
MD027:
|
||||
# Include list items
|
||||
list_items: true
|
||||
|
||||
# MD028/no-blanks-blockquote : Blank line inside blockquote : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md028.md
|
||||
# MD028/no-blanks-blockquote : Blank line inside blockquote : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md028.md
|
||||
MD028: true
|
||||
|
||||
# MD029/ol-prefix : Ordered list item prefix : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md029.md
|
||||
# MD029/ol-prefix : Ordered list item prefix : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md029.md
|
||||
MD029:
|
||||
# List style
|
||||
style: "one_or_ordered"
|
||||
|
||||
# MD030/list-marker-space : Spaces after list markers : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md030.md
|
||||
# MD030/list-marker-space : Spaces after list markers : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md030.md
|
||||
MD030:
|
||||
# Spaces for single-line unordered list items
|
||||
ul_single: 1
|
||||
|
|
@ -142,49 +144,51 @@ MD030:
|
|||
# Spaces for multi-line ordered list items
|
||||
ol_multi: 1
|
||||
|
||||
# MD031/blanks-around-fences : Fenced code blocks should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md031.md
|
||||
# MD031/blanks-around-fences : Fenced code blocks should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md031.md
|
||||
MD031:
|
||||
# Include list items
|
||||
list_items: true
|
||||
|
||||
# MD032/blanks-around-lists : Lists should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md032.md
|
||||
# MD032/blanks-around-lists : Lists should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md032.md
|
||||
MD032: true
|
||||
|
||||
# MD033/no-inline-html : Inline HTML : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md033.md
|
||||
# MD033/no-inline-html : Inline HTML : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md033.md
|
||||
MD033:
|
||||
# Allowed elements
|
||||
allowed_elements: []
|
||||
# Allowed elements in tables
|
||||
table_allowed_elements: []
|
||||
|
||||
# MD034/no-bare-urls : Bare URL used : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md034.md
|
||||
# MD034/no-bare-urls : Bare URL used : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md034.md
|
||||
MD034: true
|
||||
|
||||
# MD035/hr-style : Horizontal rule style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md035.md
|
||||
# MD035/hr-style : Horizontal rule style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md035.md
|
||||
MD035:
|
||||
# Horizontal rule style
|
||||
style: "consistent"
|
||||
|
||||
# MD036/no-emphasis-as-heading : Emphasis used instead of a heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md036.md
|
||||
# MD036/no-emphasis-as-heading : Emphasis used instead of a heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md036.md
|
||||
MD036:
|
||||
# Punctuation characters
|
||||
punctuation: ".,;:!?。,;:!?"
|
||||
|
||||
# MD037/no-space-in-emphasis : Spaces inside emphasis markers : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md037.md
|
||||
# MD037/no-space-in-emphasis : Spaces inside emphasis markers : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md037.md
|
||||
MD037: true
|
||||
|
||||
# MD038/no-space-in-code : Spaces inside code span elements : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md038.md
|
||||
# MD038/no-space-in-code : Spaces inside code span elements : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md038.md
|
||||
MD038: true
|
||||
|
||||
# MD039/no-space-in-links : Spaces inside link text : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md039.md
|
||||
# MD039/no-space-in-links : Spaces inside link text : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md039.md
|
||||
MD039: true
|
||||
|
||||
# MD040/fenced-code-language : Fenced code blocks should have a language specified : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md040.md
|
||||
# MD040/fenced-code-language : Fenced code blocks should have a language specified : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md040.md
|
||||
MD040:
|
||||
# List of languages
|
||||
allowed_languages: []
|
||||
# Require language only
|
||||
language_only: false
|
||||
|
||||
# MD041/first-line-heading/first-line-h1 : First line in a file should be a top-level heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md041.md
|
||||
# MD041/first-line-heading/first-line-h1 : First line in a file should be a top-level heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md041.md
|
||||
MD041:
|
||||
# Allow content before first heading
|
||||
allow_preamble: false
|
||||
|
|
@ -193,17 +197,17 @@ MD041:
|
|||
# Heading level
|
||||
level: 1
|
||||
|
||||
# MD042/no-empty-links : No empty links : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md042.md
|
||||
# MD042/no-empty-links : No empty links : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md042.md
|
||||
MD042: true
|
||||
|
||||
# MD043/required-headings : Required heading structure : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md043.md
|
||||
# MD043/required-headings : Required heading structure : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md043.md
|
||||
MD043:
|
||||
# List of headings
|
||||
headings: []
|
||||
# Match case of headings
|
||||
match_case: false
|
||||
|
||||
# MD044/proper-names : Proper names should have the correct capitalization : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md044.md
|
||||
# MD044/proper-names : Proper names should have the correct capitalization : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md044.md
|
||||
MD044:
|
||||
# List of proper names
|
||||
names: []
|
||||
|
|
@ -212,49 +216,54 @@ MD044:
|
|||
# Include HTML elements
|
||||
html_elements: true
|
||||
|
||||
# MD045/no-alt-text : Images should have alternate text (alt text) : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md045.md
|
||||
# MD045/no-alt-text : Images should have alternate text (alt text) : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md045.md
|
||||
MD045: true
|
||||
|
||||
# MD046/code-block-style : Code block style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md046.md
|
||||
# MD046/code-block-style : Code block style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md046.md
|
||||
MD046:
|
||||
# Block style
|
||||
style: "consistent"
|
||||
|
||||
# MD047/single-trailing-newline : Files should end with a single newline character : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md047.md
|
||||
# MD047/single-trailing-newline : Files should end with a single newline character : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md047.md
|
||||
MD047: true
|
||||
|
||||
# MD048/code-fence-style : Code fence style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md048.md
|
||||
# MD048/code-fence-style : Code fence style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md048.md
|
||||
MD048:
|
||||
# Code fence style
|
||||
style: "consistent"
|
||||
|
||||
# MD049/emphasis-style : Emphasis style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md049.md
|
||||
# MD049/emphasis-style : Emphasis style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md049.md
|
||||
MD049:
|
||||
# Emphasis style
|
||||
style: "consistent"
|
||||
|
||||
# MD050/strong-style : Strong style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md050.md
|
||||
# MD050/strong-style : Strong style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md050.md
|
||||
MD050:
|
||||
# Strong style
|
||||
style: "consistent"
|
||||
|
||||
# MD051/link-fragments : Link fragments should be valid : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md051.md
|
||||
# MD051/link-fragments : Link fragments should be valid : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md051.md
|
||||
MD051:
|
||||
# Ignore case of fragments
|
||||
ignore_case: false
|
||||
# Pattern for ignoring additional fragments
|
||||
ignored_pattern: ""
|
||||
|
||||
# MD052/reference-links-images : Reference links and images should use a label that is defined : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md052.md
|
||||
# MD052/reference-links-images : Reference links and images should use a label that is defined : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md052.md
|
||||
MD052:
|
||||
# Ignored link labels
|
||||
ignored_labels:
|
||||
- "x"
|
||||
# Include shortcut syntax
|
||||
shortcut_syntax: false
|
||||
|
||||
# MD053/link-image-reference-definitions : Link and image reference definitions should be needed : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md053.md
|
||||
# MD053/link-image-reference-definitions : Link and image reference definitions should be needed : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md053.md
|
||||
MD053:
|
||||
# Ignored definitions
|
||||
ignored_definitions:
|
||||
- "//"
|
||||
|
||||
# MD054/link-image-style : Link and image style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md054.md
|
||||
# MD054/link-image-style : Link and image style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md054.md
|
||||
MD054:
|
||||
# Allow autolinks
|
||||
autolink: true
|
||||
|
|
@ -269,18 +278,18 @@ MD054:
|
|||
# Allow URLs as inline links
|
||||
url_inline: true
|
||||
|
||||
# MD055/table-pipe-style : Table pipe style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md055.md
|
||||
# MD055/table-pipe-style : Table pipe style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md055.md
|
||||
MD055:
|
||||
# Table pipe style
|
||||
style: "consistent"
|
||||
|
||||
# MD056/table-column-count : Table column count : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md056.md
|
||||
# MD056/table-column-count : Table column count : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md056.md
|
||||
MD056: true
|
||||
|
||||
# MD058/blanks-around-tables : Tables should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md058.md
|
||||
# MD058/blanks-around-tables : Tables should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md058.md
|
||||
MD058: true
|
||||
|
||||
# MD059/descriptive-link-text : Link text should be descriptive : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md059.md
|
||||
# MD059/descriptive-link-text : Link text should be descriptive : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md059.md
|
||||
MD059:
|
||||
# Prohibited link texts
|
||||
prohibited_texts:
|
||||
|
|
@ -288,3 +297,8 @@ MD059:
|
|||
- "here"
|
||||
- "link"
|
||||
- "more"
|
||||
|
||||
# MD060/table-column-style : Table column style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md060.md
|
||||
MD060:
|
||||
# Table column style
|
||||
style: "any"
|
||||
|
|
|
|||
|
|
@ -64,6 +64,15 @@ for (const rule of rules) {
|
|||
};
|
||||
let custom = true;
|
||||
switch (ruleName) {
|
||||
case "MD001":
|
||||
scheme.properties = {
|
||||
"front_matter_title": {
|
||||
"description": "RegExp for matching title in front matter",
|
||||
"type": "string",
|
||||
"default": "^\\s*title\\s*[:=]"
|
||||
}
|
||||
};
|
||||
break;
|
||||
case "MD003":
|
||||
scheme.properties = {
|
||||
"style": {
|
||||
|
|
@ -336,6 +345,14 @@ for (const rule of rules) {
|
|||
"type": "string"
|
||||
},
|
||||
"default": []
|
||||
},
|
||||
"table_allowed_elements": {
|
||||
"description": "Allowed elements in tables",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"default": []
|
||||
}
|
||||
};
|
||||
break;
|
||||
|
|
@ -483,11 +500,24 @@ for (const rule of rules) {
|
|||
"description": "Ignore case of fragments",
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"ignored_pattern": {
|
||||
"description": "Pattern for ignoring additional fragments",
|
||||
"type": "string",
|
||||
"default": ""
|
||||
}
|
||||
};
|
||||
break;
|
||||
case "MD052":
|
||||
scheme.properties = {
|
||||
"ignored_labels": {
|
||||
"description": "Ignored link labels",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"default": [ "x" ]
|
||||
},
|
||||
"shortcut_syntax": {
|
||||
"description": "Include shortcut syntax",
|
||||
"type": "boolean",
|
||||
|
|
@ -574,6 +604,21 @@ for (const rule of rules) {
|
|||
}
|
||||
};
|
||||
break;
|
||||
case "MD060":
|
||||
scheme.properties = {
|
||||
"style": {
|
||||
"description": "Table column style",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"any",
|
||||
"aligned",
|
||||
"compact",
|
||||
"tight"
|
||||
],
|
||||
"default": "any"
|
||||
}
|
||||
};
|
||||
break;
|
||||
default:
|
||||
custom = false;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"$id": "https://raw.githubusercontent.com/DavidAnson/markdownlint/v0.37.4/schema/markdownlint-config-schema-strict.json",
|
||||
"$id": "https://raw.githubusercontent.com/DavidAnson/markdownlint/v0.38.0/schema/markdownlint-config-schema-strict.json",
|
||||
"title": "markdownlint configuration schema",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"$schema": {
|
||||
"description": "JSON Schema URI (expected by some editors)",
|
||||
"type": "string",
|
||||
"default": "https://raw.githubusercontent.com/DavidAnson/markdownlint/v0.37.4/schema/markdownlint-config-schema.json"
|
||||
"default": "https://raw.githubusercontent.com/DavidAnson/markdownlint/v0.38.0/schema/markdownlint-config-schema.json"
|
||||
},
|
||||
"default": {
|
||||
"description": "Default state for all rules",
|
||||
|
|
@ -23,17 +23,39 @@
|
|||
"default": null
|
||||
},
|
||||
"MD001": {
|
||||
"description": "MD001/heading-increment : Heading levels should only increment by one level at a time : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md001.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
"description": "MD001/heading-increment : Heading levels should only increment by one level at a time : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md001.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
],
|
||||
"default": true,
|
||||
"properties": {
|
||||
"front_matter_title": {
|
||||
"description": "RegExp for matching title in front matter",
|
||||
"type": "string",
|
||||
"default": "^\\s*title\\s*[:=]"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"heading-increment": {
|
||||
"description": "MD001/heading-increment : Heading levels should only increment by one level at a time : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md001.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
"description": "MD001/heading-increment : Heading levels should only increment by one level at a time : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md001.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
],
|
||||
"default": true,
|
||||
"properties": {
|
||||
"front_matter_title": {
|
||||
"description": "RegExp for matching title in front matter",
|
||||
"type": "string",
|
||||
"default": "^\\s*title\\s*[:=]"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"MD003": {
|
||||
"description": "MD003/heading-style : Heading style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md003.md",
|
||||
"description": "MD003/heading-style : Heading style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md003.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -57,7 +79,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"heading-style": {
|
||||
"description": "MD003/heading-style : Heading style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md003.md",
|
||||
"description": "MD003/heading-style : Heading style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md003.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -81,7 +103,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD004": {
|
||||
"description": "MD004/ul-style : Unordered list style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md004.md",
|
||||
"description": "MD004/ul-style : Unordered list style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md004.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -104,7 +126,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"ul-style": {
|
||||
"description": "MD004/ul-style : Unordered list style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md004.md",
|
||||
"description": "MD004/ul-style : Unordered list style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md004.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -127,17 +149,17 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD005": {
|
||||
"description": "MD005/list-indent : Inconsistent indentation for list items at the same level : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md005.md",
|
||||
"description": "MD005/list-indent : Inconsistent indentation for list items at the same level : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md005.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"list-indent": {
|
||||
"description": "MD005/list-indent : Inconsistent indentation for list items at the same level : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md005.md",
|
||||
"description": "MD005/list-indent : Inconsistent indentation for list items at the same level : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md005.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"MD007": {
|
||||
"description": "MD007/ul-indent : Unordered list indentation : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md007.md",
|
||||
"description": "MD007/ul-indent : Unordered list indentation : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md007.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -165,7 +187,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"ul-indent": {
|
||||
"description": "MD007/ul-indent : Unordered list indentation : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md007.md",
|
||||
"description": "MD007/ul-indent : Unordered list indentation : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md007.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -193,7 +215,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD009": {
|
||||
"description": "MD009/no-trailing-spaces : Trailing spaces : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md009.md",
|
||||
"description": "MD009/no-trailing-spaces : Trailing spaces : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md009.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -220,7 +242,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"no-trailing-spaces": {
|
||||
"description": "MD009/no-trailing-spaces : Trailing spaces : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md009.md",
|
||||
"description": "MD009/no-trailing-spaces : Trailing spaces : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md009.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -247,7 +269,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD010": {
|
||||
"description": "MD010/no-hard-tabs : Hard tabs : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md010.md",
|
||||
"description": "MD010/no-hard-tabs : Hard tabs : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md010.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -277,7 +299,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"no-hard-tabs": {
|
||||
"description": "MD010/no-hard-tabs : Hard tabs : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md010.md",
|
||||
"description": "MD010/no-hard-tabs : Hard tabs : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md010.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -307,17 +329,17 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD011": {
|
||||
"description": "MD011/no-reversed-links : Reversed link syntax : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md011.md",
|
||||
"description": "MD011/no-reversed-links : Reversed link syntax : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md011.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"no-reversed-links": {
|
||||
"description": "MD011/no-reversed-links : Reversed link syntax : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md011.md",
|
||||
"description": "MD011/no-reversed-links : Reversed link syntax : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md011.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"MD012": {
|
||||
"description": "MD012/no-multiple-blanks : Multiple consecutive blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md012.md",
|
||||
"description": "MD012/no-multiple-blanks : Multiple consecutive blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -334,7 +356,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"no-multiple-blanks": {
|
||||
"description": "MD012/no-multiple-blanks : Multiple consecutive blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md012.md",
|
||||
"description": "MD012/no-multiple-blanks : Multiple consecutive blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -351,7 +373,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD013": {
|
||||
"description": "MD013/line-length : Line length : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md013.md",
|
||||
"description": "MD013/line-length : Line length : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md013.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -405,7 +427,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"line-length": {
|
||||
"description": "MD013/line-length : Line length : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md013.md",
|
||||
"description": "MD013/line-length : Line length : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md013.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -459,57 +481,57 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD014": {
|
||||
"description": "MD014/commands-show-output : Dollar signs used before commands without showing output : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md014.md",
|
||||
"description": "MD014/commands-show-output : Dollar signs used before commands without showing output : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md014.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"commands-show-output": {
|
||||
"description": "MD014/commands-show-output : Dollar signs used before commands without showing output : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md014.md",
|
||||
"description": "MD014/commands-show-output : Dollar signs used before commands without showing output : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md014.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"MD018": {
|
||||
"description": "MD018/no-missing-space-atx : No space after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md018.md",
|
||||
"description": "MD018/no-missing-space-atx : No space after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md018.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"no-missing-space-atx": {
|
||||
"description": "MD018/no-missing-space-atx : No space after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md018.md",
|
||||
"description": "MD018/no-missing-space-atx : No space after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md018.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"MD019": {
|
||||
"description": "MD019/no-multiple-space-atx : Multiple spaces after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md019.md",
|
||||
"description": "MD019/no-multiple-space-atx : Multiple spaces after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md019.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"no-multiple-space-atx": {
|
||||
"description": "MD019/no-multiple-space-atx : Multiple spaces after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md019.md",
|
||||
"description": "MD019/no-multiple-space-atx : Multiple spaces after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md019.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"MD020": {
|
||||
"description": "MD020/no-missing-space-closed-atx : No space inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md020.md",
|
||||
"description": "MD020/no-missing-space-closed-atx : No space inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md020.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"no-missing-space-closed-atx": {
|
||||
"description": "MD020/no-missing-space-closed-atx : No space inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md020.md",
|
||||
"description": "MD020/no-missing-space-closed-atx : No space inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md020.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"MD021": {
|
||||
"description": "MD021/no-multiple-space-closed-atx : Multiple spaces inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md021.md",
|
||||
"description": "MD021/no-multiple-space-closed-atx : Multiple spaces inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md021.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"no-multiple-space-closed-atx": {
|
||||
"description": "MD021/no-multiple-space-closed-atx : Multiple spaces inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md021.md",
|
||||
"description": "MD021/no-multiple-space-closed-atx : Multiple spaces inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md021.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"MD022": {
|
||||
"description": "MD022/blanks-around-headings : Headings should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md022.md",
|
||||
"description": "MD022/blanks-around-headings : Headings should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md022.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -544,7 +566,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"blanks-around-headings": {
|
||||
"description": "MD022/blanks-around-headings : Headings should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md022.md",
|
||||
"description": "MD022/blanks-around-headings : Headings should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md022.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -579,17 +601,17 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD023": {
|
||||
"description": "MD023/heading-start-left : Headings must start at the beginning of the line : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md023.md",
|
||||
"description": "MD023/heading-start-left : Headings must start at the beginning of the line : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md023.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"heading-start-left": {
|
||||
"description": "MD023/heading-start-left : Headings must start at the beginning of the line : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md023.md",
|
||||
"description": "MD023/heading-start-left : Headings must start at the beginning of the line : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md023.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"MD024": {
|
||||
"description": "MD024/no-duplicate-heading : Multiple headings with the same content : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md024.md",
|
||||
"description": "MD024/no-duplicate-heading : Multiple headings with the same content : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md024.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -605,7 +627,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"no-duplicate-heading": {
|
||||
"description": "MD024/no-duplicate-heading : Multiple headings with the same content : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md024.md",
|
||||
"description": "MD024/no-duplicate-heading : Multiple headings with the same content : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md024.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -621,7 +643,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD025": {
|
||||
"description": "MD025/single-title/single-h1 : Multiple top-level headings in the same document : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md025.md",
|
||||
"description": "MD025/single-title/single-h1 : Multiple top-level headings in the same document : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md025.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -644,7 +666,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"single-title": {
|
||||
"description": "MD025/single-title/single-h1 : Multiple top-level headings in the same document : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md025.md",
|
||||
"description": "MD025/single-title/single-h1 : Multiple top-level headings in the same document : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md025.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -667,7 +689,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"single-h1": {
|
||||
"description": "MD025/single-title/single-h1 : Multiple top-level headings in the same document : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md025.md",
|
||||
"description": "MD025/single-title/single-h1 : Multiple top-level headings in the same document : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md025.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -690,7 +712,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD026": {
|
||||
"description": "MD026/no-trailing-punctuation : Trailing punctuation in heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md026.md",
|
||||
"description": "MD026/no-trailing-punctuation : Trailing punctuation in heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md026.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -706,7 +728,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"no-trailing-punctuation": {
|
||||
"description": "MD026/no-trailing-punctuation : Trailing punctuation in heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md026.md",
|
||||
"description": "MD026/no-trailing-punctuation : Trailing punctuation in heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md026.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -722,7 +744,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD027": {
|
||||
"description": "MD027/no-multiple-space-blockquote : Multiple spaces after blockquote symbol : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md027.md",
|
||||
"description": "MD027/no-multiple-space-blockquote : Multiple spaces after blockquote symbol : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md027.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -738,7 +760,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"no-multiple-space-blockquote": {
|
||||
"description": "MD027/no-multiple-space-blockquote : Multiple spaces after blockquote symbol : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md027.md",
|
||||
"description": "MD027/no-multiple-space-blockquote : Multiple spaces after blockquote symbol : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md027.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -754,17 +776,17 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD028": {
|
||||
"description": "MD028/no-blanks-blockquote : Blank line inside blockquote : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md028.md",
|
||||
"description": "MD028/no-blanks-blockquote : Blank line inside blockquote : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md028.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"no-blanks-blockquote": {
|
||||
"description": "MD028/no-blanks-blockquote : Blank line inside blockquote : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md028.md",
|
||||
"description": "MD028/no-blanks-blockquote : Blank line inside blockquote : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md028.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"MD029": {
|
||||
"description": "MD029/ol-prefix : Ordered list item prefix : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md029.md",
|
||||
"description": "MD029/ol-prefix : Ordered list item prefix : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md029.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -786,7 +808,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"ol-prefix": {
|
||||
"description": "MD029/ol-prefix : Ordered list item prefix : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md029.md",
|
||||
"description": "MD029/ol-prefix : Ordered list item prefix : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md029.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -808,7 +830,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD030": {
|
||||
"description": "MD030/list-marker-space : Spaces after list markers : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md030.md",
|
||||
"description": "MD030/list-marker-space : Spaces after list markers : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md030.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -843,7 +865,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"list-marker-space": {
|
||||
"description": "MD030/list-marker-space : Spaces after list markers : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md030.md",
|
||||
"description": "MD030/list-marker-space : Spaces after list markers : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md030.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -878,7 +900,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD031": {
|
||||
"description": "MD031/blanks-around-fences : Fenced code blocks should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md031.md",
|
||||
"description": "MD031/blanks-around-fences : Fenced code blocks should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md031.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -894,7 +916,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"blanks-around-fences": {
|
||||
"description": "MD031/blanks-around-fences : Fenced code blocks should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md031.md",
|
||||
"description": "MD031/blanks-around-fences : Fenced code blocks should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md031.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -910,17 +932,17 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD032": {
|
||||
"description": "MD032/blanks-around-lists : Lists should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md032.md",
|
||||
"description": "MD032/blanks-around-lists : Lists should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md032.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"blanks-around-lists": {
|
||||
"description": "MD032/blanks-around-lists : Lists should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md032.md",
|
||||
"description": "MD032/blanks-around-lists : Lists should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md032.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"MD033": {
|
||||
"description": "MD033/no-inline-html : Inline HTML : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md033.md",
|
||||
"description": "MD033/no-inline-html : Inline HTML : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md033.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -934,12 +956,20 @@
|
|||
"type": "string"
|
||||
},
|
||||
"default": []
|
||||
},
|
||||
"table_allowed_elements": {
|
||||
"description": "Allowed elements in tables",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"default": []
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"no-inline-html": {
|
||||
"description": "MD033/no-inline-html : Inline HTML : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md033.md",
|
||||
"description": "MD033/no-inline-html : Inline HTML : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md033.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -953,22 +983,30 @@
|
|||
"type": "string"
|
||||
},
|
||||
"default": []
|
||||
},
|
||||
"table_allowed_elements": {
|
||||
"description": "Allowed elements in tables",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"default": []
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"MD034": {
|
||||
"description": "MD034/no-bare-urls : Bare URL used : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md034.md",
|
||||
"description": "MD034/no-bare-urls : Bare URL used : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md034.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"no-bare-urls": {
|
||||
"description": "MD034/no-bare-urls : Bare URL used : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md034.md",
|
||||
"description": "MD034/no-bare-urls : Bare URL used : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md034.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"MD035": {
|
||||
"description": "MD035/hr-style : Horizontal rule style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md035.md",
|
||||
"description": "MD035/hr-style : Horizontal rule style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md035.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -984,7 +1022,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"hr-style": {
|
||||
"description": "MD035/hr-style : Horizontal rule style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md035.md",
|
||||
"description": "MD035/hr-style : Horizontal rule style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md035.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1000,7 +1038,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD036": {
|
||||
"description": "MD036/no-emphasis-as-heading : Emphasis used instead of a heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md036.md",
|
||||
"description": "MD036/no-emphasis-as-heading : Emphasis used instead of a heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md036.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1016,7 +1054,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"no-emphasis-as-heading": {
|
||||
"description": "MD036/no-emphasis-as-heading : Emphasis used instead of a heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md036.md",
|
||||
"description": "MD036/no-emphasis-as-heading : Emphasis used instead of a heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md036.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1032,37 +1070,37 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD037": {
|
||||
"description": "MD037/no-space-in-emphasis : Spaces inside emphasis markers : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md037.md",
|
||||
"description": "MD037/no-space-in-emphasis : Spaces inside emphasis markers : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md037.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"no-space-in-emphasis": {
|
||||
"description": "MD037/no-space-in-emphasis : Spaces inside emphasis markers : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md037.md",
|
||||
"description": "MD037/no-space-in-emphasis : Spaces inside emphasis markers : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md037.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"MD038": {
|
||||
"description": "MD038/no-space-in-code : Spaces inside code span elements : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md038.md",
|
||||
"description": "MD038/no-space-in-code : Spaces inside code span elements : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md038.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"no-space-in-code": {
|
||||
"description": "MD038/no-space-in-code : Spaces inside code span elements : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md038.md",
|
||||
"description": "MD038/no-space-in-code : Spaces inside code span elements : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md038.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"MD039": {
|
||||
"description": "MD039/no-space-in-links : Spaces inside link text : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md039.md",
|
||||
"description": "MD039/no-space-in-links : Spaces inside link text : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md039.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"no-space-in-links": {
|
||||
"description": "MD039/no-space-in-links : Spaces inside link text : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md039.md",
|
||||
"description": "MD039/no-space-in-links : Spaces inside link text : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md039.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"MD040": {
|
||||
"description": "MD040/fenced-code-language : Fenced code blocks should have a language specified : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md040.md",
|
||||
"description": "MD040/fenced-code-language : Fenced code blocks should have a language specified : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md040.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1086,7 +1124,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"fenced-code-language": {
|
||||
"description": "MD040/fenced-code-language : Fenced code blocks should have a language specified : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md040.md",
|
||||
"description": "MD040/fenced-code-language : Fenced code blocks should have a language specified : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md040.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1110,7 +1148,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD041": {
|
||||
"description": "MD041/first-line-heading/first-line-h1 : First line in a file should be a top-level heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md041.md",
|
||||
"description": "MD041/first-line-heading/first-line-h1 : First line in a file should be a top-level heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md041.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1138,7 +1176,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"first-line-heading": {
|
||||
"description": "MD041/first-line-heading/first-line-h1 : First line in a file should be a top-level heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md041.md",
|
||||
"description": "MD041/first-line-heading/first-line-h1 : First line in a file should be a top-level heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md041.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1166,7 +1204,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"first-line-h1": {
|
||||
"description": "MD041/first-line-heading/first-line-h1 : First line in a file should be a top-level heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md041.md",
|
||||
"description": "MD041/first-line-heading/first-line-h1 : First line in a file should be a top-level heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md041.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1194,17 +1232,17 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD042": {
|
||||
"description": "MD042/no-empty-links : No empty links : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md042.md",
|
||||
"description": "MD042/no-empty-links : No empty links : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md042.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"no-empty-links": {
|
||||
"description": "MD042/no-empty-links : No empty links : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md042.md",
|
||||
"description": "MD042/no-empty-links : No empty links : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md042.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"MD043": {
|
||||
"description": "MD043/required-headings : Required heading structure : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md043.md",
|
||||
"description": "MD043/required-headings : Required heading structure : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md043.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1229,7 +1267,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"required-headings": {
|
||||
"description": "MD043/required-headings : Required heading structure : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md043.md",
|
||||
"description": "MD043/required-headings : Required heading structure : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md043.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1254,7 +1292,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD044": {
|
||||
"description": "MD044/proper-names : Proper names should have the correct capitalization : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md044.md",
|
||||
"description": "MD044/proper-names : Proper names should have the correct capitalization : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md044.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1283,7 +1321,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"proper-names": {
|
||||
"description": "MD044/proper-names : Proper names should have the correct capitalization : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md044.md",
|
||||
"description": "MD044/proper-names : Proper names should have the correct capitalization : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md044.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1312,17 +1350,17 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD045": {
|
||||
"description": "MD045/no-alt-text : Images should have alternate text (alt text) : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md045.md",
|
||||
"description": "MD045/no-alt-text : Images should have alternate text (alt text) : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md045.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"no-alt-text": {
|
||||
"description": "MD045/no-alt-text : Images should have alternate text (alt text) : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md045.md",
|
||||
"description": "MD045/no-alt-text : Images should have alternate text (alt text) : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md045.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"MD046": {
|
||||
"description": "MD046/code-block-style : Code block style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md046.md",
|
||||
"description": "MD046/code-block-style : Code block style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md046.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1343,7 +1381,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"code-block-style": {
|
||||
"description": "MD046/code-block-style : Code block style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md046.md",
|
||||
"description": "MD046/code-block-style : Code block style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md046.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1364,17 +1402,17 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD047": {
|
||||
"description": "MD047/single-trailing-newline : Files should end with a single newline character : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md047.md",
|
||||
"description": "MD047/single-trailing-newline : Files should end with a single newline character : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md047.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"single-trailing-newline": {
|
||||
"description": "MD047/single-trailing-newline : Files should end with a single newline character : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md047.md",
|
||||
"description": "MD047/single-trailing-newline : Files should end with a single newline character : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md047.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"MD048": {
|
||||
"description": "MD048/code-fence-style : Code fence style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md048.md",
|
||||
"description": "MD048/code-fence-style : Code fence style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md048.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1395,7 +1433,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"code-fence-style": {
|
||||
"description": "MD048/code-fence-style : Code fence style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md048.md",
|
||||
"description": "MD048/code-fence-style : Code fence style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md048.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1416,7 +1454,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD049": {
|
||||
"description": "MD049/emphasis-style : Emphasis style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md049.md",
|
||||
"description": "MD049/emphasis-style : Emphasis style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md049.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1437,7 +1475,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"emphasis-style": {
|
||||
"description": "MD049/emphasis-style : Emphasis style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md049.md",
|
||||
"description": "MD049/emphasis-style : Emphasis style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md049.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1458,7 +1496,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD050": {
|
||||
"description": "MD050/strong-style : Strong style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md050.md",
|
||||
"description": "MD050/strong-style : Strong style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md050.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1479,7 +1517,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"strong-style": {
|
||||
"description": "MD050/strong-style : Strong style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md050.md",
|
||||
"description": "MD050/strong-style : Strong style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md050.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1500,7 +1538,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD051": {
|
||||
"description": "MD051/link-fragments : Link fragments should be valid : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md051.md",
|
||||
"description": "MD051/link-fragments : Link fragments should be valid : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md051.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1511,12 +1549,17 @@
|
|||
"description": "Ignore case of fragments",
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"ignored_pattern": {
|
||||
"description": "Pattern for ignoring additional fragments",
|
||||
"type": "string",
|
||||
"default": ""
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"link-fragments": {
|
||||
"description": "MD051/link-fragments : Link fragments should be valid : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md051.md",
|
||||
"description": "MD051/link-fragments : Link fragments should be valid : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md051.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1527,18 +1570,33 @@
|
|||
"description": "Ignore case of fragments",
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"ignored_pattern": {
|
||||
"description": "Pattern for ignoring additional fragments",
|
||||
"type": "string",
|
||||
"default": ""
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"MD052": {
|
||||
"description": "MD052/reference-links-images : Reference links and images should use a label that is defined : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md052.md",
|
||||
"description": "MD052/reference-links-images : Reference links and images should use a label that is defined : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md052.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
],
|
||||
"default": true,
|
||||
"properties": {
|
||||
"ignored_labels": {
|
||||
"description": "Ignored link labels",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"default": [
|
||||
"x"
|
||||
]
|
||||
},
|
||||
"shortcut_syntax": {
|
||||
"description": "Include shortcut syntax",
|
||||
"type": "boolean",
|
||||
|
|
@ -1548,13 +1606,23 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"reference-links-images": {
|
||||
"description": "MD052/reference-links-images : Reference links and images should use a label that is defined : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md052.md",
|
||||
"description": "MD052/reference-links-images : Reference links and images should use a label that is defined : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md052.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
],
|
||||
"default": true,
|
||||
"properties": {
|
||||
"ignored_labels": {
|
||||
"description": "Ignored link labels",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"default": [
|
||||
"x"
|
||||
]
|
||||
},
|
||||
"shortcut_syntax": {
|
||||
"description": "Include shortcut syntax",
|
||||
"type": "boolean",
|
||||
|
|
@ -1564,7 +1632,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD053": {
|
||||
"description": "MD053/link-image-reference-definitions : Link and image reference definitions should be needed : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md053.md",
|
||||
"description": "MD053/link-image-reference-definitions : Link and image reference definitions should be needed : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md053.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1585,7 +1653,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"link-image-reference-definitions": {
|
||||
"description": "MD053/link-image-reference-definitions : Link and image reference definitions should be needed : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md053.md",
|
||||
"description": "MD053/link-image-reference-definitions : Link and image reference definitions should be needed : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md053.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1606,7 +1674,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD054": {
|
||||
"description": "MD054/link-image-style : Link and image style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md054.md",
|
||||
"description": "MD054/link-image-style : Link and image style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md054.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1647,7 +1715,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"link-image-style": {
|
||||
"description": "MD054/link-image-style : Link and image style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md054.md",
|
||||
"description": "MD054/link-image-style : Link and image style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md054.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1688,7 +1756,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD055": {
|
||||
"description": "MD055/table-pipe-style : Table pipe style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md055.md",
|
||||
"description": "MD055/table-pipe-style : Table pipe style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md055.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1711,7 +1779,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"table-pipe-style": {
|
||||
"description": "MD055/table-pipe-style : Table pipe style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md055.md",
|
||||
"description": "MD055/table-pipe-style : Table pipe style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md055.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1734,27 +1802,27 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD056": {
|
||||
"description": "MD056/table-column-count : Table column count : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md056.md",
|
||||
"description": "MD056/table-column-count : Table column count : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md056.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"table-column-count": {
|
||||
"description": "MD056/table-column-count : Table column count : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md056.md",
|
||||
"description": "MD056/table-column-count : Table column count : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md056.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"MD058": {
|
||||
"description": "MD058/blanks-around-tables : Tables should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md058.md",
|
||||
"description": "MD058/blanks-around-tables : Tables should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md058.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"blanks-around-tables": {
|
||||
"description": "MD058/blanks-around-tables : Tables should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md058.md",
|
||||
"description": "MD058/blanks-around-tables : Tables should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md058.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"MD059": {
|
||||
"description": "MD059/descriptive-link-text : Link text should be descriptive : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md059.md",
|
||||
"description": "MD059/descriptive-link-text : Link text should be descriptive : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md059.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1778,7 +1846,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"descriptive-link-text": {
|
||||
"description": "MD059/descriptive-link-text : Link text should be descriptive : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md059.md",
|
||||
"description": "MD059/descriptive-link-text : Link text should be descriptive : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md059.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1801,6 +1869,50 @@
|
|||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"MD060": {
|
||||
"description": "MD060/table-column-style : Table column style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md060.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
],
|
||||
"default": true,
|
||||
"properties": {
|
||||
"style": {
|
||||
"description": "Table column style",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"any",
|
||||
"aligned",
|
||||
"compact",
|
||||
"tight"
|
||||
],
|
||||
"default": "any"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"table-column-style": {
|
||||
"description": "MD060/table-column-style : Table column style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md060.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
],
|
||||
"default": true,
|
||||
"properties": {
|
||||
"style": {
|
||||
"description": "Table column style",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"any",
|
||||
"aligned",
|
||||
"compact",
|
||||
"tight"
|
||||
],
|
||||
"default": "any"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"headings": {
|
||||
"description": "headings : MD001, MD003, MD018, MD019, MD020, MD021, MD022, MD023, MD024, MD025, MD026, MD036, MD041, MD043",
|
||||
"type": "boolean",
|
||||
|
|
@ -1917,7 +2029,7 @@
|
|||
"default": true
|
||||
},
|
||||
"table": {
|
||||
"description": "table : MD055, MD056, MD058",
|
||||
"description": "table : MD055, MD056, MD058, MD060",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"$id": "https://raw.githubusercontent.com/DavidAnson/markdownlint/v0.37.4/schema/markdownlint-config-schema.json",
|
||||
"$id": "https://raw.githubusercontent.com/DavidAnson/markdownlint/v0.38.0/schema/markdownlint-config-schema.json",
|
||||
"title": "markdownlint configuration schema",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"$schema": {
|
||||
"description": "JSON Schema URI (expected by some editors)",
|
||||
"type": "string",
|
||||
"default": "https://raw.githubusercontent.com/DavidAnson/markdownlint/v0.37.4/schema/markdownlint-config-schema.json"
|
||||
"default": "https://raw.githubusercontent.com/DavidAnson/markdownlint/v0.38.0/schema/markdownlint-config-schema.json"
|
||||
},
|
||||
"default": {
|
||||
"description": "Default state for all rules",
|
||||
|
|
@ -23,17 +23,39 @@
|
|||
"default": null
|
||||
},
|
||||
"MD001": {
|
||||
"description": "MD001/heading-increment : Heading levels should only increment by one level at a time : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md001.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
"description": "MD001/heading-increment : Heading levels should only increment by one level at a time : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md001.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
],
|
||||
"default": true,
|
||||
"properties": {
|
||||
"front_matter_title": {
|
||||
"description": "RegExp for matching title in front matter",
|
||||
"type": "string",
|
||||
"default": "^\\s*title\\s*[:=]"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"heading-increment": {
|
||||
"description": "MD001/heading-increment : Heading levels should only increment by one level at a time : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md001.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
"description": "MD001/heading-increment : Heading levels should only increment by one level at a time : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md001.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
],
|
||||
"default": true,
|
||||
"properties": {
|
||||
"front_matter_title": {
|
||||
"description": "RegExp for matching title in front matter",
|
||||
"type": "string",
|
||||
"default": "^\\s*title\\s*[:=]"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"MD003": {
|
||||
"description": "MD003/heading-style : Heading style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md003.md",
|
||||
"description": "MD003/heading-style : Heading style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md003.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -57,7 +79,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"heading-style": {
|
||||
"description": "MD003/heading-style : Heading style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md003.md",
|
||||
"description": "MD003/heading-style : Heading style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md003.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -81,7 +103,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD004": {
|
||||
"description": "MD004/ul-style : Unordered list style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md004.md",
|
||||
"description": "MD004/ul-style : Unordered list style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md004.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -104,7 +126,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"ul-style": {
|
||||
"description": "MD004/ul-style : Unordered list style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md004.md",
|
||||
"description": "MD004/ul-style : Unordered list style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md004.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -127,17 +149,17 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD005": {
|
||||
"description": "MD005/list-indent : Inconsistent indentation for list items at the same level : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md005.md",
|
||||
"description": "MD005/list-indent : Inconsistent indentation for list items at the same level : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md005.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"list-indent": {
|
||||
"description": "MD005/list-indent : Inconsistent indentation for list items at the same level : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md005.md",
|
||||
"description": "MD005/list-indent : Inconsistent indentation for list items at the same level : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md005.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"MD007": {
|
||||
"description": "MD007/ul-indent : Unordered list indentation : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md007.md",
|
||||
"description": "MD007/ul-indent : Unordered list indentation : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md007.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -165,7 +187,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"ul-indent": {
|
||||
"description": "MD007/ul-indent : Unordered list indentation : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md007.md",
|
||||
"description": "MD007/ul-indent : Unordered list indentation : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md007.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -193,7 +215,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD009": {
|
||||
"description": "MD009/no-trailing-spaces : Trailing spaces : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md009.md",
|
||||
"description": "MD009/no-trailing-spaces : Trailing spaces : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md009.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -220,7 +242,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"no-trailing-spaces": {
|
||||
"description": "MD009/no-trailing-spaces : Trailing spaces : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md009.md",
|
||||
"description": "MD009/no-trailing-spaces : Trailing spaces : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md009.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -247,7 +269,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD010": {
|
||||
"description": "MD010/no-hard-tabs : Hard tabs : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md010.md",
|
||||
"description": "MD010/no-hard-tabs : Hard tabs : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md010.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -277,7 +299,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"no-hard-tabs": {
|
||||
"description": "MD010/no-hard-tabs : Hard tabs : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md010.md",
|
||||
"description": "MD010/no-hard-tabs : Hard tabs : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md010.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -307,17 +329,17 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD011": {
|
||||
"description": "MD011/no-reversed-links : Reversed link syntax : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md011.md",
|
||||
"description": "MD011/no-reversed-links : Reversed link syntax : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md011.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"no-reversed-links": {
|
||||
"description": "MD011/no-reversed-links : Reversed link syntax : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md011.md",
|
||||
"description": "MD011/no-reversed-links : Reversed link syntax : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md011.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"MD012": {
|
||||
"description": "MD012/no-multiple-blanks : Multiple consecutive blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md012.md",
|
||||
"description": "MD012/no-multiple-blanks : Multiple consecutive blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -334,7 +356,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"no-multiple-blanks": {
|
||||
"description": "MD012/no-multiple-blanks : Multiple consecutive blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md012.md",
|
||||
"description": "MD012/no-multiple-blanks : Multiple consecutive blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -351,7 +373,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD013": {
|
||||
"description": "MD013/line-length : Line length : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md013.md",
|
||||
"description": "MD013/line-length : Line length : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md013.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -405,7 +427,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"line-length": {
|
||||
"description": "MD013/line-length : Line length : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md013.md",
|
||||
"description": "MD013/line-length : Line length : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md013.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -459,57 +481,57 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD014": {
|
||||
"description": "MD014/commands-show-output : Dollar signs used before commands without showing output : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md014.md",
|
||||
"description": "MD014/commands-show-output : Dollar signs used before commands without showing output : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md014.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"commands-show-output": {
|
||||
"description": "MD014/commands-show-output : Dollar signs used before commands without showing output : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md014.md",
|
||||
"description": "MD014/commands-show-output : Dollar signs used before commands without showing output : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md014.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"MD018": {
|
||||
"description": "MD018/no-missing-space-atx : No space after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md018.md",
|
||||
"description": "MD018/no-missing-space-atx : No space after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md018.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"no-missing-space-atx": {
|
||||
"description": "MD018/no-missing-space-atx : No space after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md018.md",
|
||||
"description": "MD018/no-missing-space-atx : No space after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md018.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"MD019": {
|
||||
"description": "MD019/no-multiple-space-atx : Multiple spaces after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md019.md",
|
||||
"description": "MD019/no-multiple-space-atx : Multiple spaces after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md019.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"no-multiple-space-atx": {
|
||||
"description": "MD019/no-multiple-space-atx : Multiple spaces after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md019.md",
|
||||
"description": "MD019/no-multiple-space-atx : Multiple spaces after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md019.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"MD020": {
|
||||
"description": "MD020/no-missing-space-closed-atx : No space inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md020.md",
|
||||
"description": "MD020/no-missing-space-closed-atx : No space inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md020.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"no-missing-space-closed-atx": {
|
||||
"description": "MD020/no-missing-space-closed-atx : No space inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md020.md",
|
||||
"description": "MD020/no-missing-space-closed-atx : No space inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md020.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"MD021": {
|
||||
"description": "MD021/no-multiple-space-closed-atx : Multiple spaces inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md021.md",
|
||||
"description": "MD021/no-multiple-space-closed-atx : Multiple spaces inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md021.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"no-multiple-space-closed-atx": {
|
||||
"description": "MD021/no-multiple-space-closed-atx : Multiple spaces inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md021.md",
|
||||
"description": "MD021/no-multiple-space-closed-atx : Multiple spaces inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md021.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"MD022": {
|
||||
"description": "MD022/blanks-around-headings : Headings should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md022.md",
|
||||
"description": "MD022/blanks-around-headings : Headings should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md022.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -544,7 +566,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"blanks-around-headings": {
|
||||
"description": "MD022/blanks-around-headings : Headings should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md022.md",
|
||||
"description": "MD022/blanks-around-headings : Headings should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md022.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -579,17 +601,17 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD023": {
|
||||
"description": "MD023/heading-start-left : Headings must start at the beginning of the line : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md023.md",
|
||||
"description": "MD023/heading-start-left : Headings must start at the beginning of the line : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md023.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"heading-start-left": {
|
||||
"description": "MD023/heading-start-left : Headings must start at the beginning of the line : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md023.md",
|
||||
"description": "MD023/heading-start-left : Headings must start at the beginning of the line : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md023.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"MD024": {
|
||||
"description": "MD024/no-duplicate-heading : Multiple headings with the same content : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md024.md",
|
||||
"description": "MD024/no-duplicate-heading : Multiple headings with the same content : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md024.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -605,7 +627,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"no-duplicate-heading": {
|
||||
"description": "MD024/no-duplicate-heading : Multiple headings with the same content : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md024.md",
|
||||
"description": "MD024/no-duplicate-heading : Multiple headings with the same content : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md024.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -621,7 +643,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD025": {
|
||||
"description": "MD025/single-title/single-h1 : Multiple top-level headings in the same document : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md025.md",
|
||||
"description": "MD025/single-title/single-h1 : Multiple top-level headings in the same document : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md025.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -644,7 +666,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"single-title": {
|
||||
"description": "MD025/single-title/single-h1 : Multiple top-level headings in the same document : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md025.md",
|
||||
"description": "MD025/single-title/single-h1 : Multiple top-level headings in the same document : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md025.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -667,7 +689,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"single-h1": {
|
||||
"description": "MD025/single-title/single-h1 : Multiple top-level headings in the same document : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md025.md",
|
||||
"description": "MD025/single-title/single-h1 : Multiple top-level headings in the same document : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md025.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -690,7 +712,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD026": {
|
||||
"description": "MD026/no-trailing-punctuation : Trailing punctuation in heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md026.md",
|
||||
"description": "MD026/no-trailing-punctuation : Trailing punctuation in heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md026.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -706,7 +728,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"no-trailing-punctuation": {
|
||||
"description": "MD026/no-trailing-punctuation : Trailing punctuation in heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md026.md",
|
||||
"description": "MD026/no-trailing-punctuation : Trailing punctuation in heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md026.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -722,7 +744,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD027": {
|
||||
"description": "MD027/no-multiple-space-blockquote : Multiple spaces after blockquote symbol : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md027.md",
|
||||
"description": "MD027/no-multiple-space-blockquote : Multiple spaces after blockquote symbol : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md027.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -738,7 +760,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"no-multiple-space-blockquote": {
|
||||
"description": "MD027/no-multiple-space-blockquote : Multiple spaces after blockquote symbol : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md027.md",
|
||||
"description": "MD027/no-multiple-space-blockquote : Multiple spaces after blockquote symbol : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md027.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -754,17 +776,17 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD028": {
|
||||
"description": "MD028/no-blanks-blockquote : Blank line inside blockquote : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md028.md",
|
||||
"description": "MD028/no-blanks-blockquote : Blank line inside blockquote : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md028.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"no-blanks-blockquote": {
|
||||
"description": "MD028/no-blanks-blockquote : Blank line inside blockquote : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md028.md",
|
||||
"description": "MD028/no-blanks-blockquote : Blank line inside blockquote : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md028.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"MD029": {
|
||||
"description": "MD029/ol-prefix : Ordered list item prefix : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md029.md",
|
||||
"description": "MD029/ol-prefix : Ordered list item prefix : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md029.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -786,7 +808,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"ol-prefix": {
|
||||
"description": "MD029/ol-prefix : Ordered list item prefix : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md029.md",
|
||||
"description": "MD029/ol-prefix : Ordered list item prefix : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md029.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -808,7 +830,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD030": {
|
||||
"description": "MD030/list-marker-space : Spaces after list markers : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md030.md",
|
||||
"description": "MD030/list-marker-space : Spaces after list markers : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md030.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -843,7 +865,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"list-marker-space": {
|
||||
"description": "MD030/list-marker-space : Spaces after list markers : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md030.md",
|
||||
"description": "MD030/list-marker-space : Spaces after list markers : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md030.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -878,7 +900,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD031": {
|
||||
"description": "MD031/blanks-around-fences : Fenced code blocks should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md031.md",
|
||||
"description": "MD031/blanks-around-fences : Fenced code blocks should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md031.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -894,7 +916,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"blanks-around-fences": {
|
||||
"description": "MD031/blanks-around-fences : Fenced code blocks should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md031.md",
|
||||
"description": "MD031/blanks-around-fences : Fenced code blocks should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md031.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -910,17 +932,17 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD032": {
|
||||
"description": "MD032/blanks-around-lists : Lists should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md032.md",
|
||||
"description": "MD032/blanks-around-lists : Lists should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md032.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"blanks-around-lists": {
|
||||
"description": "MD032/blanks-around-lists : Lists should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md032.md",
|
||||
"description": "MD032/blanks-around-lists : Lists should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md032.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"MD033": {
|
||||
"description": "MD033/no-inline-html : Inline HTML : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md033.md",
|
||||
"description": "MD033/no-inline-html : Inline HTML : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md033.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -934,12 +956,20 @@
|
|||
"type": "string"
|
||||
},
|
||||
"default": []
|
||||
},
|
||||
"table_allowed_elements": {
|
||||
"description": "Allowed elements in tables",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"default": []
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"no-inline-html": {
|
||||
"description": "MD033/no-inline-html : Inline HTML : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md033.md",
|
||||
"description": "MD033/no-inline-html : Inline HTML : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md033.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -953,22 +983,30 @@
|
|||
"type": "string"
|
||||
},
|
||||
"default": []
|
||||
},
|
||||
"table_allowed_elements": {
|
||||
"description": "Allowed elements in tables",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"default": []
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"MD034": {
|
||||
"description": "MD034/no-bare-urls : Bare URL used : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md034.md",
|
||||
"description": "MD034/no-bare-urls : Bare URL used : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md034.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"no-bare-urls": {
|
||||
"description": "MD034/no-bare-urls : Bare URL used : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md034.md",
|
||||
"description": "MD034/no-bare-urls : Bare URL used : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md034.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"MD035": {
|
||||
"description": "MD035/hr-style : Horizontal rule style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md035.md",
|
||||
"description": "MD035/hr-style : Horizontal rule style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md035.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -984,7 +1022,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"hr-style": {
|
||||
"description": "MD035/hr-style : Horizontal rule style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md035.md",
|
||||
"description": "MD035/hr-style : Horizontal rule style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md035.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1000,7 +1038,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD036": {
|
||||
"description": "MD036/no-emphasis-as-heading : Emphasis used instead of a heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md036.md",
|
||||
"description": "MD036/no-emphasis-as-heading : Emphasis used instead of a heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md036.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1016,7 +1054,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"no-emphasis-as-heading": {
|
||||
"description": "MD036/no-emphasis-as-heading : Emphasis used instead of a heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md036.md",
|
||||
"description": "MD036/no-emphasis-as-heading : Emphasis used instead of a heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md036.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1032,37 +1070,37 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD037": {
|
||||
"description": "MD037/no-space-in-emphasis : Spaces inside emphasis markers : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md037.md",
|
||||
"description": "MD037/no-space-in-emphasis : Spaces inside emphasis markers : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md037.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"no-space-in-emphasis": {
|
||||
"description": "MD037/no-space-in-emphasis : Spaces inside emphasis markers : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md037.md",
|
||||
"description": "MD037/no-space-in-emphasis : Spaces inside emphasis markers : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md037.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"MD038": {
|
||||
"description": "MD038/no-space-in-code : Spaces inside code span elements : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md038.md",
|
||||
"description": "MD038/no-space-in-code : Spaces inside code span elements : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md038.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"no-space-in-code": {
|
||||
"description": "MD038/no-space-in-code : Spaces inside code span elements : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md038.md",
|
||||
"description": "MD038/no-space-in-code : Spaces inside code span elements : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md038.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"MD039": {
|
||||
"description": "MD039/no-space-in-links : Spaces inside link text : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md039.md",
|
||||
"description": "MD039/no-space-in-links : Spaces inside link text : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md039.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"no-space-in-links": {
|
||||
"description": "MD039/no-space-in-links : Spaces inside link text : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md039.md",
|
||||
"description": "MD039/no-space-in-links : Spaces inside link text : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md039.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"MD040": {
|
||||
"description": "MD040/fenced-code-language : Fenced code blocks should have a language specified : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md040.md",
|
||||
"description": "MD040/fenced-code-language : Fenced code blocks should have a language specified : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md040.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1086,7 +1124,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"fenced-code-language": {
|
||||
"description": "MD040/fenced-code-language : Fenced code blocks should have a language specified : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md040.md",
|
||||
"description": "MD040/fenced-code-language : Fenced code blocks should have a language specified : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md040.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1110,7 +1148,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD041": {
|
||||
"description": "MD041/first-line-heading/first-line-h1 : First line in a file should be a top-level heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md041.md",
|
||||
"description": "MD041/first-line-heading/first-line-h1 : First line in a file should be a top-level heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md041.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1138,7 +1176,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"first-line-heading": {
|
||||
"description": "MD041/first-line-heading/first-line-h1 : First line in a file should be a top-level heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md041.md",
|
||||
"description": "MD041/first-line-heading/first-line-h1 : First line in a file should be a top-level heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md041.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1166,7 +1204,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"first-line-h1": {
|
||||
"description": "MD041/first-line-heading/first-line-h1 : First line in a file should be a top-level heading : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md041.md",
|
||||
"description": "MD041/first-line-heading/first-line-h1 : First line in a file should be a top-level heading : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md041.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1194,17 +1232,17 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD042": {
|
||||
"description": "MD042/no-empty-links : No empty links : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md042.md",
|
||||
"description": "MD042/no-empty-links : No empty links : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md042.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"no-empty-links": {
|
||||
"description": "MD042/no-empty-links : No empty links : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md042.md",
|
||||
"description": "MD042/no-empty-links : No empty links : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md042.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"MD043": {
|
||||
"description": "MD043/required-headings : Required heading structure : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md043.md",
|
||||
"description": "MD043/required-headings : Required heading structure : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md043.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1229,7 +1267,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"required-headings": {
|
||||
"description": "MD043/required-headings : Required heading structure : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md043.md",
|
||||
"description": "MD043/required-headings : Required heading structure : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md043.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1254,7 +1292,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD044": {
|
||||
"description": "MD044/proper-names : Proper names should have the correct capitalization : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md044.md",
|
||||
"description": "MD044/proper-names : Proper names should have the correct capitalization : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md044.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1283,7 +1321,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"proper-names": {
|
||||
"description": "MD044/proper-names : Proper names should have the correct capitalization : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md044.md",
|
||||
"description": "MD044/proper-names : Proper names should have the correct capitalization : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md044.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1312,17 +1350,17 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD045": {
|
||||
"description": "MD045/no-alt-text : Images should have alternate text (alt text) : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md045.md",
|
||||
"description": "MD045/no-alt-text : Images should have alternate text (alt text) : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md045.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"no-alt-text": {
|
||||
"description": "MD045/no-alt-text : Images should have alternate text (alt text) : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md045.md",
|
||||
"description": "MD045/no-alt-text : Images should have alternate text (alt text) : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md045.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"MD046": {
|
||||
"description": "MD046/code-block-style : Code block style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md046.md",
|
||||
"description": "MD046/code-block-style : Code block style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md046.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1343,7 +1381,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"code-block-style": {
|
||||
"description": "MD046/code-block-style : Code block style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md046.md",
|
||||
"description": "MD046/code-block-style : Code block style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md046.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1364,17 +1402,17 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD047": {
|
||||
"description": "MD047/single-trailing-newline : Files should end with a single newline character : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md047.md",
|
||||
"description": "MD047/single-trailing-newline : Files should end with a single newline character : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md047.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"single-trailing-newline": {
|
||||
"description": "MD047/single-trailing-newline : Files should end with a single newline character : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md047.md",
|
||||
"description": "MD047/single-trailing-newline : Files should end with a single newline character : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md047.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"MD048": {
|
||||
"description": "MD048/code-fence-style : Code fence style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md048.md",
|
||||
"description": "MD048/code-fence-style : Code fence style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md048.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1395,7 +1433,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"code-fence-style": {
|
||||
"description": "MD048/code-fence-style : Code fence style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md048.md",
|
||||
"description": "MD048/code-fence-style : Code fence style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md048.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1416,7 +1454,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD049": {
|
||||
"description": "MD049/emphasis-style : Emphasis style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md049.md",
|
||||
"description": "MD049/emphasis-style : Emphasis style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md049.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1437,7 +1475,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"emphasis-style": {
|
||||
"description": "MD049/emphasis-style : Emphasis style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md049.md",
|
||||
"description": "MD049/emphasis-style : Emphasis style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md049.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1458,7 +1496,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD050": {
|
||||
"description": "MD050/strong-style : Strong style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md050.md",
|
||||
"description": "MD050/strong-style : Strong style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md050.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1479,7 +1517,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"strong-style": {
|
||||
"description": "MD050/strong-style : Strong style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md050.md",
|
||||
"description": "MD050/strong-style : Strong style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md050.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1500,7 +1538,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD051": {
|
||||
"description": "MD051/link-fragments : Link fragments should be valid : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md051.md",
|
||||
"description": "MD051/link-fragments : Link fragments should be valid : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md051.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1511,12 +1549,17 @@
|
|||
"description": "Ignore case of fragments",
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"ignored_pattern": {
|
||||
"description": "Pattern for ignoring additional fragments",
|
||||
"type": "string",
|
||||
"default": ""
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"link-fragments": {
|
||||
"description": "MD051/link-fragments : Link fragments should be valid : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md051.md",
|
||||
"description": "MD051/link-fragments : Link fragments should be valid : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md051.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1527,18 +1570,33 @@
|
|||
"description": "Ignore case of fragments",
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"ignored_pattern": {
|
||||
"description": "Pattern for ignoring additional fragments",
|
||||
"type": "string",
|
||||
"default": ""
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"MD052": {
|
||||
"description": "MD052/reference-links-images : Reference links and images should use a label that is defined : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md052.md",
|
||||
"description": "MD052/reference-links-images : Reference links and images should use a label that is defined : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md052.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
],
|
||||
"default": true,
|
||||
"properties": {
|
||||
"ignored_labels": {
|
||||
"description": "Ignored link labels",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"default": [
|
||||
"x"
|
||||
]
|
||||
},
|
||||
"shortcut_syntax": {
|
||||
"description": "Include shortcut syntax",
|
||||
"type": "boolean",
|
||||
|
|
@ -1548,13 +1606,23 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"reference-links-images": {
|
||||
"description": "MD052/reference-links-images : Reference links and images should use a label that is defined : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md052.md",
|
||||
"description": "MD052/reference-links-images : Reference links and images should use a label that is defined : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md052.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
],
|
||||
"default": true,
|
||||
"properties": {
|
||||
"ignored_labels": {
|
||||
"description": "Ignored link labels",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"default": [
|
||||
"x"
|
||||
]
|
||||
},
|
||||
"shortcut_syntax": {
|
||||
"description": "Include shortcut syntax",
|
||||
"type": "boolean",
|
||||
|
|
@ -1564,7 +1632,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD053": {
|
||||
"description": "MD053/link-image-reference-definitions : Link and image reference definitions should be needed : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md053.md",
|
||||
"description": "MD053/link-image-reference-definitions : Link and image reference definitions should be needed : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md053.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1585,7 +1653,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"link-image-reference-definitions": {
|
||||
"description": "MD053/link-image-reference-definitions : Link and image reference definitions should be needed : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md053.md",
|
||||
"description": "MD053/link-image-reference-definitions : Link and image reference definitions should be needed : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md053.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1606,7 +1674,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD054": {
|
||||
"description": "MD054/link-image-style : Link and image style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md054.md",
|
||||
"description": "MD054/link-image-style : Link and image style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md054.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1647,7 +1715,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"link-image-style": {
|
||||
"description": "MD054/link-image-style : Link and image style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md054.md",
|
||||
"description": "MD054/link-image-style : Link and image style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md054.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1688,7 +1756,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD055": {
|
||||
"description": "MD055/table-pipe-style : Table pipe style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md055.md",
|
||||
"description": "MD055/table-pipe-style : Table pipe style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md055.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1711,7 +1779,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"table-pipe-style": {
|
||||
"description": "MD055/table-pipe-style : Table pipe style : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md055.md",
|
||||
"description": "MD055/table-pipe-style : Table pipe style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md055.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1734,27 +1802,27 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD056": {
|
||||
"description": "MD056/table-column-count : Table column count : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md056.md",
|
||||
"description": "MD056/table-column-count : Table column count : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md056.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"table-column-count": {
|
||||
"description": "MD056/table-column-count : Table column count : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md056.md",
|
||||
"description": "MD056/table-column-count : Table column count : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md056.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"MD058": {
|
||||
"description": "MD058/blanks-around-tables : Tables should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md058.md",
|
||||
"description": "MD058/blanks-around-tables : Tables should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md058.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"blanks-around-tables": {
|
||||
"description": "MD058/blanks-around-tables : Tables should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md058.md",
|
||||
"description": "MD058/blanks-around-tables : Tables should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md058.md",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"MD059": {
|
||||
"description": "MD059/descriptive-link-text : Link text should be descriptive : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md059.md",
|
||||
"description": "MD059/descriptive-link-text : Link text should be descriptive : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md059.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1778,7 +1846,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"descriptive-link-text": {
|
||||
"description": "MD059/descriptive-link-text : Link text should be descriptive : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md059.md",
|
||||
"description": "MD059/descriptive-link-text : Link text should be descriptive : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md059.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -1801,6 +1869,50 @@
|
|||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"MD060": {
|
||||
"description": "MD060/table-column-style : Table column style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md060.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
],
|
||||
"default": true,
|
||||
"properties": {
|
||||
"style": {
|
||||
"description": "Table column style",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"any",
|
||||
"aligned",
|
||||
"compact",
|
||||
"tight"
|
||||
],
|
||||
"default": "any"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"table-column-style": {
|
||||
"description": "MD060/table-column-style : Table column style : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md060.md",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
],
|
||||
"default": true,
|
||||
"properties": {
|
||||
"style": {
|
||||
"description": "Table column style",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"any",
|
||||
"aligned",
|
||||
"compact",
|
||||
"tight"
|
||||
],
|
||||
"default": "any"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"headings": {
|
||||
"description": "headings : MD001, MD003, MD018, MD019, MD020, MD021, MD022, MD023, MD024, MD025, MD026, MD036, MD041, MD043",
|
||||
"type": "boolean",
|
||||
|
|
@ -1917,7 +2029,7 @@
|
|||
"default": true
|
||||
},
|
||||
"table": {
|
||||
"description": "table : MD055, MD056, MD058",
|
||||
"description": "table : MD055, MD056, MD058, MD060",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// @ts-check
|
||||
|
||||
// eslint-disable-next-line n/no-unsupported-features/node-builtins
|
||||
import { constants, copyFile, rm, unlink } from "node:fs/promises";
|
||||
import { globby } from "globby";
|
||||
|
||||
|
|
@ -19,7 +18,7 @@ if (command === "copy") {
|
|||
)
|
||||
);
|
||||
} else if (command === "remove") {
|
||||
await Promise.all(args.map((dir) => rm(dir, { "recursive": true })));
|
||||
await Promise.all(args.map((dir) => rm(dir, { "force": true, "recursive": true })));
|
||||
} else {
|
||||
throw new Error(`Unsupported command: ${command}`);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -107,7 +107,9 @@ Strong **with** different style {MD050}
|
|||
|
||||
| table | header |
|
||||
|--------|--------|
|
||||
{MD055} | cell |
|
||||
{MD055} | cell |
|
||||
|
||||
{MD060:-2}
|
||||
|
||||
| table | header |
|
||||
|---------|--------|
|
||||
|
|
@ -115,10 +117,12 @@ Strong **with** different style {MD050}
|
|||
|
||||
Text
|
||||
| table {MD058} |
|
||||
|-------|
|
||||
| ------- |
|
||||
| cell {MD058} |
|
||||
> Blockquote
|
||||
|
||||
[click here](https://example.org) {MD059}
|
||||
|
||||
<!-- markdownlint-configure-file {
|
||||
"required-headings": {
|
||||
"headings": [
|
||||
|
|
|
|||
39
test/docfx-tab-syntax.md
Normal file
39
test/docfx-tab-syntax.md
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
# Docfx Tab Syntax
|
||||
|
||||
Examples copied from: <https://dotnet.github.io/docfx/docs/markdown.html?tabs=linux%2Cdotnet#tabs>
|
||||
|
||||
---
|
||||
|
||||
# [Tab Display Name](#tab/tab-id)
|
||||
|
||||
---
|
||||
|
||||
# [Linux](#tab/linux)
|
||||
|
||||
Content for Linux...
|
||||
|
||||
# [Windows](#tab/windows)
|
||||
|
||||
Content for Windows...
|
||||
|
||||
---
|
||||
|
||||
# [.NET](#tab/dotnet/linux)
|
||||
|
||||
.NET content for Linux...
|
||||
|
||||
# [.NET](#tab/dotnet/windows)
|
||||
|
||||
.NET content for Windows...
|
||||
|
||||
# [TypeScript](#tab/typescript/linux)
|
||||
|
||||
TypeScript content for Linux...
|
||||
|
||||
# [TypeScript](#tab/typescript/windows)
|
||||
|
||||
TypeScript content for Windows...
|
||||
|
||||
# [REST API](#tab/rest)
|
||||
|
||||
REST API content, independent of platform...
|
||||
|
|
@ -44,3 +44,15 @@ detected as a heading because it's on multiple lines**
|
|||
**This shouldn't be detected as a heading as it ends in full-width punctuation。**
|
||||
|
||||
**[This as well since it is a link](https://example.com)**
|
||||
|
||||
*Section 4: emphasis as heading {MD036}* <!-- comment -->
|
||||
|
||||
Emphasis as heading followed by an HTML comment
|
||||
|
||||
<!-- comment --> __Section 5: emphasis as heading {MD036}__
|
||||
|
||||
Emphasis as heading following an HTML comment
|
||||
|
||||
*Section 6: emphasis <!-- comment --> as non-heading*
|
||||
|
||||
Embedded HTML comments are unusual and cause the emphasis to be ignored/allowed
|
||||
|
|
|
|||
14
test/heading_increment-alt_title_level3_bad.md
Normal file
14
test/heading_increment-alt_title_level3_bad.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
alternate = heading_increment-alt_title_level3_bad
|
||||
---
|
||||
|
||||
### level 3 {MD001}
|
||||
|
||||
<!-- markdownlint-configure-file {
|
||||
"heading-increment": {
|
||||
"front_matter_title": "^\\s*alternate\\s*="
|
||||
},
|
||||
"first-line-heading": {
|
||||
"front_matter_title": "^\\s*alternate\\s*="
|
||||
}
|
||||
} -->
|
||||
7
test/heading_increment-title_level2_good.md
Normal file
7
test/heading_increment-title_level2_good.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
title: heading_increment-title_level2_good
|
||||
---
|
||||
|
||||
## level 2
|
||||
|
||||
### level 3
|
||||
5
test/heading_increment-title_level3_bad.md
Normal file
5
test/heading_increment-title_level3_bad.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: heading_increment-title_level3_bad
|
||||
---
|
||||
|
||||
### level 3 {MD001}
|
||||
|
|
@ -53,5 +53,6 @@
|
|||
| cell | cell |
|
||||
|
||||
<!-- markdownlint-configure-file {
|
||||
"table-column-style": false,
|
||||
"table-pipe-style": false
|
||||
} -->
|
||||
|
|
|
|||
|
|
@ -54,6 +54,11 @@ This is not allowed.
|
|||
<Br/> {MD033}
|
||||
</P>
|
||||
|
||||
| Allowed | Not Allowed |
|
||||
| ------- | ------------ |
|
||||
| <h1> | |
|
||||
| | <br> {MD033} |
|
||||
|
||||
<!-- markdownlint-configure-file {
|
||||
"no-inline-html": {
|
||||
"allowed_elements": [
|
||||
|
|
|
|||
27
test/inline_html-only_table_allowed_elements.md
Normal file
27
test/inline_html-only_table_allowed_elements.md
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
# inline_html-only_table_allowed_elements.md
|
||||
|
||||
<h1>This is not allowed {MD033}</h1>
|
||||
|
||||
<br> This is not allowed {MD033}
|
||||
|
||||
<br/> This is not allowed {MD033}
|
||||
|
||||
| Allowed | Not Allowed |
|
||||
| ------------------- | ------------------ |
|
||||
| <br> | |
|
||||
| <br/> | |
|
||||
| <table><br></table> | |
|
||||
| | <h1> {MD033} </h1> |
|
||||
|
||||
<table> {MD033}
|
||||
<br/> {MD033}
|
||||
</table>
|
||||
|
||||
<!-- markdownlint-configure-file {
|
||||
"no-inline-html": {
|
||||
"table_allowed_elements": [
|
||||
"br",
|
||||
"tAbLE"
|
||||
]
|
||||
}
|
||||
} -->
|
||||
33
test/inline_html-table_allowed_elements.md
Normal file
33
test/inline_html-table_allowed_elements.md
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
# inline_html-table_allowed_elements.md
|
||||
|
||||
<h1>This is allowed</h1>
|
||||
|
||||
<h2>This is not allowed {MD033}</h2>
|
||||
|
||||
<br> This is not allowed {MD033}
|
||||
|
||||
<br/> This is not allowed {MD033}
|
||||
|
||||
| Allowed | Not Allowed |
|
||||
| ------------------- | ------------------ |
|
||||
| <br> | |
|
||||
| <br/> | |
|
||||
| <table><br></table> | |
|
||||
| | <h1> {MD033} </h1> |
|
||||
|
||||
<table>
|
||||
<br/> {MD033}
|
||||
</table>
|
||||
|
||||
<!-- markdownlint-configure-file {
|
||||
"no-inline-html": {
|
||||
"allowed_elements": [
|
||||
"h1",
|
||||
"tAbLE"
|
||||
],
|
||||
"table_allowed_elements": [
|
||||
"br",
|
||||
"tAbLE"
|
||||
]
|
||||
}
|
||||
} -->
|
||||
9
test/link-fragments-ignored-pattern-default.md
Normal file
9
test/link-fragments-ignored-pattern-default.md
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# Link Fragments Ignored Pattern Default
|
||||
|
||||
## Heading
|
||||
|
||||
[Present](#heading)
|
||||
|
||||
[Ignored](#ignored) {MD051}
|
||||
|
||||
[Missing](#missing) {MD051}
|
||||
15
test/link-fragments-ignored-pattern-empty.md
Normal file
15
test/link-fragments-ignored-pattern-empty.md
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
# Link Fragments Ignored Pattern Empty
|
||||
|
||||
## Heading
|
||||
|
||||
[Present](#heading)
|
||||
|
||||
[Ignored](#ignored) {MD051}
|
||||
|
||||
[Missing](#missing) {MD051}
|
||||
|
||||
<!-- markdownlint-configure-file {
|
||||
"link-fragments": {
|
||||
"ignored_pattern": ""
|
||||
}
|
||||
} -->
|
||||
15
test/link-fragments-ignored-pattern-multiple.md
Normal file
15
test/link-fragments-ignored-pattern-multiple.md
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
# Link Fragments Ignored Pattern Multiple
|
||||
|
||||
## Heading
|
||||
|
||||
[Present](#heading)
|
||||
|
||||
[Ignored](#ignored)
|
||||
|
||||
[Missing](#missing)
|
||||
|
||||
<!-- markdownlint-configure-file {
|
||||
"link-fragments": {
|
||||
"ignored_pattern": "^igno|^missing$"
|
||||
}
|
||||
} -->
|
||||
15
test/link-fragments-ignored-pattern-present.md
Normal file
15
test/link-fragments-ignored-pattern-present.md
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
# Link Fragments Ignored Pattern Present
|
||||
|
||||
## Heading
|
||||
|
||||
[Present](#heading)
|
||||
|
||||
[Ignored](#ignored)
|
||||
|
||||
[Missing](#missing) {MD051}
|
||||
|
||||
<!-- markdownlint-configure-file {
|
||||
"link-fragments": {
|
||||
"ignored_pattern": "^igno"
|
||||
}
|
||||
} -->
|
||||
22
test/lists-inside-footnote.md
Normal file
22
test/lists-inside-footnote.md
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# Lists Inside Footnote
|
||||
|
||||
Text.[^ref]
|
||||
|
||||
[^ref]: Note and list:
|
||||
|
||||
* Item
|
||||
* Item
|
||||
* Item
|
||||
|
||||
1. Item
|
||||
1. Item
|
||||
1. Item
|
||||
|
||||
Text
|
||||
|
||||
* Item
|
||||
* Item {MD005} {MD007}
|
||||
* Item
|
||||
* Item
|
||||
* Item {MD005} {MD007}
|
||||
* Item
|
||||
|
|
@ -24,6 +24,7 @@ test("customRulesV0", (t) => new Promise((resolve) => {
|
|||
"customRules": customRules.all,
|
||||
"files": [ customRulesMd ],
|
||||
markdownItFactory,
|
||||
// @ts-ignore
|
||||
"resultVersion": 0
|
||||
};
|
||||
lintAsync(options, function callback(err, actualResult) {
|
||||
|
|
@ -97,6 +98,7 @@ test("customRulesV1", (t) => new Promise((resolve) => {
|
|||
"customRules": customRules.all,
|
||||
"files": [ customRulesMd ],
|
||||
markdownItFactory,
|
||||
// @ts-ignore
|
||||
"resultVersion": 1
|
||||
};
|
||||
lintAsync(options, function callback(err, actualResult) {
|
||||
|
|
@ -229,6 +231,7 @@ test("customRulesV2", (t) => new Promise((resolve) => {
|
|||
"customRules": customRules.all,
|
||||
"files": [ customRulesMd ],
|
||||
markdownItFactory,
|
||||
// @ts-ignore
|
||||
"resultVersion": 2
|
||||
};
|
||||
lintAsync(options, function callback(err, actualResult) {
|
||||
|
|
@ -358,6 +361,7 @@ test("customRulesConfig", (t) => new Promise((resolve) => {
|
|||
"letters-e-x": false
|
||||
},
|
||||
markdownItFactory,
|
||||
// @ts-ignore
|
||||
"resultVersion": 0
|
||||
};
|
||||
lintAsync(options, function callback(err, actualResult) {
|
||||
|
|
@ -387,6 +391,7 @@ test("customRulesNpmPackage", (t) => new Promise((resolve) => {
|
|||
"strings": {
|
||||
"string": "# Text\n\n---\n\nText ✅\n"
|
||||
},
|
||||
// @ts-ignore
|
||||
"resultVersion": 0
|
||||
};
|
||||
lintAsync(options, function callback(err, actualResult) {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import path from "node:path";
|
|||
import test from "ava";
|
||||
import { characterEntities } from "character-entities";
|
||||
import { gemoji } from "gemoji";
|
||||
import helpers from "../helpers/helpers.cjs";
|
||||
import helpers, { formatLintResults } from "../helpers/helpers.cjs";
|
||||
import { lint } from "markdownlint/promise";
|
||||
import { forEachInlineCodeSpan } from "../lib/markdownit.cjs";
|
||||
import { getReferenceLinkImageData } from "../lib/cache.mjs";
|
||||
|
|
@ -529,3 +529,18 @@ test("hasOverlap", (t) => {
|
|||
t.false(helpers.hasOverlap(rangeB, rangeA), JSON.stringify({ rangeB, rangeA }));
|
||||
}
|
||||
});
|
||||
|
||||
test("formatLintResults", async(t) => {
|
||||
t.plan(2);
|
||||
t.deepEqual(formatLintResults(undefined), []);
|
||||
const lintResults = await lint({ "strings": { "content": "# Heading\n<br/>" } });
|
||||
t.deepEqual(
|
||||
formatLintResults(lintResults),
|
||||
[
|
||||
"content:1:3 MD019/no-multiple-space-atx Multiple spaces after hash on atx style heading [Context: \"# Heading\"]",
|
||||
"content:1 MD022/blanks-around-headings Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: \"# Heading\"]",
|
||||
"content:2:1 MD033/no-inline-html Inline HTML [Element: br]",
|
||||
"content:2:5 MD047/single-trailing-newline Files should end with a single newline character"
|
||||
]
|
||||
);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// @ts-check
|
||||
|
||||
// eslint-disable-next-line n/no-unsupported-features/node-builtins
|
||||
import { availableParallelism } from "node:os";
|
||||
import { Worker } from "node:worker_threads";
|
||||
import { lint } from "markdownlint/sync";
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ const files = await globby(projectFiles);
|
|||
|
||||
test("projectFiles", (t) => {
|
||||
t.plan(2);
|
||||
t.is(files.length, 61);
|
||||
t.is(files.length, 62);
|
||||
const options = {
|
||||
files,
|
||||
"config": require("../.markdownlint.json")
|
||||
|
|
@ -40,7 +40,7 @@ test("projectFilesExtendedAscii", (t) => {
|
|||
"doc/md036.md"
|
||||
]);
|
||||
const filteredFiles = files.filter((file) => !ignoreFiles.has(file));
|
||||
t.is(filteredFiles.length, 57);
|
||||
t.is(filteredFiles.length, 58);
|
||||
const options = {
|
||||
"files": filteredFiles,
|
||||
"config": require("../.markdownlint.json"),
|
||||
|
|
|
|||
|
|
@ -9,5 +9,5 @@ test("https://github.com/dotnet/docs", (t) => {
|
|||
const rootDir = "./test-repos/dotnet-docs";
|
||||
const globPatterns = [ join(rootDir, "**/*.md") ];
|
||||
const configPath = join(rootDir, ".markdownlint-cli2.jsonc");
|
||||
return lintTestRepo(t, globPatterns, configPath, true);
|
||||
return lintTestRepo(t, globPatterns, configPath, { "table-column-style": false }, true);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -9,5 +9,5 @@ test("https://github.com/mdn/content", (t) => {
|
|||
const rootDir = "./test-repos/mdn-content";
|
||||
const globPatterns = [ join(rootDir, "**/*.md") ];
|
||||
const configPath = join(rootDir, ".markdownlint-cli2.jsonc");
|
||||
return lintTestRepo(t, globPatterns, configPath, true);
|
||||
return lintTestRepo(t, globPatterns, configPath, { "table-column-style": false }, true);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -5,19 +5,23 @@ const { join } = path.posix;
|
|||
import { globby } from "globby";
|
||||
import jsoncParser from "jsonc-parser";
|
||||
import jsYaml from "js-yaml";
|
||||
import { formatLintResults } from "markdownlint/helpers";
|
||||
import { lint, readConfig } from "markdownlint/promise";
|
||||
import { markdownlintParallel } from "./markdownlint-test-parallel.mjs";
|
||||
|
||||
/** @typedef {import("markdownlint").Configuration} Configuration */
|
||||
|
||||
/**
|
||||
* Lints a test repository.
|
||||
*
|
||||
* @param {Object} t Test instance.
|
||||
* @param {string[]} globPatterns Array of files to in/exclude.
|
||||
* @param {string} configPath Path to config file.
|
||||
* @param {Configuration} [configOverrides] Configuration overrides.
|
||||
* @param {boolean} [parallel] True to lint in parallel.
|
||||
* @returns {Promise} Test result.
|
||||
*/
|
||||
export function lintTestRepo(t, globPatterns, configPath, parallel) {
|
||||
export function lintTestRepo(t, globPatterns, configPath, configOverrides, parallel) {
|
||||
t.plan(1);
|
||||
const jsoncParse = (json) => {
|
||||
const config = jsoncParser.parse(json, [], { "allowTrailingComma": true });
|
||||
|
|
@ -31,20 +35,23 @@ export function lintTestRepo(t, globPatterns, configPath, parallel) {
|
|||
const [ files, rawConfig ] = globbyAndReadConfigResults;
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(`${t.title}: Linting ${files.length} files...`);
|
||||
const config = Object.fromEntries(
|
||||
const cookedConfig = Object.fromEntries(
|
||||
Object.entries(rawConfig)
|
||||
.map(([ k, v ]) => [
|
||||
k.replace(/header/, "heading"),
|
||||
v
|
||||
])
|
||||
);
|
||||
const config = {
|
||||
...cookedConfig,
|
||||
...configOverrides
|
||||
};
|
||||
return (parallel ? markdownlintParallel : lint)({
|
||||
files,
|
||||
config
|
||||
}).then((results) => {
|
||||
const resultsString = results.toString();
|
||||
t.snapshot(
|
||||
resultsString,
|
||||
formatLintResults(results).join("\n"),
|
||||
"Expected linting violations"
|
||||
);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -2,7 +2,9 @@
|
|||
|
||||
import test from "ava";
|
||||
import { lint as lintAsync } from "markdownlint/async";
|
||||
import { lint as lintPromise } from "markdownlint/promise";
|
||||
import { lint as lintSync } from "markdownlint/sync";
|
||||
import { convertToResultVersion0, convertToResultVersion1, convertToResultVersion2 } from "markdownlint/helpers";
|
||||
import { importWithTypeJson } from "./esm-helpers.mjs";
|
||||
const packageJson = await importWithTypeJson(import.meta, "../package.json");
|
||||
const { homepage, version } = packageJson;
|
||||
|
|
@ -405,7 +407,7 @@ test("resultFormattingV3", (t) => new Promise((resolve) => {
|
|||
"ruleInformation": `${homepage}/blob/v${version}/doc/md037.md`,
|
||||
"errorDetail": null,
|
||||
"errorContext": "* e",
|
||||
"errorRange": [ 6, 3 ],
|
||||
"errorRange": [ 7, 1 ],
|
||||
"fixInfo": {
|
||||
"editColumn": 7,
|
||||
"deleteCount": 1
|
||||
|
|
@ -418,7 +420,7 @@ test("resultFormattingV3", (t) => new Promise((resolve) => {
|
|||
"ruleInformation": `${homepage}/blob/v${version}/doc/md037.md`,
|
||||
"errorDetail": null,
|
||||
"errorContext": "s *",
|
||||
"errorRange": [ 15, 3 ],
|
||||
"errorRange": [ 16, 1 ],
|
||||
"fixInfo": {
|
||||
"editColumn": 16,
|
||||
"deleteCount": 1
|
||||
|
|
@ -623,3 +625,40 @@ test("frontMatterResultVersion3", (t) => new Promise((resolve) => {
|
|||
resolve();
|
||||
});
|
||||
}));
|
||||
|
||||
test("convertToResultVersionN", async(t) => {
|
||||
t.plan(8);
|
||||
const options = {
|
||||
"files": [
|
||||
"./test/break-all-the-rules.md",
|
||||
"./test/inline-disable-enable.md"
|
||||
],
|
||||
"strings": {
|
||||
"first": "# Heading",
|
||||
"second": "## Heading"
|
||||
}
|
||||
};
|
||||
const [ base, version3, version2, version1, version0 ] = await Promise.all([
|
||||
lintPromise(options),
|
||||
// @ts-ignore
|
||||
lintPromise({ ...options, "resultVersion": 3 }),
|
||||
// @ts-ignore
|
||||
lintPromise({ ...options, "resultVersion": 2 }),
|
||||
// @ts-ignore
|
||||
lintPromise({ ...options, "resultVersion": 1 }),
|
||||
// @ts-ignore
|
||||
lintPromise({ ...options, "resultVersion": 0 })
|
||||
]);
|
||||
const v3 = version3;
|
||||
t.deepEqual(v3, base);
|
||||
t.is(v3.toString(), base.toString());
|
||||
const v2 = convertToResultVersion2(base);
|
||||
t.deepEqual(v2, version2);
|
||||
t.is(v2.toString(), version2.toString());
|
||||
const v1 = convertToResultVersion1(base);
|
||||
t.deepEqual(v1, version1);
|
||||
t.is(v1.toString(), version1.toString());
|
||||
const v0 = convertToResultVersion0(base);
|
||||
t.deepEqual(v0, version0);
|
||||
t.is(v0.toString(), version0.toString());
|
||||
});
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ function createTestForFile(file) {
|
|||
.filter((error) => !!error.ruleInformation);
|
||||
for (const error of errors) {
|
||||
error.ruleInformation =
|
||||
error.ruleInformation.replace(/v\d+\.\d+\.\d+/, "v0.0.0");
|
||||
error.ruleInformation.replace(/v\d+\.\d+\.\d+/, "v0.0.0");
|
||||
}
|
||||
// Match identified issues by MD### markers
|
||||
const marker = /\{(MD\d+)(?::([-+]?)(\d+))?\}/g;
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ import { getVersion } from "markdownlint";
|
|||
import { lint as lintAsync } from "markdownlint/async";
|
||||
import { lint as lintPromise } from "markdownlint/promise";
|
||||
import { lint as lintSync } from "markdownlint/sync";
|
||||
import * as cache from "../lib/cache.mjs";
|
||||
import * as constants from "../lib/constants.mjs";
|
||||
import rules from "../lib/rules.mjs";
|
||||
import customRules from "./rules/rules.cjs";
|
||||
|
|
@ -48,46 +49,42 @@ function getMarkdownItFactory(markdownItPlugins) {
|
|||
}
|
||||
|
||||
test("simpleAsync", (t) => new Promise((resolve) => {
|
||||
t.plan(3);
|
||||
const options = {
|
||||
"strings": {
|
||||
"content": "# Heading"
|
||||
}
|
||||
};
|
||||
lintAsync(options, (err, actual) => {
|
||||
t.falsy(err);
|
||||
t.is(actual?.content.length, 1);
|
||||
t.is(actual?.content[0].ruleNames[0], "MD047");
|
||||
resolve();
|
||||
});
|
||||
}));
|
||||
|
||||
test("simpleSync", (t) => {
|
||||
t.plan(2);
|
||||
const options = {
|
||||
"strings": {
|
||||
"content": "# Heading"
|
||||
}
|
||||
};
|
||||
const expected = "content: 1: MD047/single-trailing-newline " +
|
||||
"Files should end with a single newline character";
|
||||
lintAsync(options, (err, actual) => {
|
||||
t.falsy(err);
|
||||
// @ts-ignore
|
||||
t.is(actual.toString(), expected, "Unexpected results.");
|
||||
resolve();
|
||||
});
|
||||
}));
|
||||
|
||||
test("simpleSync", (t) => {
|
||||
t.plan(1);
|
||||
const options = {
|
||||
"strings": {
|
||||
"content": "# Heading"
|
||||
}
|
||||
};
|
||||
const expected = "content: 1: MD047/single-trailing-newline " +
|
||||
"Files should end with a single newline character";
|
||||
const actual = lintSync(options).toString();
|
||||
t.is(actual, expected, "Unexpected results.");
|
||||
const actual = lintSync(options);
|
||||
t.is(actual.content.length, 1);
|
||||
t.is(actual.content[0].ruleNames[0], "MD047");
|
||||
});
|
||||
|
||||
test("simplePromise", (t) => {
|
||||
t.plan(1);
|
||||
t.plan(2);
|
||||
const options = {
|
||||
"strings": {
|
||||
"content": "# Heading"
|
||||
}
|
||||
};
|
||||
const expected = "content: 1: MD047/single-trailing-newline " +
|
||||
"Files should end with a single newline character";
|
||||
return lintPromise(options).then((actual) => {
|
||||
t.is(actual.toString(), expected, "Unexpected results.");
|
||||
t.is(actual.content.length, 1);
|
||||
t.is(actual.content[0].ruleNames[0], "MD047");
|
||||
});
|
||||
});
|
||||
|
||||
|
|
@ -467,7 +464,7 @@ test("styleAll", async(t) => {
|
|||
"MD042": [ 81 ],
|
||||
"MD045": [ 85 ],
|
||||
"MD046": [ 49, 73, 77 ],
|
||||
"MD047": [ 140 ],
|
||||
"MD047": [ 144 ],
|
||||
"MD048": [ 77 ],
|
||||
"MD049": [ 90 ],
|
||||
"MD050": [ 94 ],
|
||||
|
|
@ -475,8 +472,10 @@ test("styleAll", async(t) => {
|
|||
"MD052": [ 98 ],
|
||||
"MD053": [ 100 ],
|
||||
"MD055": [ 110 ],
|
||||
"MD056": [ 114 ],
|
||||
"MD058": [ 117, 119 ]
|
||||
"MD056": [ 116 ],
|
||||
"MD058": [ 119, 121 ],
|
||||
"MD059": [ 124 ],
|
||||
"MD060": [ 110 ]
|
||||
}
|
||||
};
|
||||
t.deepEqual(actualResult, expectedResult, "Undetected issues.");
|
||||
|
|
@ -515,7 +514,7 @@ test("styleRelaxed", async(t) => {
|
|||
"MD042": [ 81 ],
|
||||
"MD045": [ 85 ],
|
||||
"MD046": [ 49, 73, 77 ],
|
||||
"MD047": [ 140 ],
|
||||
"MD047": [ 144 ],
|
||||
"MD048": [ 77 ],
|
||||
"MD049": [ 90 ],
|
||||
"MD050": [ 94 ],
|
||||
|
|
@ -523,8 +522,10 @@ test("styleRelaxed", async(t) => {
|
|||
"MD052": [ 98 ],
|
||||
"MD053": [ 100 ],
|
||||
"MD055": [ 110 ],
|
||||
"MD056": [ 114 ],
|
||||
"MD058": [ 117, 119 ]
|
||||
"MD056": [ 116 ],
|
||||
"MD058": [ 119, 121 ],
|
||||
"MD059": [ 124 ],
|
||||
"MD060": [ 110 ]
|
||||
}
|
||||
};
|
||||
t.deepEqual(actualResult, expectedResult, "Undetected issues.");
|
||||
|
|
@ -541,6 +542,7 @@ test("nullFrontMatter", (t) => new Promise((resolve) => {
|
|||
"default": false,
|
||||
"MD010": true
|
||||
},
|
||||
// @ts-ignore
|
||||
"resultVersion": 0
|
||||
}, function callback(err, result) {
|
||||
t.falsy(err);
|
||||
|
|
@ -593,6 +595,7 @@ test("noInlineConfig", (t) => new Promise((resolve) => {
|
|||
].join("\n")
|
||||
},
|
||||
"noInlineConfig": true,
|
||||
// @ts-ignore
|
||||
"resultVersion": 0
|
||||
}, function callback(err, result) {
|
||||
t.falsy(err);
|
||||
|
|
@ -641,7 +644,7 @@ test("readmeHeadings", (t) => new Promise((resolve) => {
|
|||
"##### options.handleRuleFailures",
|
||||
"##### options.markdownItFactory",
|
||||
"##### options.noInlineConfig",
|
||||
"##### options.resultVersion",
|
||||
"##### ~~options.resultVersion~~",
|
||||
"##### options.strings",
|
||||
"#### callback",
|
||||
"#### result",
|
||||
|
|
@ -832,7 +835,7 @@ test("customFileSystemAsync", (t) => new Promise((resolve) => {
|
|||
}));
|
||||
|
||||
test("readme", async(t) => {
|
||||
t.plan(130);
|
||||
t.plan(132);
|
||||
const tagToRules = {};
|
||||
for (const rule of rules) {
|
||||
for (const tag of rule.tags) {
|
||||
|
|
@ -907,7 +910,7 @@ test("readme", async(t) => {
|
|||
});
|
||||
|
||||
test("validateJsonUsingConfigSchemaStrict", async(t) => {
|
||||
t.plan(196);
|
||||
t.plan(211);
|
||||
// @ts-ignore
|
||||
const ajv = new Ajv(ajvOptions);
|
||||
const validateSchemaStrict = ajv.compile(configSchemaStrict);
|
||||
|
|
@ -1029,7 +1032,7 @@ test("validateConfigExampleJson", (t) => {
|
|||
});
|
||||
|
||||
test("allBuiltInRulesHaveValidUrl", (t) => {
|
||||
t.plan(156);
|
||||
t.plan(159);
|
||||
for (const rule of rules) {
|
||||
// @ts-ignore
|
||||
t.truthy(rule.information);
|
||||
|
|
@ -1063,6 +1066,71 @@ test("someCustomRulesHaveValidUrl", (t) => {
|
|||
}
|
||||
});
|
||||
|
||||
test("coverageForCacheMicromarkTokensWhenUndefined", (t) => {
|
||||
t.plan(1);
|
||||
cache.initialize(undefined);
|
||||
t.is(cache.micromarkTokens().length, 0);
|
||||
});
|
||||
|
||||
test("micromarkParseCalledWhenNeeded", (t) => new Promise((resolve) => {
|
||||
t.plan(3);
|
||||
/** @type {import("markdownlint").Rule} */
|
||||
const markdownItRule = {
|
||||
"names": [ "markdown-it-rule" ],
|
||||
"description": "markdown-it rule",
|
||||
"tags": [ "test" ],
|
||||
"parser": "markdownit",
|
||||
"function": () => {
|
||||
t.true(cache.micromarkTokens().length > 0);
|
||||
}
|
||||
};
|
||||
lintAsync({
|
||||
"strings": {
|
||||
"string": "# Heading\n\nText\n"
|
||||
},
|
||||
"config": {
|
||||
"markdown-it-rule": true
|
||||
},
|
||||
"customRules": [ markdownItRule ],
|
||||
"markdownItFactory": getMarkdownItFactory([])
|
||||
}, function callback(err, actual) {
|
||||
t.falsy(err);
|
||||
const expected = { "string": [] };
|
||||
t.deepEqual(actual, expected, "Unexpected issues.");
|
||||
resolve();
|
||||
});
|
||||
}));
|
||||
|
||||
test("micromarkParseSkippedWhenNotNeeded", (t) => new Promise((resolve) => {
|
||||
t.plan(3);
|
||||
/** @type {import("markdownlint").Rule} */
|
||||
const markdownItRule = {
|
||||
"names": [ "markdown-it-rule" ],
|
||||
"description": "markdown-it rule",
|
||||
"tags": [ "test" ],
|
||||
"parser": "markdownit",
|
||||
"function": () => {
|
||||
t.true(cache.micromarkTokens().length === 0);
|
||||
}
|
||||
};
|
||||
lintAsync({
|
||||
"strings": {
|
||||
"string": "# Heading\n\nText\n"
|
||||
},
|
||||
"config": {
|
||||
"default": false,
|
||||
"markdown-it-rule": true
|
||||
},
|
||||
"customRules": [ markdownItRule ],
|
||||
"markdownItFactory": getMarkdownItFactory([])
|
||||
}, function callback(err, actual) {
|
||||
t.falsy(err);
|
||||
const expected = { "string": [] };
|
||||
t.deepEqual(actual, expected, "Unexpected issues.");
|
||||
resolve();
|
||||
});
|
||||
}));
|
||||
|
||||
test("markdownItPluginsSingle", (t) => new Promise((resolve) => {
|
||||
t.plan(4);
|
||||
lintAsync({
|
||||
|
|
@ -1159,6 +1227,7 @@ Text with: [^footnote]
|
|||
[reference]: https://example.com
|
||||
`
|
||||
},
|
||||
// @ts-ignore
|
||||
"resultVersion": 0
|
||||
}, (err, actual) => {
|
||||
t.falsy(err);
|
||||
|
|
@ -1208,7 +1277,7 @@ test("token-map-spans", (t) => {
|
|||
});
|
||||
|
||||
test("configParsersInvalid", async(t) => {
|
||||
t.plan(1);
|
||||
t.plan(2);
|
||||
const options = {
|
||||
"strings": {
|
||||
"content": [
|
||||
|
|
@ -1221,10 +1290,9 @@ test("configParsersInvalid", async(t) => {
|
|||
].join("\n")
|
||||
}
|
||||
};
|
||||
const expected = "content: 1: MD041/first-line-heading/first-line-h1 " +
|
||||
"First line in a file should be a top-level heading [Context: \"Text\"]";
|
||||
const actual = await lintPromise(options);
|
||||
t.is(actual.toString(), expected, "Unexpected results.");
|
||||
t.is(actual.content.length, 1);
|
||||
t.is(actual.content[0].ruleNames[0], "MD041");
|
||||
});
|
||||
|
||||
test("configParsersJSON", async(t) => {
|
||||
|
|
@ -1244,7 +1312,7 @@ test("configParsersJSON", async(t) => {
|
|||
}
|
||||
};
|
||||
const actual = await lintPromise(options);
|
||||
t.is(actual.toString(), "", "Unexpected results.");
|
||||
t.is(actual.content.length, 0);
|
||||
});
|
||||
|
||||
test("configParsersJSONC", async(t) => {
|
||||
|
|
@ -1266,7 +1334,7 @@ test("configParsersJSONC", async(t) => {
|
|||
"configParsers": [ jsoncParser.parse ]
|
||||
};
|
||||
const actual = await lintPromise(options);
|
||||
t.is(actual.toString(), "", "Unexpected results.");
|
||||
t.is(actual.content.length, 0);
|
||||
});
|
||||
|
||||
test("configParsersYAML", async(t) => {
|
||||
|
|
@ -1287,7 +1355,7 @@ test("configParsersYAML", async(t) => {
|
|||
};
|
||||
// @ts-ignore
|
||||
const actual = await lintPromise(options);
|
||||
t.is(actual.toString(), "", "Unexpected results.");
|
||||
t.is(actual.content.length, 0);
|
||||
});
|
||||
|
||||
test("configParsersTOML", async(t) => {
|
||||
|
|
@ -1309,7 +1377,7 @@ test("configParsersTOML", async(t) => {
|
|||
]
|
||||
};
|
||||
const actual = await lintPromise(options);
|
||||
t.is(actual.toString(), "", "Unexpected results.");
|
||||
t.is(actual.content.length, 0);
|
||||
});
|
||||
|
||||
test("getVersion", (t) => {
|
||||
|
|
|
|||
|
|
@ -68,6 +68,18 @@ Uppercase image tag with no alt set <IMG SRC="cat.png" /> {MD045}
|
|||
<img src="image.png" /> {MD045}
|
||||
</p>
|
||||
|
||||
No alt attribute is okay when the image is hidden from assistive technology:
|
||||
<img src="image.png" aria-hidden="true"/>
|
||||
<img src="image.png" ARIA-HIDDEN="TRUE" />
|
||||
|
||||
But not when disabled: <img src="image.png" aria-hidden="false"/> {MD045}
|
||||
|
||||
Multi-line image tag aria-hidden:
|
||||
<img
|
||||
src="image.png"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
|
||||
<!-- markdownlint-restore no-inline-html -->
|
||||
|
||||
[notitle]: image.jpg
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue