Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{
"extends": ["conventions", "prettier"],
"plugins": ["prettier"],
"plugins": ["prettier", "import", "unicorn"],
"parserOptions": {
"project": "./tsconfig.json"
},
"rules": {
"prettier/prettier": "error"
"prettier/prettier": "error",
"import/extensions": ["error", "always"]
}
}
4 changes: 2 additions & 2 deletions .markdownlint-cli2.jsonc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"config": {
"extends": "markdownlint/style/prettier",
"relative-links": true,
"default": true,
"MD033": false
"relative-links": true,
"no-inline-html": false
},
"globs": ["**/*.{md,mdx}"],
"ignores": ["**/node_modules", "**/test/fixtures/**"],
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,12 @@ awesome.md:3 relative-links Relative links should be valid ["./invalid.txt" shou
### Additional features

- Support images (e.g: `![Image](./image.png)`).
- Support anchors (heading fragment links) (e.g: `[Link](./awesome.md#existing-heading)`).
- Support links fragments similar to the [built-in `markdownlint` rule - MD051](https://github.com/DavidAnson/markdownlint/blob/main/doc/md051.md) (e.g: `[Link](./awesome.md#heading)`).
- Ignore external links and absolute paths as it only checks relative links (e.g: `https://example.com/` or `/absolute/path.png`).

### Limitations

- Only images and links defined using markdown syntax are validated, html syntax is not supported (e.g: `<a href="./link.txt" />` or `<img src="./image.png" />`).
- Anchors checking is limited to headings, other elements are not supported (e.g: with a "id", `<div id="anchor" />`).
- Only images and links defined using markdown syntax are validated, html syntax is ignored (e.g: `<a href="./link.txt" />` or `<img src="./image.png" />`).

Contributions are welcome to improve the rule, and to alleviate these limitations. See [CONTRIBUTING.md](./CONTRIBUTING.md) for more information.

Expand Down
1 change: 1 addition & 0 deletions jsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"noEmit": true,
"rootDir": ".",
"baseUrl": ".",
"skipLibCheck": true,
"strict": true,
"allowUnusedLabels": false,
"allowUnreachableCode": false,
Expand Down
Loading