diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..f7fb71b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,46 @@ +name: Compile & Linting + +on: + pull_request: + branches: + - dev + push: + branches: + - dev + +env: + NODE_VERSION: 20 + +jobs: + compile: + runs-on: ubuntu-latest + + steps: + - name: Install NodeJS + uses: actions/setup-node@v2 + with: + node-version: ${{env.NODE_VERSION}} + - name: Code Checkout + uses: actions/checkout@v2 + - name: Install Dependencies + run: npm ci + - name: Typescript Compile + run: npm run compile + + lint: + runs-on: ubuntu-latest + needs: compile + + steps: + - name: Install NodeJS + uses: actions/setup-node@v2 + with: + node-version: ${{env.NODE_VERSION}} + - name: Code Checkout + uses: actions/checkout@v2 + - name: Install Dependencies + run: npm ci + - name: Lint Code + run: npm run lint + - name: Format Code + run: npm run format diff --git a/package.json b/package.json index a28f436..4a1a98e 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,8 @@ "build": "tsc && vite build", "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "preview": "vite preview", - "format": "prettier --write '**/*.{ts,tsx}'" + "format": "prettier --write '**/*.{ts,tsx}'", + "compile": "tsc" }, "dependencies": { "@reduxjs/toolkit": "^2.2.4", diff --git a/src/common/navigation/Pagination.tsx b/src/common/navigation/Pagination.tsx index 33ce071..7a646e9 100644 --- a/src/common/navigation/Pagination.tsx +++ b/src/common/navigation/Pagination.tsx @@ -28,7 +28,7 @@ export const Pagination: React.FC = () => { return ( {"<"} - {Array.from({ length: perPage }, (v, k) => page + k).map((page) => { + {Array.from({ length: perPage }, (_, k) => page + k).map((page) => { return ( {page}