eclipse-cdt-cloud / eclipse-cdt-cloud/vscode-trace-extension

Consider is aliasing paths for in-project and cross-project imports in `tsconfig` for brevity, in place of using relative "../../../modules"

Open
#342 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
11
Forks
33
Avg merge
2d 16h
Merged PRs (30d)
1

Description

Original suggestion is by @aaanh and was made [here](https://github.com/eclipse-cdt-cloud/vscode-trace-extension/pull/339#issuecomment-3058383762)

---

Hello, I think maybe something that we should consider is aliasing paths for in-project and cross-project imports in `tsconfig` for brevity, in place of using relative "../../../modules"

Note that it's important to prepend a symbol so that we avoid possible circular import issues

Before
```ts
// project_foo/module_foo.ts

import { SomeComponent } from "../../project_bar/module_bar"
```

After

```ts
// project_foo/module_foo.ts

import { SomeComponent } from "@project_bar/module_bar"
```

TS docs for reference:
- https://www.typescriptlang.org/tsconfig/#paths

An example of this can be found here:
- https://github.com/aaanh/homepage/blob/0bba458ca1d7b179f9fcda13684552c269082f2c/tsconfig.json#L20-L22

_Originally posted by @aaanh in https://github.com/eclipse-cdt-cloud/vscode-trace-extension/issues/339#issuecomment-3058383762_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.