From 4f0363e8e267e4162099649c4aa9d9f4100f3e4d Mon Sep 17 00:00:00 2001 From: Nabarun Gogoi <95nikass@gmail.com> Date: Mon, 11 Dec 2023 12:04:33 +0530 Subject: [PATCH] Add github CI for running lint (#5) * Add workflow for linting * Remove types from pull request event trigger * Use node version 20 in workflow * Remove github package registry --------- Co-authored-by: neeraj --- .github/workflows/lint.yaml | 23 +++++++++++++++++++++++ packages/frontend/package.json | 3 ++- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/lint.yaml diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 00000000..7cc4f608 --- /dev/null +++ b/.github/workflows/lint.yaml @@ -0,0 +1,23 @@ +name: Lint + +on: + pull_request: + push: + branches: + - main + +jobs: + lint: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [20.x] + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + - run: yarn + - name: Linter check + run: yarn lint diff --git a/packages/frontend/package.json b/packages/frontend/package.json index 8d960573..78989f6a 100644 --- a/packages/frontend/package.json +++ b/packages/frontend/package.json @@ -22,7 +22,8 @@ "test": "react-scripts test", "eject": "react-scripts eject", "format": "prettier --write .", - "format:check": "prettier --check ." + "format:check": "prettier --check .", + "lint": "eslint ." }, "eslintConfig": { "extends": [