diff --git a/.husky/pre-commit b/.husky/pre-commit index 6fc313510..a6813b183 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1 @@ -#!/usr/bin/env sh -. "$(dirname -- "$0")/_/husky.sh" - npx --no-install pretty-quick --staged && npm run lint diff --git a/.husky/pre-push b/.husky/pre-push index c4cc4e583..6eff46d82 100755 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -1,4 +1 @@ -#!/usr/bin/env sh -. "$(dirname -- "$0")/_/husky.sh" - npm run lint && npm run test diff --git a/src/app/core/persistence/operation-log/compact/action-type-codes.ts b/src/app/core/persistence/operation-log/compact/action-type-codes.ts index e1e4bed17..758d6e79f 100644 --- a/src/app/core/persistence/operation-log/compact/action-type-codes.ts +++ b/src/app/core/persistence/operation-log/compact/action-type-codes.ts @@ -1,5 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ - import { ActionType } from '../../../../op-log/core/action-types.enum'; /** diff --git a/src/app/core/startup/startup.service.ts b/src/app/core/startup/startup.service.ts index 56108d57d..305f99079 100644 --- a/src/app/core/startup/startup.service.ts +++ b/src/app/core/startup/startup.service.ts @@ -37,9 +37,7 @@ const DEFERRED_INIT_DELAY_MS = 1000; providedIn: 'root', }) export class StartupService { - // eslint-disable-next-line @typescript-eslint/no-unused-vars private _imexMetaService = inject(ImexViewService); - // eslint-disable-next-line @typescript-eslint/no-unused-vars private _translateService = inject(TranslateService); private _localBackupService = inject(LocalBackupService); private _globalConfigService = inject(GlobalConfigService); diff --git a/src/app/features/boards/store/boards.actions.ts b/src/app/features/boards/store/boards.actions.ts index c70ba1c16..749719b6b 100644 --- a/src/app/features/boards/store/boards.actions.ts +++ b/src/app/features/boards/store/boards.actions.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import { createAction } from '@ngrx/store'; import { BoardCfg, BoardPanelCfg } from '../boards.model'; import { PersistentActionMeta } from '../../../op-log/core/persistent-action.interface'; diff --git a/src/app/features/tasks/store/task-related-model.effects.spec.ts b/src/app/features/tasks/store/task-related-model.effects.spec.ts index 859afc2c9..2197ef012 100644 --- a/src/app/features/tasks/store/task-related-model.effects.spec.ts +++ b/src/app/features/tasks/store/task-related-model.effects.spec.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/explicit-function-return-type */ import { TestBed } from '@angular/core/testing'; import { provideMockActions } from '@ngrx/effects/testing'; import { provideMockStore, MockStore } from '@ngrx/store/testing'; diff --git a/src/app/op-log/backup/state-snapshot.service.spec.ts b/src/app/op-log/backup/state-snapshot.service.spec.ts index e1417d036..c0eddc943 100644 --- a/src/app/op-log/backup/state-snapshot.service.spec.ts +++ b/src/app/op-log/backup/state-snapshot.service.spec.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ import { TestBed } from '@angular/core/testing'; import { provideMockStore, MockStore } from '@ngrx/store/testing'; import { StateSnapshotService } from './state-snapshot.service'; diff --git a/src/app/op-log/capture/operation-capture.service.spec.ts b/src/app/op-log/capture/operation-capture.service.spec.ts index 116bb8cc5..b3777f903 100644 --- a/src/app/op-log/capture/operation-capture.service.spec.ts +++ b/src/app/op-log/capture/operation-capture.service.spec.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import { OperationCaptureService } from './operation-capture.service'; import { OpType, EntityType } from '../core/operation.types'; import { PersistentAction } from '../core/persistent-action.interface'; diff --git a/src/app/op-log/core/action-types.enum.ts b/src/app/op-log/core/action-types.enum.ts index 08f695e24..1045b070a 100644 --- a/src/app/op-log/core/action-types.enum.ts +++ b/src/app/op-log/core/action-types.enum.ts @@ -1,5 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ - /** * CRITICAL: These string values are IMMUTABLE. * diff --git a/src/app/op-log/core/persistent-action.interface.ts b/src/app/op-log/core/persistent-action.interface.ts index 729ffbd97..27c2e51b6 100644 --- a/src/app/op-log/core/persistent-action.interface.ts +++ b/src/app/op-log/core/persistent-action.interface.ts @@ -14,7 +14,6 @@ export interface PersistentActionMeta { export interface PersistentAction extends Action { type: string; // Standard NgRx action type meta: PersistentActionMeta; - // eslint-disable-next-line @typescript-eslint/no-explicit-any [key: string]: any; // Dynamic payload properties (NgRx action payloads) } diff --git a/src/app/op-log/core/types/sync.types.ts b/src/app/op-log/core/types/sync.types.ts index a2e13ec74..75e375bb7 100644 --- a/src/app/op-log/core/types/sync.types.ts +++ b/src/app/op-log/core/types/sync.types.ts @@ -42,7 +42,6 @@ export interface ModelCfg { cacheOnLoad?: boolean; validate?: (data: R | T) => IValidation; - // eslint-disable-next-line @typescript-eslint/no-explicit-any repair?: (data: any) => T; // any is intentional: repair handles malformed data defaultData?: T; diff --git a/src/app/op-log/encryption/compression-handler.spec.ts b/src/app/op-log/encryption/compression-handler.spec.ts index ccfc55f86..de56e1535 100644 --- a/src/app/op-log/encryption/compression-handler.spec.ts +++ b/src/app/op-log/encryption/compression-handler.spec.ts @@ -126,7 +126,7 @@ describe('compression-handler', () => { // Decompress using DecompressionStream (same API used by server-side Node.js zlib) const stream = new DecompressionStream('gzip'); const writer = stream.writable.getWriter(); - writer.write(compressed); + writer.write(compressed as BufferSource); writer.close(); const decompressed = await new Response(stream.readable).arrayBuffer(); const decoded = new TextDecoder().decode(decompressed); diff --git a/src/app/op-log/persistence/operation-log-store.service.ts b/src/app/op-log/persistence/operation-log-store.service.ts index c57065758..a51c9bb27 100644 --- a/src/app/op-log/persistence/operation-log-store.service.ts +++ b/src/app/op-log/persistence/operation-log-store.service.ts @@ -322,7 +322,6 @@ export class OperationLogStoreService { let storedEntries: StoredOperationLogEntry[]; try { // Type assertion needed for compound index key - idb's types don't fully support this - // eslint-disable-next-line @typescript-eslint/no-explicit-any storedEntries = await this.db.getAllFromIndex( STORE_NAMES.OPS, OPS_INDEXES.BY_SOURCE_AND_STATUS, @@ -621,7 +620,6 @@ export class OperationLogStoreService { let storedEntries: StoredOperationLogEntry[]; try { // Type assertion needed for compound index key - idb's types don't fully support this - // eslint-disable-next-line @typescript-eslint/no-explicit-any storedEntries = await this.db.getAllFromIndex( STORE_NAMES.OPS, OPS_INDEXES.BY_SOURCE_AND_STATUS, diff --git a/src/app/op-log/sync-providers/file-based/file-based-sync-adapter.service.spec.ts b/src/app/op-log/sync-providers/file-based/file-based-sync-adapter.service.spec.ts index 94b07798a..2d007da9a 100644 --- a/src/app/op-log/sync-providers/file-based/file-based-sync-adapter.service.spec.ts +++ b/src/app/op-log/sync-providers/file-based/file-based-sync-adapter.service.spec.ts @@ -136,7 +136,6 @@ describe('FileBasedSyncAdapterService', () => { mockStateSnapshotService = jasmine.createSpyObj('StateSnapshotService', [ 'getStateSnapshot', ]); - // eslint-disable-next-line @typescript-eslint/no-explicit-any mockStateSnapshotService.getStateSnapshot.and.returnValue({ tasks: [], projects: [], diff --git a/src/app/op-log/sync-providers/file-based/webdav/webdav-api.spec.ts b/src/app/op-log/sync-providers/file-based/webdav/webdav-api.spec.ts index c478882fb..a1f35b9c8 100644 --- a/src/app/op-log/sync-providers/file-based/webdav/webdav-api.spec.ts +++ b/src/app/op-log/sync-providers/file-based/webdav/webdav-api.spec.ts @@ -430,7 +430,6 @@ describe('WebdavApi', () => { await api.upload({ path: '/test.json', data: 'test', expectedRev: null }); - // eslint-disable-next-line @typescript-eslint/no-explicit-any const requestArgs = mockHttpAdapter.request.calls.mostRecent()?.args[0] as any; expect(requestArgs).toBeDefined(); expect(requestArgs.headers['If-Unmodified-Since']).toBeUndefined(); @@ -446,7 +445,6 @@ describe('WebdavApi', () => { await api.upload({ path: '/test.json', data: 'test' }); - // eslint-disable-next-line @typescript-eslint/no-explicit-any const requestArgs = mockHttpAdapter.request.calls.mostRecent()?.args[0] as any; expect(requestArgs).toBeDefined(); expect(requestArgs.headers['If-Unmodified-Since']).toBeUndefined(); @@ -467,7 +465,6 @@ describe('WebdavApi', () => { isForceOverwrite: true, }); - // eslint-disable-next-line @typescript-eslint/no-explicit-any const requestArgs = mockHttpAdapter.request.calls.mostRecent()?.args[0] as any; expect(requestArgs).toBeDefined(); expect(requestArgs.headers['If-Unmodified-Since']).toBeUndefined(); diff --git a/src/app/op-log/sync-providers/super-sync/super-sync.spec.ts b/src/app/op-log/sync-providers/super-sync/super-sync.spec.ts index 5b978994a..712f3c537 100644 --- a/src/app/op-log/sync-providers/super-sync/super-sync.spec.ts +++ b/src/app/op-log/sync-providers/super-sync/super-sync.spec.ts @@ -12,7 +12,7 @@ import { SyncOperation } from '../provider.interface'; const decompressGzip = async (compressed: Uint8Array): Promise => { const stream = new DecompressionStream('gzip'); const writer = stream.writable.getWriter(); - writer.write(compressed); + writer.write(compressed as BufferSource); writer.close(); const decompressed = await new Response(stream.readable).arrayBuffer(); return new TextDecoder().decode(decompressed); @@ -1019,7 +1019,7 @@ describe('SuperSyncProvider', () => { expect(capturedBody).not.toBeNull(); const stream = new DecompressionStream('gzip'); const writer = stream.writable.getWriter(); - writer.write(capturedBody!); + writer.write(capturedBody! as BufferSource); writer.close(); const decompressed = await new Response(stream.readable).arrayBuffer(); const payload = JSON.parse(new TextDecoder().decode(decompressed)); @@ -1085,7 +1085,7 @@ describe('SuperSyncProvider', () => { const body = fetchSpy.calls.mostRecent().args[1].body as Uint8Array; const stream = new DecompressionStream('gzip'); const writer = stream.writable.getWriter(); - writer.write(body); + writer.write(body as BufferSource); writer.close(); const decompressed = await new Response(stream.readable).arrayBuffer(); const payload = JSON.parse(new TextDecoder().decode(decompressed)); diff --git a/src/app/op-log/sync/conflict-resolution.service.ts b/src/app/op-log/sync/conflict-resolution.service.ts index 2166a21da..01d322d67 100644 --- a/src/app/op-log/sync/conflict-resolution.service.ts +++ b/src/app/op-log/sync/conflict-resolution.service.ts @@ -632,7 +632,6 @@ export class ConflictResolutionService { // this to MemoizedSelectorWithProps. This is a // known NgRx typing limitation. Runtime behavior is correct. return await firstValueFrom( - // eslint-disable-next-line @typescript-eslint/no-explicit-any this.store.select(config.selectById as any, { id: entityId }), ); } diff --git a/src/app/op-log/sync/lock.service.spec.ts b/src/app/op-log/sync/lock.service.spec.ts index abac6f6c9..a43bdf549 100644 --- a/src/app/op-log/sync/lock.service.spec.ts +++ b/src/app/op-log/sync/lock.service.spec.ts @@ -584,7 +584,6 @@ describe('LockService', () => { it('should pass callback to navigator.locks.request', async () => { let callbackExecutedInLock = false; const locksSpy = spyOn(navigator.locks, 'request').and.callFake( - // eslint-disable-next-line @typescript-eslint/no-explicit-any async (_name: string, callback: any) => { callbackExecutedInLock = true; return callback(null); diff --git a/src/app/op-log/sync/lock.service.ts b/src/app/op-log/sync/lock.service.ts index cabdf29fc..3934c5474 100644 --- a/src/app/op-log/sync/lock.service.ts +++ b/src/app/op-log/sync/lock.service.ts @@ -47,7 +47,6 @@ export class LockService { ); return this._fallbackRequest(lockName, callback); } - // eslint-disable-next-line @typescript-eslint/no-unsafe-return return navigator.locks.request(lockName, callback); } diff --git a/src/app/op-log/sync/server-migration.service.spec.ts b/src/app/op-log/sync/server-migration.service.spec.ts index 8903bb610..381bd71aa 100644 --- a/src/app/op-log/sync/server-migration.service.spec.ts +++ b/src/app/op-log/sync/server-migration.service.spec.ts @@ -1,4 +1,4 @@ -/* eslint-disable @typescript-eslint/naming-convention, @typescript-eslint/no-explicit-any */ +/* eslint-disable @typescript-eslint/naming-convention */ import { TestBed } from '@angular/core/testing'; import { provideMockStore, MockStore } from '@ngrx/store/testing'; import { ServerMigrationService } from './server-migration.service'; diff --git a/src/app/op-log/testing/integration/lww-update-store-application.integration.spec.ts b/src/app/op-log/testing/integration/lww-update-store-application.integration.spec.ts index 0122fab6a..15b179386 100644 --- a/src/app/op-log/testing/integration/lww-update-store-application.integration.spec.ts +++ b/src/app/op-log/testing/integration/lww-update-store-application.integration.spec.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ /** * Integration tests for LWW Update operations and store application. * diff --git a/src/app/op-log/testing/integration/multi-entity-atomicity.integration.spec.ts b/src/app/op-log/testing/integration/multi-entity-atomicity.integration.spec.ts index 910c07e47..598ecc075 100644 --- a/src/app/op-log/testing/integration/multi-entity-atomicity.integration.spec.ts +++ b/src/app/op-log/testing/integration/multi-entity-atomicity.integration.spec.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/naming-convention */ import { OperationCaptureService } from '../../capture/operation-capture.service'; import { PersistentAction, diff --git a/src/app/root-store/meta/task-shared-meta-reducers/issue-provider-shared.reducer.spec.ts b/src/app/root-store/meta/task-shared-meta-reducers/issue-provider-shared.reducer.spec.ts index 3f65dd173..646501186 100644 --- a/src/app/root-store/meta/task-shared-meta-reducers/issue-provider-shared.reducer.spec.ts +++ b/src/app/root-store/meta/task-shared-meta-reducers/issue-provider-shared.reducer.spec.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/explicit-function-return-type,@typescript-eslint/naming-convention */ import { issueProviderSharedMetaReducer } from './issue-provider-shared.reducer'; import { TaskSharedActions } from '../task-shared.actions'; import { TASK_FEATURE_NAME } from '../../../features/tasks/store/task.reducer'; diff --git a/src/app/root-store/meta/task-shared-meta-reducers/short-syntax-shared.reducer.spec.ts b/src/app/root-store/meta/task-shared-meta-reducers/short-syntax-shared.reducer.spec.ts index 653297d26..be55751bb 100644 --- a/src/app/root-store/meta/task-shared-meta-reducers/short-syntax-shared.reducer.spec.ts +++ b/src/app/root-store/meta/task-shared-meta-reducers/short-syntax-shared.reducer.spec.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/explicit-function-return-type,@typescript-eslint/naming-convention */ import { shortSyntaxSharedMetaReducer } from './short-syntax-shared.reducer'; import { RootState } from '../../root-state'; import { Task } from '../../../features/tasks/task.model'; diff --git a/src/app/root-store/meta/task-shared-meta-reducers/task-repeat-cfg-shared.reducer.spec.ts b/src/app/root-store/meta/task-shared-meta-reducers/task-repeat-cfg-shared.reducer.spec.ts index 06ef99708..6cd65b400 100644 --- a/src/app/root-store/meta/task-shared-meta-reducers/task-repeat-cfg-shared.reducer.spec.ts +++ b/src/app/root-store/meta/task-shared-meta-reducers/task-repeat-cfg-shared.reducer.spec.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/explicit-function-return-type,@typescript-eslint/naming-convention */ import { taskRepeatCfgSharedMetaReducer } from './task-repeat-cfg-shared.reducer'; import { TaskSharedActions } from '../task-shared.actions'; import { TASK_FEATURE_NAME } from '../../../features/tasks/store/task.reducer'; diff --git a/src/app/root-store/meta/undo-task-delete.meta-reducer.spec.ts b/src/app/root-store/meta/undo-task-delete.meta-reducer.spec.ts index ca050653e..4b4edb0cd 100644 --- a/src/app/root-store/meta/undo-task-delete.meta-reducer.spec.ts +++ b/src/app/root-store/meta/undo-task-delete.meta-reducer.spec.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/explicit-function-return-type,@typescript-eslint/naming-convention */ import { undoTaskDeleteMetaReducer, getLastDeletePayload, diff --git a/src/app/util/filter-local-action.ts b/src/app/util/filter-local-action.ts index cd4a95eaf..89ec5ffb7 100644 --- a/src/app/util/filter-local-action.ts +++ b/src/app/util/filter-local-action.ts @@ -18,7 +18,6 @@ import { Action } from '@ngrx/store'; * ); * ``` */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any export const filterLocalAction = (): OperatorFunction => filter((action: T) => !(action as any).meta?.isRemote); @@ -39,6 +38,5 @@ export const filterLocalAction = (): OperatorFunction => * ); * ``` */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any export const filterRemoteAction = (): OperatorFunction => filter((action: T) => !!(action as any).meta?.isRemote);