chore: add markdown lint check to default lint command (#5074)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
This commit is contained in:
parent
c208991123
commit
be1737fc46
|
|
@ -28,7 +28,6 @@ jobs:
|
|||
run: |
|
||||
npm run lint
|
||||
npm run lint:examples
|
||||
npm run lint:markdown
|
||||
|
||||
- name: Lint doc files
|
||||
run: |
|
||||
|
|
|
|||
|
|
@ -257,13 +257,21 @@ cd packages/opentelemetry-module-name
|
|||
npm run lint:fix
|
||||
```
|
||||
|
||||
Similarly, Markdown files (such as README.md files) can be linted:
|
||||
The default lint command will check majority of files, including Markdown files (such as README.md files), but you
|
||||
also have the option to check just the Markdown files with:
|
||||
|
||||
```sh
|
||||
npm run lint:markdown
|
||||
npm run lint:markdown:fix # can automatically fix some Markdown rules
|
||||
```
|
||||
|
||||
The default command doesn't check the examples folder. To lint just the examples, use the script:
|
||||
|
||||
```sh
|
||||
npm run lint:examples
|
||||
npm run lint:examples:fix # can automatically fix some errors
|
||||
```
|
||||
|
||||
### Generating docs
|
||||
|
||||
We use [typedoc](https://www.npmjs.com/package/typedoc) to generate the api documentation.
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@
|
|||
"docs": "typedoc --readme none && touch docs/.nojekyll",
|
||||
"docs-deploy": "gh-pages --dotfiles --dist docs",
|
||||
"docs:test": "linkinator docs --silent --retry && linkinator doc/*.md --skip http://localhost:3000 --skip http://localhost:9464 --silent --retry",
|
||||
"lint": "lerna run lint",
|
||||
"lint": "lerna run lint && npm run lint:markdown",
|
||||
"lint:changed": "lerna run --concurrency 1 --stream lint --since HEAD --exclude-dependents",
|
||||
"lint:fix": "lerna run lint:fix",
|
||||
"lint:fix": "lerna run lint:fix && npm run lint:markdown:fix",
|
||||
"lint:fix:changed": "lerna run --concurrency 1 --stream lint:fix --since HEAD --exclude-dependents",
|
||||
"lint:examples": "eslint --no-error-on-unmatched-pattern ./examples/**/*.js",
|
||||
"lint:examples:fix": "eslint --no-error-on-unmatched-pattern ./examples/**/*.js --fix",
|
||||
|
|
|
|||
Loading…
Reference in New Issue