zardoy / vscode-fix-all-json

Utils & commands for fixing problems in JSON
https://marketplace.visualstudio.com/items?itemName=zardoy.fix-all-json
MIT License
5 stars 2 forks source link

fix(readme): Update recommended setting #21

Closed qadzek closed 1 month ago

qadzek commented 1 month ago

It appears that the syntax for this setting has changed. The current example returns the following error: Incorrect type. Expected "string".

It also might be useful to limit this setting to JSON files.

zardoy commented 1 month ago

It also might be useful to limit this setting to JSON files.

Makes sense, but then, add jsonc language as well so we have [json][jsonc]

qadzek commented 1 month ago

Good idea.

Thanks for this extension. Having to add or remove trailing commas in JSON files was always quite a hassle.

zardoy commented 1 month ago

Sorry, not at home right now but I want to check that setting syntax change, that why it will take some time to merge

zardoy commented 1 month ago

Incorrect type. Expected "string"

Okay, I see. But why do you change the setting value from true to ["source.fixAll"] (which is string[])?

zardoy commented 1 month ago

Ok, I see that the provided format also works, I just expected it to be changed to

"editor.codeActionsOnSave": {
    "source.fixAll": "explicit"
  }
zardoy commented 1 month ago

Thanks for this extension. Having to add or remove trailing commas in JSON files was always quite a hassle.

Thanks, I'm glad someone in the world discovered this one!