mirror of
https://github.com/complexcaresolutions/cms.c2sgmbh.git
synced 2026-03-17 19:44:12 +00:00
- Add Products collection with comprehensive fields (pricing, inventory, SEO, CTA) - Add ProductCategories collection with hierarchical structure - Implement CI/CD pipeline with GitHub Actions (lint, typecheck, test, build, e2e) - Add access control test utilities and unit tests - Fix Posts API to include category field for backwards compatibility - Update ESLint config with ignores for migrations and admin components - Add centralized access control functions in src/lib/access - Add db-direct.sh utility script for database access 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
50 lines
1.4 KiB
JavaScript
50 lines
1.4 KiB
JavaScript
import { dirname } from 'path'
|
|
import { fileURLToPath } from 'url'
|
|
import { FlatCompat } from '@eslint/eslintrc'
|
|
|
|
const __filename = fileURLToPath(import.meta.url)
|
|
const __dirname = dirname(__filename)
|
|
|
|
const compat = new FlatCompat({
|
|
baseDirectory: __dirname,
|
|
})
|
|
|
|
const eslintConfig = [
|
|
...compat.extends('next/core-web-vitals', 'next/typescript'),
|
|
{
|
|
rules: {
|
|
'@typescript-eslint/ban-ts-comment': 'warn',
|
|
'@typescript-eslint/no-empty-object-type': 'warn',
|
|
'@typescript-eslint/no-explicit-any': 'warn',
|
|
'@typescript-eslint/no-unsafe-function-type': 'warn', // Some legacy patterns use Function type
|
|
'@typescript-eslint/no-unused-vars': [
|
|
'warn',
|
|
{
|
|
vars: 'all',
|
|
args: 'after-used',
|
|
ignoreRestSiblings: false,
|
|
argsIgnorePattern: '^_',
|
|
varsIgnorePattern: '^_',
|
|
destructuredArrayIgnorePattern: '^_',
|
|
caughtErrorsIgnorePattern: '^(_|ignore)',
|
|
},
|
|
],
|
|
},
|
|
},
|
|
{
|
|
// Payload Admin components can use <a> elements (they're not in Next.js page router)
|
|
files: ['src/components/admin/**/*.tsx'],
|
|
rules: {
|
|
'@next/next/no-html-link-for-pages': 'off',
|
|
},
|
|
},
|
|
{
|
|
ignores: [
|
|
'.next/',
|
|
'src/migrations/', // Payload migrations have required but unused params
|
|
'src/migrations_backup/',
|
|
],
|
|
},
|
|
]
|
|
|
|
export default eslintConfig
|