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 172c0e4..e4b77ae 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ }, "scripts": { "build": "rollup --config", + "lint": "prettier --check 'src/**/*.js'", "test": "jest" }, "browserslist": "> 0.25%, not dead"