diff --git a/commitlint.config.mjs b/commitlint.config.mjs index 555e8c3..8066a93 100644 --- a/commitlint.config.mjs +++ b/commitlint.config.mjs @@ -1,8 +1,3 @@ -/** - * Commitlint configuration - * Conventional Commits enforced per CLAUDE.md - * @see https://commitlint.js.org/#/reference-configuration - */ export default { extends: ['@commitlint/config-conventional'], rules: { @@ -25,7 +20,6 @@ export default { 'security', ], ], - 'scope-empty': [0], 'subject-case': [0], }, } diff --git a/prettier.config.mjs b/prettier.config.mjs index aa91f80..046141c 100644 --- a/prettier.config.mjs +++ b/prettier.config.mjs @@ -1,14 +1,9 @@ -/** - * Prettier configuration - * @see https://prettier.io/docs/en/configuration.html - */ const config = { semi: false, singleQuote: true, tabWidth: 2, trailingComma: 'es5', printWidth: 100, - plugins: [], } export default config diff --git a/src/app/robots.test.ts b/src/app/robots.test.ts index 018207b..927ae15 100644 --- a/src/app/robots.test.ts +++ b/src/app/robots.test.ts @@ -22,7 +22,7 @@ describe('robots.txt', () => { it('disallows admin, auth, API, and non-public pages', () => { const rules = getRules() - expect(rules[0].disallow).toEqual( + expect(rules[0]!.disallow).toEqual( expect.arrayContaining([ '/admin/', '/auth/', @@ -36,18 +36,18 @@ describe('robots.txt', () => { it('blocks SEO bots', () => { const rules = getRules() - expect(rules[1].userAgent).toEqual( + expect(rules[1]!.userAgent).toEqual( expect.arrayContaining(['SemrushBot', 'AhrefsBot', 'MJ12bot']) ) - expect(rules[1].disallow).toBe('/') + expect(rules[1]!.disallow).toBe('/') }) it('blocks AI crawlers', () => { const rules = getRules() - expect(rules[2].userAgent).toEqual( + expect(rules[2]!.userAgent).toEqual( expect.arrayContaining(['GPTBot', 'ClaudeBot', 'CCBot', 'Google-Extended']) ) - expect(rules[2].disallow).toBe('/') + expect(rules[2]!.disallow).toBe('/') }) it('includes sitemap directive', () => { diff --git a/src/app/sitemap.test.ts b/src/app/sitemap.test.ts index 63ecbb2..d45733c 100644 --- a/src/app/sitemap.test.ts +++ b/src/app/sitemap.test.ts @@ -161,7 +161,7 @@ describe('sitemap', () => { const result = await sitemap() // Should still return at least the homepage expect(result.length).toBeGreaterThanOrEqual(1) - expect(result[0].url).toBe('https://barazo.forum') + expect(result[0]!.url).toBe('https://barazo.forum') }) it('excludes adult-rated categories from sitemap', async () => { diff --git a/src/components/moderation-controls.tsx b/src/components/moderation-controls.tsx index 880ce25..7ad68f2 100644 --- a/src/components/moderation-controls.tsx +++ b/src/components/moderation-controls.tsx @@ -22,7 +22,7 @@ interface ModerationControlsProps { className?: string } -const ACTION_CONFIRMATIONS: Record = { +const ACTION_CONFIRMATIONS: Record = { delete: { title: 'Delete Topic', description: diff --git a/tsconfig.json b/tsconfig.json index 7d85f4b..e734290 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,6 +5,7 @@ "allowJs": true, "skipLibCheck": true, "strict": true, + "noUncheckedIndexedAccess": true, "noEmit": true, "esModuleInterop": true, "module": "esnext",