-
Notifications
You must be signed in to change notification settings - Fork 0
/
.prettierrc.js
22 lines (19 loc) · 1023 Bytes
/
.prettierrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Prettier config to reduce merge conflicts: https://gist.github.com/devinrhode2/08c84e175c61b282b76f4766a94e4a01
/** @type {import('prettier').Options} */
const conf = {
singleQuote: true,
semi: false,
// avoid even more merge conflicts: https://prettier.io/blog/2020/03/21/2.0.0.html#change-default-value-for-trailingcomma-to-es5-6963httpsgithubcomprettierprettierpull6963-by-fiskerhttpsgithubcomfisker
trailingComma: 'all',
printWidth: 40,
// Less code per line means:
// - less likely to have conflict on any given line
// - easier to spot changes in git (e.g. getListThing->getListsThing)
// - Encourages modularity
// - jsx components with 20 indent levels will not look good
// - This encourages creating smaller components
// - Still can opt-out with `// prettier-ignore` comments above component
// - OR, create a `.prettierrc.js` file in code you edit the most
// - This exact number will always be somewhat arbitrary, it's not set in stone.
}
module.exports = conf