import nx from '@nx/eslint-plugin'; export default [ ...nx.configs['flat/base'], ...nx.configs['flat/typescript'], ...nx.configs['flat/javascript'], { "ignores": [ "**/dist", "**/out-tsc", "**/vitest.config.*.timestamp*" ] }, { files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'], rules: { '@nx/enforce-module-boundaries': [ 'error', { enforceBuildableLibDependency: true, allow: ['^.*/eslint(\\.base)?\\.config\\.[cm]?[jt]s$'], // Module boundaries per ADR-0003. // // Scope tags partition the workspace into front (portal-shell) / // back (portal-bff) / shared (consumable by both). Type tags // partition into apps / feature libs / shared libs. // // Both axes apply: a lib must satisfy both scope and type rules // to be importable. depConstraints: [ { sourceTag: 'scope:portal-shell', onlyDependOnLibsWithTags: ['scope:portal-shell', 'scope:shared'], }, { sourceTag: 'scope:portal-bff', onlyDependOnLibsWithTags: ['scope:portal-bff', 'scope:shared'], }, { sourceTag: 'scope:shared', onlyDependOnLibsWithTags: ['scope:shared'], }, { sourceTag: 'type:app', onlyDependOnLibsWithTags: ['type:feature', 'type:shared'], }, { sourceTag: 'type:feature', onlyDependOnLibsWithTags: ['type:feature', 'type:shared'], }, { sourceTag: 'type:shared', onlyDependOnLibsWithTags: ['type:shared'], }, ], }, ], }, }, { files: [ '**/*.ts', '**/*.tsx', '**/*.cts', '**/*.mts', '**/*.js', '**/*.jsx', '**/*.cjs', '**/*.mjs', ], // Override or add rules here rules: {}, }, ];