Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a suggestion to match the package name and file location #35

Merged
merged 7 commits into from
Aug 27, 2024
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
38 changes: 23 additions & 15 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,26 @@ jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm install -g markdown-toc
- run: sudo apt-get update && sudo apt-get -y install make git
- run: make toc
- run: git diff
- run: |
if [ -z "$(git status --porcelain)" ]; then
echo "No changes"
else
echo "Please update the table of contents with make toc"
exit 1
fi
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm install
- run: make toc
- run: git diff
- run: |
if [ -z "$(git status --porcelain)" ]; then
echo "No changes"
else
echo "Please update the table of contents with make toc"
exit 1
fi
- run: make markdownlint
- run: git diff
- run: |
if [ -z "$(git status --porcelain)" ]; then
echo "No changes"
else
echo "Please fix the markdownlint errors"
exit 1
fi
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.idea/
.idea/
node_modules/
44 changes: 44 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
default: true

# MD013/line-length
# https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md013.md
MD013:
line_length: 120
heading_line_length: 80
code_blocks: false
tables: false
headings: true

# MD024/no-duplicate-heading
# https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md024.md
MD024:
siblings_only: true

# MD026/no-trailing-punctuation
# https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md026.md
MD026:
# Punctuation characters
punctuation: ".,;:,;:!"

# MD031/blanks-around-fences
# https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md031.md
MD031: false

# MD033/no-inline-html
# https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md033.md
MD033:
allowed_elements:
- br
- details
- img
- strong
- summary

# MD036/no-emphasis-as-heading
# https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md036.md
MD036: false

MD004:
style: dash

MD010: false
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
PHONY: deps
deps:
hash markdown-toc || echo "please install markdown-toc: npm install -g markdown-toc"
npm install

PHONY: toc
toc: deps
markdown-toc -i style-guide.md --bullets="*" --maxdepth=3
npx markdown-toc -i style-guide.md --bullets="*" --maxdepth=3

markdownlint: deps
npx markdownlint-cli2 style-guide.md --config=.markdownlint.yaml
Loading
Loading