diff --git a/.github/workflows/run-lint.yml b/.github/workflows/run-lint.yml new file mode 100644 index 0000000..8446d1e --- /dev/null +++ b/.github/workflows/run-lint.yml @@ -0,0 +1,69 @@ +name: Lint +on: + pull_request: + types: [opened, synchronize, reopened, edited] + branches: + - stage + - main +jobs: + eslint: + name: runner / eslint + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [18.x] + + permissions: + contents: write + pull-requests: write + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + fetch-depth: 1 + + - name: Set up Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + + - name: Install dependencies + run: npm install + + - uses: reviewdog/action-eslint@v1 + with: + filter_mode: file + fail_on_error: true + + stylelint: + name: runner / stylelint + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [18.x] + + permissions: + contents: write + pull-requests: write + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + fetch-depth: 1 + + - name: Set up Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + + - name: Install dependencies + run: npm install + + - uses: reviewdog/action-stylelint@v1 + with: + filter_mode: file + fail_on_error: true