Skip to content
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

3 BUGS in Refactor: move to file for TypeScript #242501

Open
psnet opened this issue Mar 3, 2025 · 0 comments
Open

3 BUGS in Refactor: move to file for TypeScript #242501

psnet opened this issue Mar 3, 2025 · 0 comments
Assignees

Comments

@psnet
Copy link

psnet commented Mar 3, 2025

Does this issue occur when all extensions are disabled?: Yes

Version: 1.97.2 (user setup)
Commit: e54c774

Steps to Reproduce:

  1. TS File with name original.ts:
/**
 * Description
 */
export const NAME1 = 3;
  1. Use Refactor: move to file for previously created new empty file test.ts
  2. Bug 1: in new test.ts we have one empty line between JSDoc and const NAME1:
/**
 * Description
 */
// <--------------------------- BUG 1: WHY new empty LINE here?
export const NAME1 = 3;
  1. Lets back to original.ts and move another constant to test.ts from file we moved first constant (original.ts), after same use case in test.ts file where we moved 2 constants formatting will be weird:
/**
 * Description
 */
// <--------------------------- BUG 1: WHY new empty LINE here?
export const NAME1 = 3;/**// <--------------------------- BUG 2: WHY JSDoc is at end of const declaration?
 * Description of second constant
 */

export const NAME2 = 2;

Bug2: JSDoc of second constant jumps at end of first constant.
5. Bug3: Lets look at other file that had imports for these constants, now they have TWO imports from file test.ts where we moved 2 constants (must be 1 import).

import { NAME1 } from '../../test';
import { NAME2 } from '../../test';  // <--------------------------- BUG 3: WHY TWO imports from same file?

Other files are corrupted too.

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

No branches or pull requests

2 participants