Standardize eslint and prettier for the entire project with ci checks #165
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [14.x] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up node ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node-${{ matrix.node-version }}- | |
${{ runner.os }}-node- | |
${{ runner.os }}- | |
- name: Install dependencies | |
run: npm ci | |
- name: Install examples/create-react-app dependencies | |
run: npm ci | |
working-directory: ./examples/create-react-app | |
- name: Install examples/nextjs dependencies | |
run: npm ci | |
working-directory: ./examples/nextjs | |
- name: Install examples/typescript dependencies | |
run: npm ci | |
working-directory: ./examples/typescript | |
- name: Lint | |
uses: wearerequired/lint-action@v2 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
prettier: false | |
eslint: false | |
eslint_args: '--max-warnings 0' | |
eslint_extensions: js,jsx,ts,tsx | |
- name: Test | |
run: npm run test |