Closed skilesare closed 8 months ago
Just to make sure I'm following, are you referring to this comma which appears after running the formatter?
archived_transactions : [
{
args : GetTransactionsArgs;
callback : shared query GetTransactionsArgs -> async GetTransactionsResult;
}, <-- added comma
];
This indeed seems like a bug in the formatter; I'll move this issue to the prettier-plugin-motoko
repository. As a temporary workaround, adding the following .prettierrc
config file to your project should remove the trailing commas:
{
"overrides": [{
"files": "*.mo",
"options": {
"trailingComma": "none"
}
}]
}
Thank you!
This is now fixed in version 0.15.1 of the VS Code extension. Cheers!
ccing @jorgenbuilder as he knows a bit more about what is going on.
The linter seems to be adding a comma in my file for some strange reason. This file was generated using the candid file for the cycles_ledger. It likes to put a comma after the first item in the achived_transactions type of public type GetTransactionsResult = {.
file: