mirror of
https://github.com/theoludwig/markdownlint-rule-relative-links.git
synced 2025-01-21 10:28:33 +01:00
fix: use .markdownlint-cli2.mjs
for the configuration file
This commit is contained in:
parent
aa24db4fac
commit
db57d67b0b
@ -1,11 +0,0 @@
|
||||
{
|
||||
"config": {
|
||||
"extends": "markdownlint/style/prettier",
|
||||
"default": true,
|
||||
"relative-links": true,
|
||||
"no-inline-html": false,
|
||||
},
|
||||
"globs": ["**/*.md"],
|
||||
"ignores": ["**/node_modules", "**/test/fixtures/**"],
|
||||
"customRules": ["./src/index.js"],
|
||||
}
|
15
.markdownlint-cli2.mjs
Normal file
15
.markdownlint-cli2.mjs
Normal file
@ -0,0 +1,15 @@
|
||||
import relativeLinksRule from "./src/index.js"
|
||||
|
||||
const config = {
|
||||
config: {
|
||||
"extends": "markdownlint/style/prettier",
|
||||
default: true,
|
||||
"relative-links": true,
|
||||
"no-inline-html": false,
|
||||
},
|
||||
globs: ["**/*.md"],
|
||||
ignores: ["**/node_modules", "**/test/fixtures/**"],
|
||||
customRules: [relativeLinksRule],
|
||||
}
|
||||
|
||||
export default config
|
22
README.md
22
README.md
@ -80,18 +80,22 @@ There are various ways [markdownlint](https://github.com/DavidAnson/markdownlint
|
||||
|
||||
We recommend configuring [markdownlint-cli2](https://github.com/DavidAnson/markdownlint-cli2) over [markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli) for compatibility with the [vscode-markdownlint](https://github.com/DavidAnson/vscode-markdownlint) extension.
|
||||
|
||||
`.markdownlint-cli2.jsonc`
|
||||
`.markdownlint-cli2.mjs`
|
||||
|
||||
```json
|
||||
{
|
||||
"config": {
|
||||
"default": true,
|
||||
"relative-links": true
|
||||
```js
|
||||
import relativeLinksRule from "markdownlint-rule-relative-links"
|
||||
|
||||
const config = {
|
||||
config: {
|
||||
default: true,
|
||||
"relative-links": true,
|
||||
},
|
||||
"globs": ["**/*.md"],
|
||||
"ignores": ["**/node_modules"],
|
||||
"customRules": ["markdownlint-rule-relative-links"]
|
||||
globs: ["**/*.md"],
|
||||
ignores: ["**/node_modules"],
|
||||
customRules: [relativeLinksRule],
|
||||
}
|
||||
|
||||
export default config
|
||||
```
|
||||
|
||||
`package.json`
|
||||
|
Loading…
x
Reference in New Issue
Block a user