Skip to content

VS Code file rename ignores importModuleSpecifier #25739

Closed
@krryan

Description

@krryan

TypeScript Version: 3.1.0-dev.20180626

Visual Studio Code Version: 1.26.0-insider

Search Terms: importModuleSpecifier

Code
settings.json

    "typescript.preferences.importModuleSpecifier": "non-relative",

foo/bar.ts

export test = 1;

some/path/file.ts

import { test } from 'foo/bar';

Right-click on foo/bar.ts and choose Rename. Name it foo/baz.ts.

Expected behavior:
some/path/file.ts

import { test } from 'foo/baz';

Actual behavior:
some/path/file.ts

import { test } from '../../foo/baz';

(It's not clear to me if this should be a TS issue or VS Code issue, my apologies if I have misplaced this.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    ExternalRelates to another program, environment, or user action which we cannot control.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions