diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index c2957a4..a2572b8 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -7,20 +7,14 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out repo - uses: actions/checkout@v2 - - name: Configure npm caching - uses: actions/cache@v2 + uses: actions/checkout@v4 + - name: Setup node + uses: actions/setup-node@v4 with: - path: ~/.npm - key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-npm- + cache: npm - name: Install dependencies run: npm ci - name: Run prettier - run: |- - npx --no-install prettier --check . + run: npm run style - name: Run eslint - run: |- - npx --no-install eslint . - if: "! cancelled()" + run: npm run lint diff --git a/package.json b/package.json index 6b3d116..cb1c24c 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,8 @@ "doc": "docs" }, "scripts": { - "test": "eslint addon/*.js addon/content/*.js" + "lint": "eslint", + "style": "prettier --check ." }, "repository": { "type": "git",