Skip to content

Fixing an unused import at the end of a line removes the newline #51301

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jakebailey opened this issue Oct 25, 2022 · 1 comment · Fixed by #51320
Closed

Fixing an unused import at the end of a line removes the newline #51301

jakebailey opened this issue Oct 25, 2022 · 1 comment · Fixed by #51320
Assignees
Labels
Bug A bug in TypeScript Fix Available A PR has been opened for this issue

Comments

@jakebailey
Copy link
Member

Given this code, which roughly matches what the module-ified compiler will look like:

import {
    readFile, readFileSync, read, readSync,
    chmod, chmodSync,
} from "fs";


readFile;
readFileSync;
read;
// readSync;
chmod;
chmodSync;

Using the quick fix to remove the unused readSync leaves the code looking like this:

import {
    readFile, readFileSync, read, chmod, chmodSync,
} from "fs";


readFile;
readFileSync;
read;
// readSync;
chmod;
chmodSync;
@DanielRosenwasser
Copy link
Member

Thanks @a-tarasyuk!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Fix Available A PR has been opened for this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants