alexanderweiss / nova-prettier

Prettier extension for Nova
MIT License
35 stars 6 forks source link

Prettier Extension Adds Unexpected Comman #52

Closed jeremy-french-4D closed 3 years ago

jeremy-french-4D commented 3 years ago

A comma is added after the last item of an object. The last item should not have a comma.

Given the following object with 3-properties;

data: { A: 1, B: 2, C: 3 }

Prettier as an unexpected comma after the property "C: 3", producing an unexpected comma:

data: { A: 1, B: 2, C: 3, prettier extension on prettier extension off

}

alexanderweiss commented 3 years ago

This is Prettier's default. You can change it using the tailing comma's setting in the project or extension preferences or in a Prettier config file. See also https://prettier.io/docs/en/options.html#trailing-commas

jeremy-french-4D commented 3 years ago

Thanks for the quick reply.

In Preferences, changing “Trailing Commas” to “none" works.

On Nov 13, 2020, at 5:46 PM, Alexander Weiss notifications@github.com wrote:

This is Prettier's default. You can change it using the tailing comma's setting in the project or extension preferences or in a Prettier config file. See also https://prettier.io/docs/en/options.html#trailing-commas https://prettier.io/docs/en/options.html#trailing-commas — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/alexanderweiss/nova-prettier/issues/52#issuecomment-727071799, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMVDXTSOU6GCE5PXTG7VEW3SPWZLHANCNFSM4TVDUMKQ.