observablehq / feedback

Customer submitted bugs and feature requests
42 stars 3 forks source link

allow trailing commas #501

Closed trebor closed 1 year ago

trebor commented 1 year ago

Is your feature request related to a problem? Please describe.

often when editing/debugging i am commenting lines in and out. if those lines are parameters or array items, the trailing commas are removed by auto formatting. i am unable to simply comment an old line back in without tracking commas.

Describe the solution you'd like

provide an option to allow trailing commas in cell auto formatting.

Describe alternatives you've considered

i could turn off auto formatting when it is getting aggravating.

Additional context

i understand that adding this option risks opening the floodgates to formatting option feature requests. i would argue generally that, as no real alternative to in browser editing exists (that i know of) that ceding some control back to users with regard to editing seems fair. so maybe giving advanced users an option to roll their own prettier configurations is not such a bad idea?

CobusT commented 1 year ago

Duplicate #206

CobusT commented 1 year ago

Would you agree, Robert? Can I mark this as a duplicate?

trebor commented 1 year ago

oh totally! i should have trolled through before i wrote it up! :)

CobusT commented 1 year ago

Haha, that is my job :-) I love doing it actually. So great to read these suggestions.