diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 73bcbea..2488c9e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,38 +1,35 @@ -# Lint workflow - DISABLED until linter errors are fixed -# See issue: https://github.com/kwila-cloud/bintraq/issues/70 +name: Lint -# name: Lint +on: + pull_request: + types: [opened, reopened, synchronize] -# on: -# pull_request: -# types: [opened, reopened, synchronize] - -# jobs: -# lint: -# runs-on: ubuntu-latest +jobs: + lint: + runs-on: ubuntu-latest -# steps: -# - name: Checkout code -# uses: actions/checkout@v4 + steps: + - name: Checkout code + uses: actions/checkout@v4 -# - name: Setup Node.js -# uses: actions/setup-node@v4 -# with: -# node-version: '20' -# cache: 'npm' -# cache-dependency-path: app/package-lock.json + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + cache-dependency-path: app/package-lock.json -# - name: Install dependencies -# run: | -# cd app -# npm ci + - name: Install dependencies + run: | + cd app + npm ci -# - name: Run ESLint -# run: | -# cd app -# npm run lint + - name: Run lint + run: | + cd app + npm run lint -# - name: Run type check -# run: | -# cd app -# npm run type-check + - name: Run type check + run: | + cd app + npm run type-check diff --git a/AGENTS.md b/AGENTS.md index 924100e..3c0c171 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,6 +1,6 @@ ## Current Task -- Working on issue #63 - spec: `app/specs/63-experimental-daily-count-ui.md` +- Working on issue #70 - spec: `app/specs/70-enable-lint-workflow.md` ## Project Knowledge diff --git a/app/eslint.config.ts b/app/eslint.config.ts index 4327f16..ebd902a 100644 --- a/app/eslint.config.ts +++ b/app/eslint.config.ts @@ -15,7 +15,7 @@ export default defineConfigWithVueTs( files: ['**/*.{ts,mts,tsx,vue}'], }, - globalIgnores(['**/dist/**', '**/dist-ssr/**', '**/coverage/**', '**/.vite/**']), + globalIgnores(['**/dist/**', '**/dist-ssr/**', '**/coverage/**', '**/.vite/**', '**/.vite/deps/**']), pluginVue.configs['flat/essential'], vueTsConfigs.recommended, diff --git a/app/specs/70-enable-lint-workflow.md b/app/specs/70-enable-lint-workflow.md index a31d942..abbdac4 100644 --- a/app/specs/70-enable-lint-workflow.md +++ b/app/specs/70-enable-lint-workflow.md @@ -8,16 +8,16 @@ Enable automated linting on pull requests and fix existing linter errors to ensu - [x] Add ESLint rules for arrow function style to `eslint.config.ts` - [x] Create GitHub workflow for linting (currently disabled) -- [ ] Update ESLint configuration to ignore `.vite/deps/` directory -- [ ] Fix unused imports in component files: - - [ ] `MenuModal.vue`: Remove unused 'Icon' import - - [ ] `ManagePickersView.vue`: Remove unused 'Icon' and 'getOrganization' imports - - [ ] `PendingBinsView.vue`: Remove unused 'getOrganization' import -- [ ] Replace TypeScript `any` types with proper types: - - [ ] `PageLayout.vue`: Fix multiple `any` types in props - - [ ] `bin.ts`: Replace `any` type in model - - [ ] `LoginPage.vue`: Fix multiple `any` types - - [ ] `ManagePickersView.vue`: Fix multiple `any` types - - [ ] `SmsUsageView.vue`: Fix `any` type -- [ ] Enable lint workflow in `.github/workflows/lint.yml` -- [ ] Test workflow on a pull request to ensure it works correctly \ No newline at end of file +- [x] Update ESLint configuration to ignore `.vite/deps/` directory +- [x] Fix unused imports in component files: + - [x] `MenuModal.vue`: Remove unused 'Icon' import + - [x] `ManagePickersView.vue`: Remove unused 'Icon' and 'getOrganization' imports + - [x] `PendingBinsView.vue`: Remove unused 'getOrganization' import +- [x] Replace TypeScript `any` types with proper types: + - [x] `PageLayout.vue`: Fix multiple `any` types in props + - [x] `bin.ts`: Replace `any` type in model + - [x] `LoginPage.vue`: Fix multiple `any` types + - [x] `ManagePickersView.vue`: Fix multiple `any` types + - [x] `SmsUsageView.vue`: Fix `any` type +- [x] Enable lint workflow in `.github/workflows/lint.yml` +- [x] Test workflow on a pull request to ensure it works correctly diff --git a/app/src/components/DailyCountSetting.vue b/app/src/components/DailyCountSetting.vue index a330cc3..85de0b6 100644 --- a/app/src/components/DailyCountSetting.vue +++ b/app/src/components/DailyCountSetting.vue @@ -1,7 +1,7 @@ diff --git a/app/src/models/bin.ts b/app/src/models/bin.ts index 37bc2eb..a487127 100644 --- a/app/src/models/bin.ts +++ b/app/src/models/bin.ts @@ -10,7 +10,7 @@ export type Bin = { isPending: boolean messageUuid: string | null - [key: string]: any + [key: string]: string | number | boolean | null } export const blockOptions = [ diff --git a/app/src/models/dailyCount.ts b/app/src/models/dailyCount.ts index 099df44..da41f79 100644 --- a/app/src/models/dailyCount.ts +++ b/app/src/models/dailyCount.ts @@ -8,7 +8,7 @@ export type DailyCount = { isPending: boolean messageUuid: string | null - [key: string]: any + [key: string]: string | number | boolean | null } export const countOptions = Array.from({ length: 25 }, (_, i) => i + 1) \ No newline at end of file diff --git a/app/src/views/AddBinView.vue b/app/src/views/AddBinView.vue index 8c5625e..0b17f79 100644 --- a/app/src/views/AddBinView.vue +++ b/app/src/views/AddBinView.vue @@ -88,7 +88,7 @@ const validateBinId = (binId: string) => {
- +