diff --git a/proto/eslint.config.mjs b/proto/eslint.config.mjs
index 719cea2..d2ade2d 100755
--- a/proto/eslint.config.mjs
+++ b/proto/eslint.config.mjs
@@ -20,6 +20,25 @@ const eslintConfig = [
"next-env.d.ts",
],
},
+ {
+ // WHY: test suites legitimately use `any` mocks, jest globals and CommonJS
+ // require(); jest/playwright config files are CommonJS by design. Relax the
+ // strict rules there so lint failures point at real production-code issues.
+ files: [
+ "**/*.test.ts",
+ "**/*.test.tsx",
+ "jest.config*.js",
+ "jest.setup*.js",
+ "jest.globalSetup*.js",
+ "playwright.config.ts",
+ ],
+ rules: {
+ "@typescript-eslint/no-explicit-any": "off",
+ "@typescript-eslint/no-require-imports": "off",
+ "@typescript-eslint/no-unused-vars": "off",
+ "react/display-name": "off",
+ },
+ },
];
export default eslintConfig;
diff --git a/proto/src/__tests__/integration.test.ts b/proto/src/__tests__/integration.test.ts
index 4ad251f..1958332 100755
--- a/proto/src/__tests__/integration.test.ts
+++ b/proto/src/__tests__/integration.test.ts
@@ -91,7 +91,8 @@ describe('Docker Environment Integration Tests', () => {
const mozditDb = mongoClient.db('mozdit')
const siteConfig = await mozditDb.collection('site_config').findOne()
-
+
+ if (!siteConfig) throw new Error('site_config document not found')
expect(siteConfig).toBeTruthy()
expect(siteConfig).toHaveProperty('type', 'site_config')
expect(siteConfig).toHaveProperty('environment', 'development')
diff --git a/proto/src/app/page.tsx b/proto/src/app/page.tsx
index bf1e9a1..2a62627 100755
--- a/proto/src/app/page.tsx
+++ b/proto/src/app/page.tsx
@@ -1,4 +1,3 @@
-import { siteConfig } from '@/config/site'
import { content } from '@/content'
const { home: pageContent } = content.pages
@@ -94,7 +93,7 @@ export default function Home() {
- {pageContent.about.usps.map((usp: any, index: number) => (
+ {pageContent.about.usps.map((usp, index) => (
{/* Company Info */}
-
-
+
- {content.pages.home.services.items.map((service: any) => (
+ {content.pages.home.services.items.map((service) => (
-
{/* Logo */}
{/* Desktop Navigation */}
- {siteConfig.navigation.main.map((item, index) => (
+ {siteConfig.navigation.main.map((item) => (
{
it('should create logger with correct configuration', () => {
// Set NODE_ENV to development to get debug level
- process.env.NODE_ENV = 'development'
+ // NODE_ENV is typed read-only in @types/node — assign via a wider type.
+ ;(process.env as unknown as Record).NODE_ENV = 'development'
// Import after clearing modules
require('./logger')
@@ -54,7 +55,7 @@ describe('Logger', () => {
// Clear the mock calls to avoid interference from logger creation
const mockLogger = mockedWinston.createLogger()
- mockLogger.child.mockClear()
+ ;(mockLogger.child as jest.Mock).mockClear()
const componentLogger = createComponentLogger('test-component')
expect(logger.child).toHaveBeenCalledWith({ component: 'test-component' })
diff --git a/proto/src/lib/logger.ts b/proto/src/lib/logger.ts
index 0ad6672..8b026ca 100755
--- a/proto/src/lib/logger.ts
+++ b/proto/src/lib/logger.ts
@@ -92,7 +92,7 @@ export const generateRequestId = (): string =>
export const withTiming = async (
operation: string,
fn: () => Promise,
- metadata: any = {}
+ metadata: Record = {}
): Promise => {
const startTime = Date.now()
logger.debug(`Started ${operation}`, metadata)
diff --git a/proto/src/types/site.ts b/proto/src/types/site.ts
index ddd3baa..b9d77dc 100755
--- a/proto/src/types/site.ts
+++ b/proto/src/types/site.ts
@@ -74,7 +74,7 @@ export interface AboutSectionConfig {
}
export interface FooterConfig {
- copyright: string
+ // copyright text lives in content/common.json (footer.copyright) — CMS-editable
links: {
label: string
href: string
diff --git a/scripts/pre-deploy-tests.sh b/scripts/pre-deploy-tests.sh
index e9ad1ac..24f78da 100755
--- a/scripts/pre-deploy-tests.sh
+++ b/scripts/pre-deploy-tests.sh
@@ -24,6 +24,8 @@ run() {
# ── Weboldal (proto) ─────────────────────────────────────────────────────────
run "proto: unit tesztek (jest, 60+)" bash -c "cd '${ROOT}/proto' && npm test --silent"
+run "proto: típusellenőrzés (tsc --noEmit)" bash -c "cd '${ROOT}/proto' && npx tsc --noEmit"
+run "proto: lint (eslint)" bash -c "cd '${ROOT}/proto' && npm run lint"
# ── Tartalom ─────────────────────────────────────────────────────────────────
run "content: séma-validáció (minden JSON)" node "${ROOT}/scripts/test-content-schema.js"