microsoft / vscode-generator-code

Visual Studio Code extension generator
Other
1.31k stars 226 forks source link

chore: Unify indentation in generated package.json #357

Closed MatejKastak closed 2 years ago

MatejKastak commented 2 years ago

Hi :wave:

First of all thanks for this template, it was really useful for me in the past :+1: .

Last time I generated skeleton for vscode TS extension I noticed that package.json is always reformatted by prettier. There are inconsistencies between different package.json (across plugins, some use 2 spaces, some 4 spaces, some tabs, and some are mixed) and even directly in TS package.json indentation. Field name uses different indentation than displayName. See attached image.

image

Maybe some people will be against following prettier defaults (using spaces with tab width 2). But I think it's fairly popular tool and it's better to have the indentation consistent rather than random indentation.

Another way might be to add yes/No option at the end of generator dialog that will try to format the all relevant files after generation step is done.

This PR is just to kick of discussion if the maintainers would be open to such change. If so, I will try to properly test if I did not break any of the jsons.

ghost commented 2 years ago

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.

:x: MatejKastak sign now
You have signed the CLA already but the status is still pending? Let us recheck it.

aeschli commented 2 years ago

Thanks for the PR, consistency if good!

aeschli commented 2 years ago

@MatejKastak If you can accept the CLA (see https://github.com/apps/microsoft-cla) then we can push the PR.