feat(docs): Add eslint and prettier GH Actions.
This commit is contained in:
parent
a1dd216519
commit
fe62929af8
2 changed files with 39 additions and 1 deletions
35
.github/workflows/doc-checks.yml
vendored
Normal file
35
.github/workflows/doc-checks.yml
vendored
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
name: doc-checks
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- "docs/**"
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- "docs/**"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: ESLint
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: bahmutov/npm-install@v1
|
||||||
|
with:
|
||||||
|
working-directory: docs
|
||||||
|
- name: ESLint
|
||||||
|
run: npm run lint
|
||||||
|
working-directory: docs
|
||||||
|
prettier:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: Prettier
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: bahmutov/npm-install@v1
|
||||||
|
with:
|
||||||
|
working-directory: docs
|
||||||
|
- name: Prettier Check
|
||||||
|
run: npm run prettier:check
|
||||||
|
working-directory: docs
|
|
@ -8,7 +8,10 @@
|
||||||
"serve": "docusaurus serve",
|
"serve": "docusaurus serve",
|
||||||
"swizzle": "docusaurus swizzle",
|
"swizzle": "docusaurus swizzle",
|
||||||
"deploy": "docusaurus deploy",
|
"deploy": "docusaurus deploy",
|
||||||
"clear": "docusaurus clear"
|
"clear": "docusaurus clear",
|
||||||
|
"lint": "eslint . --ext js,jsx,md,mdx",
|
||||||
|
"prettier:check": "prettier --check .",
|
||||||
|
"prettier:format": "prettier --write ."
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@docusaurus/core": "^2.0.0-alpha.66",
|
"@docusaurus/core": "^2.0.0-alpha.66",
|
||||||
|
|
Loading…
Reference in a new issue