Fix TypeScript linting issues and test failures

- Replace 37 instances of 'any' type with proper TypeScript types
- Fix trailing spaces in i18n.test.ts
- Add proper interfaces for profanity analysis and matches
- Extend Express Request interface with custom properties
- Fix error handling in ProfanityFilterService for constraint violations
- Update test mocks to satisfy TypeScript strict checking
- All 147 tests now pass with 0 linting errors

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Claude Code 2025-07-07 21:14:54 -04:00
parent a537072d3d
commit f8802232c6
14 changed files with 138 additions and 61 deletions

View file

@ -23,10 +23,9 @@ describe('I18n API Routes', () => {
beforeEach(() => {
app = express();
app.use('/api/i18n', createI18nRoutes());
// Reset mocks
jest.clearAllMocks();
// Default mock implementations
mockI18nService.getAvailableLocales.mockReturnValue(['en', 'es-MX']);
mockI18nService.getDefaultLocale.mockReturnValue('en');