diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index aaa5b71..c47f71f 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -21,3 +21,23 @@ jobs: bundler-cache: true - name: Lint Ruby files run: bundle exec standardrb + Prettier: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: "20" + - name: Restore node_modules cache + uses: actions/cache@v4 + with: + path: node_modules + key: ${{ runner.os }}-node-modules-${{ hashFiles('package.json') }} + restore-keys: | + ${{ runner.os }}-node-modules + - name: Install dependencies + run: yarn install + - name: Lint JS files + run: yarn run lint diff --git a/package.json b/package.json index 7a8761c..e4b77ae 100644 --- a/package.json +++ b/package.json @@ -31,11 +31,12 @@ "@rollup/plugin-babel": "^5.3.1", "babel-jest": "^29.0.2", "jest": "^29.0.2", - "prettier": "^2.7.1", + "prettier": "^3.3.3", "rollup": "^2.79.0" }, "scripts": { "build": "rollup --config", + "lint": "prettier --check 'src/**/*.js'", "test": "jest" }, "browserslist": "> 0.25%, not dead"