diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..eb27ca9 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,26 @@ +name: Lint + +on: + pull_request: + +jobs: + lint: + runs-on: ubuntu-latest + permissions: + contents: read + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Run linting + run: npm run lint diff --git a/package.json b/package.json index 685bb1a..e13a5dc 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,6 @@ "dev": "vite", "build": "tsc -b && vite build", "lint": "eslint .", - "lint:fix": "eslint . --fix", "preview": "vite preview" }, "dependencies": { diff --git a/src/contexts/CartContext.tsx b/src/contexts/CartContext.tsx index 2b59177..4d0f7b1 100644 --- a/src/contexts/CartContext.tsx +++ b/src/contexts/CartContext.tsx @@ -1,4 +1,4 @@ -import { createContext, useContext } from 'react'; +import { createContext } from 'react'; import type { ReactNode } from 'react'; import { useCart } from '../hooks/useCart';