import nx from '@nx/eslint-plugin'; import tseslint from 'typescript-eslint'; // ESLint runs only the module-boundary rule; oxlint handles everything else. export default [ ...nx.configs['flat/base'], { ignores: ['**/dist', '**/out-tsc', '**/.next'] }, { files: [ '**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx', '**/*.mjs', '**/*.cjs', ], languageOptions: { parser: tseslint.parser }, rules: { '@nx/enforce-module-boundaries': [ 'error', { enforceBuildableLibDependency: true, allow: ['^.*/eslint(\\.base)?\\.config\\.[cm]?[jt]s$'], depConstraints: [ { sourceTag: 'type:app', onlyDependOnLibsWithTags: [ 'type:platform', 'type:integration', 'type:ui', 'type:lib', 'type:tool', ], }, { sourceTag: 'type:platform', onlyDependOnLibsWithTags: [ 'type:integration', 'type:ui', 'type:lib', 'type:tool', ], }, { sourceTag: 'type:integration', onlyDependOnLibsWithTags: ['type:ui', 'type:lib', 'type:tool'], }, { sourceTag: 'type:ui', onlyDependOnLibsWithTags: ['type:lib', 'type:tool'], }, { sourceTag: 'type:lib', onlyDependOnLibsWithTags: ['type:tool'] }, { sourceTag: 'type:tool', onlyDependOnLibsWithTags: [] }, { sourceTag: 'scope:market', onlyDependOnLibsWithTags: ['scope:market', 'scope:shared'], }, { sourceTag: 'scope:admin', onlyDependOnLibsWithTags: ['scope:admin', 'scope:shared'], }, { sourceTag: 'scope:shared', onlyDependOnLibsWithTags: ['scope:shared'], }, ], }, ], }, }, ];