Skip to content

fix quickfix for 'no-missing-import' on windows.#110

Merged
runem merged 4 commits intorunem:1.2.0from
FelixSchuSi:1.2.0
Jul 4, 2020
Merged

fix quickfix for 'no-missing-import' on windows.#110
runem merged 4 commits intorunem:1.2.0from
FelixSchuSi:1.2.0

Conversation

@FelixSchuSi
Copy link
Contributor

On windows, the quickfixes suggested by the "no-missing-import" rule generate broken paths when dealing with nested folders.

In a project with a structure like this:

parent.ts
children
  └─1
    └─folder
      └─another-folder
          child1.ts

When you generate an import for child1.ts inside of parent.ts your get this statement:

import "./children\1\folder\another-folder/child1";

This doesnt work since imports require UNIX-like file paths with forward slashes.

This PR fixes the bug.
The generated import statement now looks like this:

import "./children/1/folder/another-folder/child1";

@runem
Copy link
Owner

runem commented Jul 4, 2020

Thank you very much for this fix, it looks great!

@runem runem merged commit 5d4ca4a into runem:1.2.0 Jul 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants