componenets standardization 1

This commit is contained in:
IGNY8 VPS (Salman)
2026-01-01 21:42:04 +00:00
parent c880e24fc0
commit a4691ad2da
95 changed files with 3597 additions and 1745 deletions

View File

@@ -4,6 +4,10 @@ import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import tseslint from 'typescript-eslint'
// Custom IGNY8 Design System plugin
// See: docs/30-FRONTEND/COMPONENT-SYSTEM.md for full documentation
import igny8DesignSystem from './eslint/eslint-plugin-igny8-design-system.cjs'
export default tseslint.config(
{ ignores: ['dist'] },
{
@@ -16,6 +20,7 @@ export default tseslint.config(
plugins: {
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
'igny8-design-system': igny8DesignSystem,
},
rules: {
...reactHooks.configs.recommended.rules,
@@ -23,6 +28,27 @@ export default tseslint.config(
'warn',
{ allowConstantExport: true },
],
// =====================================================
// IGNY8 DESIGN SYSTEM ENFORCEMENT
// These rules prevent inconsistent component usage
// =====================================================
// Prevent direct imports from icon libraries - must use src/icons
'no-restricted-imports': ['error', {
patterns: [
{
group: ['@heroicons/*', 'lucide-react', '@mui/icons-material', 'react-icons/*'],
message: 'Import icons from src/icons instead. Add new icons to src/icons/index.ts if needed.'
}
]
}],
// IGNY8 Design System Rules - Set to 'warn' initially, change to 'error' after fixing existing code
// These will show warnings for all raw HTML elements that should use components
'igny8-design-system/no-raw-button': 'warn',
'igny8-design-system/no-raw-input': 'warn',
'igny8-design-system/no-raw-select': 'warn',
'igny8-design-system/no-raw-textarea': 'warn',
},
},
)