diff --git a/.markdownlint-cli2.jsonc b/.markdownlint-cli2.jsonc deleted file mode 100644 index 96cb62d..0000000 --- a/.markdownlint-cli2.jsonc +++ /dev/null @@ -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"], -} diff --git a/.markdownlint-cli2.mjs b/.markdownlint-cli2.mjs new file mode 100644 index 0000000..c43f62c --- /dev/null +++ b/.markdownlint-cli2.mjs @@ -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 diff --git a/README.md b/README.md index e1613ca..ce22323 100644 --- a/README.md +++ b/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`