- 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
24 lines
624 B
TypeScript
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)
|
|
}
|