Skip to content

Commit

Permalink
Setup markdownlint
Browse files Browse the repository at this point in the history
  • Loading branch information
buberdds committed Nov 27, 2023
1 parent 7f33584 commit 533d203
Show file tree
Hide file tree
Showing 4 changed files with 290 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ jobs:
- name: Install gitlint
run: |
python -m pip install gitlint
- name: Lint documentation
run: |
yarn lint-docs
# Always run this step so that all linting errors can be seen at once.
if: always()
- name: Lint git commits
run: |
yarn lint-git
Expand Down
22 changes: 22 additions & 0 deletions .markdownlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# markdownlint configuration.

# For more information, see:
# https://github.com/DavidAnson/markdownlint#optionsconfig.

# Enable all rules.
default: true

line-length:
# Line length checking is not strict by default.
strict: true
line_length: 80
# Allow longer lines for code blocks.
code_block_line_length: 100

# Do not always require language specifiers with fenced code blocks since they
# are not part of the Markdown spec.
fenced-code-language: false

# Allow <details> and <section> HTML elements
no-inline-html:
allowed_elements: ['details', 'summary']
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"checkTs": "tsc --noEmit",
"dev": "vite",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"lint-docs": "markdownlint --ignore '**/node_modules/**' '**/*.md'",
"lint-git": "node ./internals/scripts/gitlint.js",
"prettify": "prettier src --write",
"preview": "vite preview"
Expand All @@ -30,6 +31,7 @@
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.3",
"ethers": "5.7.2",
"markdownlint-cli": "^0.37.0",
"prettier": "3.1.0",
"typescript": "^5.0.2",
"vite": "^4.4.5"
Expand Down
Loading

0 comments on commit 533d203

Please sign in to comment.