diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7813cf60..8667da4b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,10 +10,11 @@ jobs: node-version: [18] steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - - run: npm install - - run: npm test + - uses: actions/checkout@v2 + - uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: "npm" + - run: npm install + - run: npm run check + - run: npm test diff --git a/package.json b/package.json index 6921fafc..dff9985c 100644 --- a/package.json +++ b/package.json @@ -18,8 +18,10 @@ "deploy": "NODE_DEBUG=gh-pages gh-pages -d out", "jsdoc": "jsdoc packages/ -c jsdoc.config.json", "jsdoc-json": "jsdoc packages/ --template ./node_modules/jsdoc-json --destination doc.json -c jsdoc.config.json", - "lint": "npx eslint . --ext mjs,js --quiet", - "codeformat": "prettier --write ." + "lint": "eslint . --ext mjs,js --quiet", + "codeformat": "prettier --write .", + "format-check": "prettier --check .", + "check": "npm run format-check && npm run lint" }, "workspaces": [ "packages/*"