Skip to content

Commit be1737f

Browse files
chore: add markdown lint check to default lint command (#5074)
Co-authored-by: Marc Pichler <[email protected]>
1 parent c208991 commit be1737f

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

.github/workflows/lint.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ jobs:
2828
run: |
2929
npm run lint
3030
npm run lint:examples
31-
npm run lint:markdown
3231
3332
- name: Lint doc files
3433
run: |

CONTRIBUTING.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,13 +257,21 @@ cd packages/opentelemetry-module-name
257257
npm run lint:fix
258258
```
259259

260-
Similarly, Markdown files (such as README.md files) can be linted:
260+
The default lint command will check majority of files, including Markdown files (such as README.md files), but you
261+
also have the option to check just the Markdown files with:
261262

262263
```sh
263264
npm run lint:markdown
264265
npm run lint:markdown:fix # can automatically fix some Markdown rules
265266
```
266267

268+
The default command doesn't check the examples folder. To lint just the examples, use the script:
269+
270+
```sh
271+
npm run lint:examples
272+
npm run lint:examples:fix # can automatically fix some errors
273+
```
274+
267275
### Generating docs
268276

269277
We use [typedoc](https://www.npmjs.com/package/typedoc) to generate the api documentation.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
"docs": "typedoc --readme none && touch docs/.nojekyll",
2222
"docs-deploy": "gh-pages --dotfiles --dist docs",
2323
"docs:test": "linkinator docs --silent --retry && linkinator doc/*.md --skip http://localhost:3000 --skip http://localhost:9464 --silent --retry",
24-
"lint": "lerna run lint",
24+
"lint": "lerna run lint && npm run lint:markdown",
2525
"lint:changed": "lerna run --concurrency 1 --stream lint --since HEAD --exclude-dependents",
26-
"lint:fix": "lerna run lint:fix",
26+
"lint:fix": "lerna run lint:fix && npm run lint:markdown:fix",
2727
"lint:fix:changed": "lerna run --concurrency 1 --stream lint:fix --since HEAD --exclude-dependents",
2828
"lint:examples": "eslint --no-error-on-unmatched-pattern ./examples/**/*.js",
2929
"lint:examples:fix": "eslint --no-error-on-unmatched-pattern ./examples/**/*.js --fix",

0 commit comments

Comments
 (0)