/* These prettier config settings are intended to reduce merge conflicts as much as possible. My original google searches: what prettier options are best for git diffs what prettier options are best for git diffs avoid merge conflicts what prettier options are best for git diffs avoid merge conflicts "trailingComma" prettier lowest printWidth Something I would like, is an eslint config that is _very similar_ to prettier, but does has less deterministic formatting - I sense starting with Standard.js or XO eslint style config would be a good starting point. I'm curious what doing a format with printWidth: 1, and then doing a normal format would be like. Sometimes prettier will make things more vertical, but not make them more horizontal. Obviously more vertical is best for reducing merge conflicts. */ /** @type {import('prettier').RequiredOptions} */ module.exports = { printWidth: 40, // determined here: // commit 27987c4b47834a1fff9402b729d3a39d7539b6f9 (origin/chore-dgr-dropping-xo-fix-all-script, chore-dgr-dropping-xo-fix-all-script) // Author: Rhode, Devin // Date: Wed Oct 27 16:29:49 2021 -0500 // // wip redirect manager // // It also makes inline-diff highlighting less relelvant. // - In VSCode, if you edit the last character in a line, it may be hard to see the actual change. // - Or if there's a one-letter typo... VSCode will highlight that one character change // - However, with a low printWidth, code becomes very vertical // - Of course, still aasier to spot single character change with VSCode's help, but // - Since there's less characters overall, there's less code to look through on any given line // Required: bracketSameLine: false, jsxBracketSameLine: false // deprecated in 2.4 // Required: trailingComma: 'all' // Cannot be "consistent" - would cause thrashing in git history: quoteProps: "as-needed" // Could go with "preserve" if it makes more sense in some situation // Devins personal preference: // Also avoids extra finger movement: singleQuote: true // Avoid thrashing, assert default? arrowParens: "always" // avoid XO default `false` https://github.com/xojs/xo/pull/616/files bracketSpacing: true, }