wealth/eslint.config.mjs

72 lines
2.0 KiB
JavaScript
Raw Normal View History

2026-10-02 14:19:11 +00:00
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'],
},
2026-10-02 14:19:11 +00:00
{
sourceTag: 'scope:shared',
onlyDependOnLibsWithTags: ['scope:shared'],
},
],
},
],
},
},
];