f0def62eef
Features:
- "Keep me signed in" — login/register accept a rememberMe flag and the
backend signs JWTs with JWT_LONG_EXPIRATION (30d) when set, otherwise
JWT_EXPIRATION (1d). DTOs, controller, and AuthService updated.
- Movie release dates — DailyChallenge, GameSession, and VersusMatch get
nullable movieAReleaseDate / movieBReleaseDate columns (forward-only
migration). Daily-challenges, games, versus-match, and versus-async
services now persist and return release_date from TMDB. Versus waiting
lobby payloads strip the new fields alongside the titles to avoid
leaking the puzzle to non-joined players.
Lint cleanup (132 → 0 errors):
- Shared utilities: src/common/utils/error.util.ts (getErrorMessage) and
src/auth/types/jwt-payload.ts (JwtPayload).
- Replaced catch(error: any){error.message} with getErrorMessage(error)
across services and gateways.
- jwtService.verify<JwtPayload>(token) in versus / game-night / chat /
notifications gateways.
- Typed Prisma JSON columns where they're read (game-night, leaderboards,
admin score blobs).
- Removed redundant async on sync handlers, wrapped setTimeout/setInterval
Promise callbacks with void IIFEs to satisfy no-misused-promises.
- eslint.config.mjs: allow `_`-prefixed unused vars (industry standard).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
45 lines
1.1 KiB
JavaScript
45 lines
1.1 KiB
JavaScript
// @ts-check
|
|
import eslint from '@eslint/js';
|
|
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
|
|
import globals from 'globals';
|
|
import tseslint from 'typescript-eslint';
|
|
|
|
export default tseslint.config(
|
|
{
|
|
ignores: ['eslint.config.mjs'],
|
|
},
|
|
eslint.configs.recommended,
|
|
...tseslint.configs.recommendedTypeChecked,
|
|
eslintPluginPrettierRecommended,
|
|
{
|
|
languageOptions: {
|
|
globals: {
|
|
...globals.node,
|
|
...globals.jest,
|
|
},
|
|
sourceType: 'commonjs',
|
|
parserOptions: {
|
|
projectService: true,
|
|
tsconfigRootDir: import.meta.dirname,
|
|
},
|
|
},
|
|
},
|
|
{
|
|
rules: {
|
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
'@typescript-eslint/no-floating-promises': 'warn',
|
|
'@typescript-eslint/no-unsafe-argument': 'warn',
|
|
'@typescript-eslint/no-unused-vars': [
|
|
'error',
|
|
{
|
|
argsIgnorePattern: '^_',
|
|
varsIgnorePattern: '^_',
|
|
caughtErrorsIgnorePattern: '^_',
|
|
destructuredArrayIgnorePattern: '^_',
|
|
},
|
|
],
|
|
"prettier/prettier": ["error", { endOfLine: "auto" }],
|
|
},
|
|
},
|
|
);
|