Skip to content

Commit

Permalink
adding a md linter to the lint process
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuafernandes committed Aug 21, 2024
1 parent e2d2d78 commit 1eaa802
Show file tree
Hide file tree
Showing 5 changed files with 120 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@ max_line_length = 80
trim_trailing_whitespace = true

[*.md]
max_line_length = 80
indent_style = space
insert_final_newline = false
trim_trailing_whitespace = false
3 changes: 1 addition & 2 deletions .eslintignore
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
20 changes: 20 additions & 0 deletions .eslintrc.md.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module.exports = {
extends: [
"plugin:markdownlint/recommended",
],
"parser": "eslint-plugin-markdownlint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
},
},
rules: {
"markdownlint/md001": "off",
"markdownlint/md003": "warn",
"markdownlint/md025": ["error", {
"level": 2
}]
}
};
97 changes: 94 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"write-heading-ids": "docusaurus write-heading-ids",
"typecheck": "tsc",
"typecheck-staged": "tsc-files --noEmit",
"lint": "npm run lint:spelling && npm run lint:js && npm run lint:style",
"lint": "npm run lint:spelling && npm run lint:md && npm run lint:js && npm run lint:style",
"lint:md": "eslint . --config .eslintrc.md.js --ext md,mdx --max-warnings=0",
"lint:js": "eslint . --ext js,jsx,ts,tsx --max-warnings=0",
"lint:spelling": "cspell \"**\" --no-progress",
"lint:style": "stylelint \"**/*.css\"",
Expand Down Expand Up @@ -61,6 +62,7 @@
"cspell": "^6.31.1",
"cz-conventional-changelog": "^3.3.0",
"semantic-release": "^21.0.0",
"eslint-plugin-markdownlint": "^0.6.0",
"stylelint": "^15.0.0 ",
"stylelint-config-standard": "^34.0.0",
"tsc-files": "^1.1.4",
Expand Down

0 comments on commit 1eaa802

Please sign in to comment.