chore: Update Husky Pre-Commit and Pre-Push Hooks

This commit is contained in:
Patrick Loser
2026-07-26 18:46:51 +02:00
committed by Rajarshee Chatterjee
parent 72bfcad034
commit 8b0a8dc4c0
7 changed files with 15 additions and 10 deletions
+3
View File
@@ -47,5 +47,8 @@ jobs:
- name: Generate Environment Variables
run: pnpm generate:env:debug
- name: Check Types
run: pnpm run type-check
- name: Run Tests
run: pnpm run test
+1
View File
@@ -0,0 +1 @@
npm run type-check
@@ -9,12 +9,6 @@ declare class NativeVolumeButtonListenerModule extends NativeModule<NativeVolume
setActive(active: boolean): void;
}
export default requireNativeModule<NativeVolumeButtonListenerModule>(
'NativeVolumeButtonListener',
);
setActive(active: boolean): void;
}
export default requireNativeModule<NativeVolumeButtonListenerModule>(
'NativeVolumeButtonListener',
);
+7 -3
View File
@@ -30,6 +30,7 @@
"type-check": "tsc --noEmit",
"clean:generated": "rm -rf .expo .rock android/build android/app/build android/app/.cxx modules/*/android/build modules/*/android/.cxx modules/*/lib src/generated tsconfig.tsbuildinfo modules/*/tsconfig.tsbuildinfo",
"clean:full": "pnpm run clean:generated && rm -rf node_modules && pnpm install && cd android && ./gradlew clean && cd .. && npx expo start --clear",
"check": "pnpm run format:check && pnpm run lint && pnpm run typecheck",
"prepare": "husky install",
"nix:shell": "nix develop --extra-experimental-features nix-command --extra-experimental-features flakes",
"nix:emulator": "nix develop .#emulator --extra-experimental-features nix-command --extra-experimental-features flakes"
@@ -153,9 +154,12 @@
}
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": [
"eslint --fix",
"prettier --check"
"*.{ts,tsx,js,jsx}": [
"prettier --write",
"eslint --fix"
],
"*.{json,md,css,scss,yml,yaml}": [
"prettier --write"
]
},
"engines": {
+1
View File
@@ -259,6 +259,7 @@
"newUpdateAvailable": "New update available",
"none": "None",
"ok": "Ok",
"close": "Close",
"pause": "Pause",
"preparing": "Preparing",
"remove": "Remove",
+1
View File
@@ -232,6 +232,7 @@ export interface StringMap {
'common.newUpdateAvailable': 'string';
'common.none': 'string';
'common.ok': 'string';
'common.close': 'string';
'common.pause': 'string';
'common.preparing': 'string';
'common.remove': 'string';
+2 -1
View File
@@ -11,7 +11,8 @@ export default function useTimeTracking(
turnedOn: boolean,
increaseTimeSpent: (chapterId: number, elapsed: number) => void,
) {
const lastUserInteractionRef = useRef(0);
// eslint-disable-next-line react-hooks/purity
const lastUserInteractionRef = useRef(Date.now());
const isTTSReadingRef = useRef(false);
/** Increases the time spent on the current chapter since the last user interaction, as long as it was not too long ago */