diff --git a/eslint.config.ts b/eslint.config.ts index b5f36864b7..2b0b67ec40 100644 --- a/eslint.config.ts +++ b/eslint.config.ts @@ -374,7 +374,8 @@ export default defineConfig([ files: [ 'src/base/**/*.{ts,vue}', 'src/platform/**/*.{ts,vue}', - 'src/workbench/**/*.{ts,vue}' + 'src/workbench/**/*.{ts,vue}', + 'src/world/**/*.{ts,vue}' ], rules: { 'import-x/no-restricted-paths': [ @@ -402,6 +403,12 @@ export default defineConfig([ from: './src/renderer/**', message: 'workbench/ cannot import from renderer/ (violates layer architecture: base → platform → workbench → renderer)' + }, + { + target: './src/world/**', + from: './src/lib/litegraph/**', + message: + 'src/world/ must remain free of litegraph dependencies. The world layer owns canonical entity identity and must not depend on litegraph types or values.' } ] } diff --git a/src/world/entityIds.ts b/src/world/entityIds.ts index c3f031d022..cb9c2ed945 100644 --- a/src/world/entityIds.ts +++ b/src/world/entityIds.ts @@ -1,4 +1,10 @@ +// TODO: NodeId will become a branded EntityId owned by src/world/. Once that +// migration lands, drop this disable. +// eslint-disable-next-line import-x/no-restricted-paths import type { NodeId } from '@/lib/litegraph/src/LGraphNode' +// TODO: Move UUID to src/utils/ (or src/world/) — it's a primitive string +// brand with no litegraph coupling. Once moved, drop this disable. +// eslint-disable-next-line import-x/no-restricted-paths import type { UUID } from '@/lib/litegraph/src/utils/uuid' import type { Brand } from './brand'