config prettier

This commit is contained in:
Kent C. Dodds
2019-08-02 13:44:43 -06:00
parent fbb81df6c9
commit 4fa1a97129
2 changed files with 23 additions and 6 deletions

17
.prettierrc Normal file
View File

@@ -0,0 +1,17 @@
{
"arrowParens": "avoid",
"bracketSpacing": false,
"htmlWhitespaceSensitivity": "css",
"insertPragma": false,
"jsxBracketSameLine": false,
"jsxSingleQuote": false,
"printWidth": 80,
"proseWrap": "always",
"quoteProps": "as-needed",
"requirePragma": false,
"semi": false,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "all",
"useTabs": false
}

View File

@@ -1,10 +1,10 @@
const username = "freddy";
typeof username === "string";
const username = 'freddy'
typeof username === 'string'
if (!("serviceWorker" in navigator)) {
if (!('serviceWorker' in navigator)) {
// you have an old browser :-(
}
const greeting = "hello";
console.log(`${greeting} world!`);
[1, 2, 3].forEach(x => console.log(x));
const greeting = 'hello'
console.log(`${greeting} world!`)
;[1, 2, 3].forEach(x => console.log(x))