disco icon indicating copy to clipboard operation
disco copied to clipboard

use `prettier` to format *.{ts,json,md,vue}

Open tharvik opened this issue 1 year ago • 8 comments

currently, formatting is done using eslint & standard. the first one is a linter actually warning when a line doesn't fit the formatting specs, but doesn't enforce a single representation of a code (one can add empty lines everywhere, or disabling eslint on a line disallow formatting). it's also only for JS/TS, not json, not markdown.

prettier is way better in my opinion, by ensuring that for a given code/AST, it always yield the same output, folding lines as needed, replacing quotes or adding/removing trailing commas automatically. it also works with many filetypes (looking at you vue), and is opiniated so no more bikesheding. it also provide a clear separation between formatting (nice code writing) and linting (bugs lurking), which is confortable.

tharvik avatar Feb 13 '24 17:02 tharvik

I updated your link so that our mention doesn't appear in their discussion feed. Edit: it seems it is still in their feed, you may have to delete your comment to remove it. fyi https://github.com/orgs/community/discussions/23123

JulienVig avatar Mar 25 '24 10:03 JulienVig

standard seems to be dying: https://www.github.com/standard/standard/issues/1948

tharvik avatar Mar 25 '24 14:03 tharvik

I updated your link so that our mention doesn't appear in their discussion feed.

haha, keeping github clean, that's nice

Edit: it seems it is still in their feed, you may have to delete your comment to remove it. fyi https://github.com/orgs/community/discussions/23123

arf, it didn't work..

tharvik avatar Mar 25 '24 14:03 tharvik