Skip to content

Commit

Permalink
fix: use .markdownlint-cli2.mjs for the configuration file
Browse files Browse the repository at this point in the history
  • Loading branch information
theoludwig committed Dec 28, 2024
1 parent aa24db4 commit db57d67
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 20 deletions.
11 changes: 0 additions & 11 deletions .markdownlint-cli2.jsonc

This file was deleted.

15 changes: 15 additions & 0 deletions .markdownlint-cli2.mjs
Original file line number Diff line number Diff line change
@@ -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 changes: 13 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down

0 comments on commit db57d67

Please sign in to comment.