From fe62929af855c71f363da8011d57653d5ea83a44 Mon Sep 17 00:00:00 2001 From: Pete Johanson Date: Tue, 3 Nov 2020 13:46:07 -0500 Subject: feat(docs): Add eslint and prettier GH Actions. --- .github/workflows/doc-checks.yml | 35 +++++++++++++++++++++++++++++++++++ docs/package.json | 5 ++++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/doc-checks.yml diff --git a/.github/workflows/doc-checks.yml b/.github/workflows/doc-checks.yml new file mode 100644 index 0000000..a31a88e --- /dev/null +++ b/.github/workflows/doc-checks.yml @@ -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 diff --git a/docs/package.json b/docs/package.json index f1e911e..cb42506 100644 --- a/docs/package.json +++ b/docs/package.json @@ -8,7 +8,10 @@ "serve": "docusaurus serve", "swizzle": "docusaurus swizzle", "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": { "@docusaurus/core": "^2.0.0-alpha.66", -- cgit v1.2.3