diff --git a/eslint.config.js b/eslint.config.js index c127ef87..a3e81b96 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -30,6 +30,9 @@ export default [ plugins: { boundaries }, settings: { 'boundaries/elements': boundariesElements, + // Migration is complete (v7 entity selectors below); skip legacy-pattern + // detection on every lint pass. + 'boundaries/legacy-warnings': false, // Resolve `~/*` path aliases so boundaries can classify imports. 'import/resolver': { typescript: { @@ -42,34 +45,36 @@ export default [ 'error', { default: 'allow', - rules: [ + policies: [ { - from: { type: 'features' }, - disallow: { to: { type: 'features' } }, + from: { element: { type: 'features' } }, + disallow: { to: { element: { type: 'features' } } }, dependency: { kind: 'value' }, }, // Same-feature interior imports. { - from: { type: 'features' }, - allow: { to: { type: 'features', captured: { feature: '{{from.captured.feature}}' } } }, + from: { element: { type: 'features' } }, + allow: { + to: { element: { type: 'features', captured: { feature: '{{ from.element.captured.feature }}' } } }, + }, dependency: { kind: 'value' }, }, // Any feature can import another feature's top-level barrels: // `index.ts` (client-safe) and `index.server.ts` (server-only). { - from: { type: 'features' }, - allow: { to: { type: 'features', path: 'app/features/*/index.{ts,tsx}' } }, + from: { element: { type: 'features' } }, + allow: { to: { element: { type: 'features' }, file: { path: 'app/features/*/index.{ts,tsx}' } } }, dependency: { kind: 'value' }, }, { - from: { type: 'features' }, - allow: { to: { type: 'features', path: 'app/features/*/index.server.{ts,tsx}' } }, + from: { element: { type: 'features' } }, + allow: { to: { element: { type: 'features' }, file: { path: 'app/features/*/index.server.{ts,tsx}' } } }, dependency: { kind: 'value' }, }, // Dashboard is the documented cross-feature aggregator. { - from: { type: 'features', captured: { feature: 'dashboard' } }, - allow: { to: { type: 'features' } }, + from: { element: { type: 'features', captured: { feature: 'dashboard' } } }, + allow: { to: { element: { type: 'features' } } }, dependency: { kind: 'value' }, }, ], diff --git a/package.json b/package.json index 8f58cf88..e529c6d7 100644 --- a/package.json +++ b/package.json @@ -97,7 +97,7 @@ "@vitest/coverage-v8": "^4.1.10", "eslint": "^10.7.0", "eslint-import-resolver-typescript": "^4.4.5", - "eslint-plugin-boundaries": "^6.0.2", + "eslint-plugin-boundaries": "^7.0.2", "lefthook": "^2.1.10", "prisma": "^7.8.0", "shadcn": "^4.13.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a45c389f..12822fd5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -185,8 +185,8 @@ importers: specifier: ^4.4.5 version: 4.4.5(eslint@10.7.0(jiti@2.7.0)) eslint-plugin-boundaries: - specifier: ^6.0.2 - version: 6.0.2(@typescript-eslint/parser@8.64.0(eslint@10.7.0(jiti@2.7.0))(typescript@6.0.3))(eslint-import-resolver-typescript@4.4.5(eslint@10.7.0(jiti@2.7.0)))(eslint@10.7.0(jiti@2.7.0)) + specifier: ^7.0.2 + version: 7.0.2(@typescript-eslint/parser@8.64.0(eslint@10.7.0(jiti@2.7.0))(typescript@6.0.3))(eslint-import-resolver-typescript@4.4.5(eslint@10.7.0(jiti@2.7.0)))(eslint@10.7.0(jiti@2.7.0)) lefthook: specifier: ^2.1.10 version: 2.1.10 @@ -482,8 +482,8 @@ packages: cpu: [x64] os: [win32] - '@boundaries/elements@2.0.1': - resolution: {integrity: sha512-sAWO3D8PFP6pBXdxxW93SQi/KQqqhE2AAHo3AgWfdtJXwO6bfK6/wUN81XnOZk0qRC6vHzUEKhjwVD9dtDWvxg==} + '@boundaries/elements@3.0.1': + resolution: {integrity: sha512-T53UueJVRIn1B2G5FWo6T3rqAA1aHcuypRweQcbW6Z/leUygsHW54Gezkm/8uxB9Fw8ewE+izfKKmA9XVv7HdQ==} engines: {node: '>=18.18'} '@clack/core@0.5.0': @@ -3794,8 +3794,8 @@ packages: eslint-import-resolver-webpack: optional: true - eslint-plugin-boundaries@6.0.2: - resolution: {integrity: sha512-wSHgiYeMEbziP91lH0UQ9oslgF2djG1x+LV9z/qO19ggMKZaCB8pKIGePHAY91eLF4EAgpsxQk8MRSFGRPfPzw==} + eslint-plugin-boundaries@7.0.2: + resolution: {integrity: sha512-VLaPMvNh+ONw6F/S0gpkS0/QDudqVjcaL1DoGo+8sJqZmxxabOtrFZ24PDI1jQLg3pyqujzJ3/4Cq7Bk249gjQ==} engines: {node: '>=18.18'} peerDependencies: eslint: '>=6.0.0' @@ -4417,6 +4417,10 @@ packages: resolution: {integrity: sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==} engines: {node: '>= 0.4'} + is-core-module@2.16.2: + resolution: {integrity: sha512-evOr8xfXKxE6qSR0hSXL2r3sd7ALj8+7jQEUvPYcm5sgZFdJ+AYzT6yNmJenvIYQBgIGwfwz08sL8zoL7yq2BA==} + engines: {node: '>= 0.4'} + is-data-view@1.0.2: resolution: {integrity: sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw==} engines: {node: '>= 0.4'} @@ -7147,7 +7151,7 @@ snapshots: '@biomejs/cli-win32-x64@2.5.3': optional: true - '@boundaries/elements@2.0.1(@typescript-eslint/parser@8.64.0(eslint@10.7.0(jiti@2.7.0))(typescript@6.0.3))(eslint-import-resolver-typescript@4.4.5(eslint@10.7.0(jiti@2.7.0)))(eslint@10.7.0(jiti@2.7.0))': + '@boundaries/elements@3.0.1(@typescript-eslint/parser@8.64.0(eslint@10.7.0(jiti@2.7.0))(typescript@6.0.3))(eslint-import-resolver-typescript@4.4.5(eslint@10.7.0(jiti@2.7.0)))(eslint@10.7.0(jiti@2.7.0))': dependencies: eslint-import-resolver-node: 0.3.9 eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.64.0(eslint@10.7.0(jiti@2.7.0))(typescript@6.0.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@4.4.5(eslint@10.7.0(jiti@2.7.0)))(eslint@10.7.0(jiti@2.7.0)) @@ -10493,7 +10497,7 @@ snapshots: eslint-import-resolver-node@0.3.9: dependencies: debug: 3.2.7 - is-core-module: 2.16.1 + is-core-module: 2.16.2 resolve: 1.22.12 transitivePeerDependencies: - supports-color @@ -10522,9 +10526,9 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-boundaries@6.0.2(@typescript-eslint/parser@8.64.0(eslint@10.7.0(jiti@2.7.0))(typescript@6.0.3))(eslint-import-resolver-typescript@4.4.5(eslint@10.7.0(jiti@2.7.0)))(eslint@10.7.0(jiti@2.7.0)): + eslint-plugin-boundaries@7.0.2(@typescript-eslint/parser@8.64.0(eslint@10.7.0(jiti@2.7.0))(typescript@6.0.3))(eslint-import-resolver-typescript@4.4.5(eslint@10.7.0(jiti@2.7.0)))(eslint@10.7.0(jiti@2.7.0)): dependencies: - '@boundaries/elements': 2.0.1(@typescript-eslint/parser@8.64.0(eslint@10.7.0(jiti@2.7.0))(typescript@6.0.3))(eslint-import-resolver-typescript@4.4.5(eslint@10.7.0(jiti@2.7.0)))(eslint@10.7.0(jiti@2.7.0)) + '@boundaries/elements': 3.0.1(@typescript-eslint/parser@8.64.0(eslint@10.7.0(jiti@2.7.0))(typescript@6.0.3))(eslint-import-resolver-typescript@4.4.5(eslint@10.7.0(jiti@2.7.0)))(eslint@10.7.0(jiti@2.7.0)) chalk: 4.1.2 eslint: 10.7.0(jiti@2.7.0) eslint-import-resolver-node: 0.3.9 @@ -11248,7 +11252,11 @@ snapshots: is-core-module@2.16.1: dependencies: - hasown: 2.0.3 + hasown: 2.0.4 + + is-core-module@2.16.2: + dependencies: + hasown: 2.0.4 is-data-view@1.0.2: dependencies: @@ -12593,7 +12601,7 @@ snapshots: resolve@1.22.12: dependencies: es-errors: 1.3.0 - is-core-module: 2.16.1 + is-core-module: 2.16.2 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0