Skip to content

Commit

Permalink
chore: Add markdownlint config (#62)
Browse files Browse the repository at this point in the history
Adds markdownlint config for better control of Markdown files linting.
  • Loading branch information
nieomylnieja authored May 22, 2024
1 parent dc00681 commit 48c2f5e
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 10 deletions.
10 changes: 10 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
MD010:
code_blocks: false
spaces_per_tab: 1
MD013:
line_length: 80
heading_line_length: 80
code_block_line_length: 120
code_blocks: true
MD024:
siblings_only: true
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ check/trailing:
## Check markdown files for potential issues with markdownlint.
check/markdown:
$(call _print_step,Verifying Markdown files)
yarn --silent markdownlint '*.md' --disable MD010, MD034 # MD010 does not handle code blocks well.
yarn --silent markdownlint '**/*.md' --ignore node_modules

## Check for potential vulnerabilities across all Go dependencies.
check/vulns:
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@ Example:

### Module sources

| Source | Flag | Example |
|-------------|-----------|-----------------------------------------------------------------------|
| File path | _default_ | ~/my-project/go.mod |
| URL | `--url` | https://raw.githubusercontent.com/nieomylnieja/go-libyear/main/go.mod |
| Module path | `--pkg` | github.com/nieomylnieja/go-libyear@latest |
| Source | Flag | Example |
|-------------|-----------|-----------------------------------------------------------------------------------------------------------------|
| File path | _default_ | ~/my-project/go.mod |
| URL | `--url` | https://raw.githubusercontent.com/nieomylnieja/go-libyear/main/go.mod <!-- markdownlint-disable-line MD034 --> |
| Module path | `--pkg` | github.com/nieomylnieja/go-libyear@latest |

<!-- markdownlint-enable MD013 -->

Expand Down Expand Up @@ -219,7 +219,7 @@ it will drop the following error:
updates to go.sum needed, disabled by -mod=readonly
```

Due to that it is advised to use stick with default modules information
Due to that it is advised to stick with default modules information
provider.

## Development
Expand All @@ -234,8 +234,8 @@ CLI tests.

Inspired directly
by [SE Radio episode 587](https://www.se-radio.net/2023/10/se-radio-587-m-scott-ford-on-managing-dependency-freshness/).
Further reading through https://libyear.com/ and
mimicking https://github.com/jaredbeck/libyear-bundler capabilities.
Further reading through [libyear.com](https://libyear.com/) and
mimicking [libyear-bundler](https://github.com/jaredbeck/libyear-bundler) capabilities.

All the concepts and theory is based
on or directly quoted
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "module",
"devDependencies": {
"cspell": "8.8.1",
"markdownlint-cli": "0.39.0",
"markdownlint-cli": "0.40.0",
"yaml": "2.4.2"
},
"scripts": {
Expand Down

0 comments on commit 48c2f5e

Please sign in to comment.