-
Notifications
You must be signed in to change notification settings - Fork 9
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
WIP: adding a md linter to the lint process #41
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
build/ | ||
.eslintrc.js | ||
.eslintrc.md.js | ||
docs/test-api | ||
./node_modules/* | ||
*.md | ||
*.mdx | ||
LICENSE |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
module.exports = { | ||
extends: [ | ||
"plugin:markdownlint/recommended", | ||
], | ||
"parser": "eslint-plugin-markdownlint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": "latest", | ||
"sourceType": "module", | ||
"ecmaFeatures": { | ||
"jsx": true | ||
}, | ||
}, | ||
rules: { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @m4sterbunny all the various rules to get things going. Have fixed up the bits in md/mdx as well so it now runs as part of the lint step There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @joaniefromtheblock FYI Josh has setup some of the rules to get ES link going |
||
// https://github.com/DavidAnson/markdownlint?tab=readme-ov-file | ||
"markdownlint/md001": "off", | ||
"markdownlint/md003": "warn", | ||
// line length | ||
"markdownlint/md013": ["error", { | ||
"line_length": 100, | ||
"code_block_line_length": 100, | ||
"code_blocks": true, | ||
}], | ||
// allow headings with the same content | ||
"markdownlint/md024": "off", | ||
// allow multiple ## and # in the same file | ||
"markdownlint/md025": ["error", { | ||
"level": 3 | ||
}], | ||
// allow inline html | ||
"markdownlint/md033": "off", | ||
// allowed here, not for real docs | ||
"markdownlint/md051": "off", | ||
} | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
name: Check for spelling with vale | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
vale: | ||
name: Spelling | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Vale | ||
uses: ConsenSys/docs-gha/spelling@main | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @m4sterbunny If you merge #6 , or copy pasta the content as a branch directly into |
||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
name: Trivy | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
trivy: | ||
name: Run trivy scanner | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Trivy | ||
uses: ConsenSys/docs-gha/trivy@main | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep the config in the rules section so its one place