Skip to content

Crash when running tsgolint: Option 'baseUrl' has been removed. #351

@camc314

Description

@camc314

When running tsgolint, you may encounter the following error. This error is not a bug:

In older versions

Error running tsgolint: "exit status: exit status: 0, error: Option 'baseUrl' has been removed. Please remove it from your configuration." ELIFECYCLE  Command failed with exit code 1.

Or in newer versions:


  × Option 'baseUrl' has been removed. Please remove it from your configuration.

Found 0 warnings and 1 error.
Finished in 71ms on 1 file with 103 rules using 12 threads.

Why is this error reported

TSGolint is built on typescript-go. This means that tsgolint is based on typescript v7.0.
In TypeScript v7.0, some features were removed, for example baseUrl.

So, even if you have an older version of typescript specified in your dependncies, tsgolint is based upon the latest version. Now, while tsgolint could add support for pre-7.0 features by patching typescript-go itself, changes such as these are outside the scope of the project, add little benifit (users would have to make the changes anyway at some point when they update typescript), and add a large maintence burden as we track upstream typescript-go updates

How to fix it

Take a look at microsoft/TypeScript#62508 (comment), it includes a link to a tool that can be run on your codebase to automatically fix the issue

Additional Context

#347

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions