openpencil/tests/helpers/paths.ts
Danila Poyarkov e42dffa003 chore(lint): consolidate oxlint config
- Merge structural lint rules into oxlint.json and remove the second config file
- Add #tests/* path aliases and rewrite deep test helper imports
- Ban new deep parent-relative imports through the shared lint config
2026-05-06 02:05:02 +03:00

24 lines
624 B
TypeScript

import { join } from 'node:path'
const repoRoot = join(import.meta.dir, '..', '..')
export function repoPath(...segments: string[]): string {
return join(repoRoot, ...segments)
}
export function coreSourcePath(...segments: string[]): string {
return repoPath('packages/core/src', ...segments)
}
export function cliSourcePath(...segments: string[]): string {
return repoPath('packages/cli/src', ...segments)
}
export function testPath(...segments: string[]): string {
return repoPath('tests', ...segments)
}
export function publicPath(...segments: string[]): string {
return repoPath('public', ...segments)
}