When we save/format a modified file from the control source on VSCode, the output of the code generated by Rome is badly formatted nor causes an error.
Open VSCode with a git project. With Rome extension version v0.22.0 (the latest one)
Create a test.ts file with this piece of code
function foobar(platform: string[], root_dir: string, args: string) {
let target = root_dir + args.replace(root_dir, "");
if (!platform.includes("win")) {
target = `/${target}`;
}
return target;
}
Add the content of the file to the git index ( git add test.ts )
Environment information
What happened?
When we save/format a modified file from the control source on VSCode, the output of the code generated by Rome is badly formatted nor causes an error.
Open VSCode with a git project. With Rome extension version
v0.22.0
(the latest one)Create a
test.ts
file with this piece of codeAdd the content of the file to the git index (
git add test.ts
)Make changes to the code, for example:
Save (Ctrl+S) the file
Open this file from the VSCode git control source
Save (Ctrl+S) the file from the VSCode git control source view. The output generated by Rome is :
Here is a video reproducing the problem, starting from step 4 :
https://user-images.githubusercontent.com/738010/230468439-4dac6704-ab07-448a-bebe-70338f6b5e54.mp4
Expected result
A correctly generated code, and should not cause any errors.
Code of Conduct