Add {root} helper for tsconfig.json (for avoiding multiple ../../) · Issue #37227 · microsoft/TypeScript (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

@Yegorich555

Description

@Yegorich555

Search Terms

helper {root} {workspace} in tsconfig.json

Suggestion

I have the following project structure

tsconfig.json
>folder
   >folder
     >folder
       tsconfig.json => 
         {
             "extends": "../../../tsconfig.json"
              ... 
         }

I didn't find any path-helper that can replace "../../../" to {root} where the root is the current workspace folder

Use Cases

Avoiding using "../../../" because of this is a headache for refactoring

Examples

// folder/folder/folder/tsconfig.json { "extends": "{rootOrWorkspaceFolder}/tsconfig.json" "paths": { "root/": ["{rootOrWorkspaceFolder}/"] } }

Checklist

My suggestion meets these guidelines: