Skip to content

Commit

Permalink
Merge pull request #35 from StyraInc/dir-structure
Browse files Browse the repository at this point in the history
Add a suggestion to match the package name and file location
  • Loading branch information
charlieegan3 authored Aug 27, 2024
2 parents 1b61dac + a7fadd9 commit 4d8fa7f
Show file tree
Hide file tree
Showing 7 changed files with 1,141 additions and 26 deletions.
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

0 comments on commit 4d8fa7f

Please sign in to comment.