diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..1d95c51 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,7 @@ +node_modules +coverage +dist +build +.build + +# etc... diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..2c2bd97 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,12 @@ +{ + "arrowParens": "avoid", + "bracketSpacing": false, + "jsxBracketSameLine": false, + "printWidth": 80, + "proseWrap": "always", + "semi": false, + "singleQuote": true, + "tabWidth": 2, + "trailingComma": "all", + "useTabs": false +} diff --git a/src/example.js b/src/example.js index 0bfcf23..71d78ca 100644 --- a/src/example.js +++ b/src/example.js @@ -1,11 +1,11 @@ -const name = "Freddy"; -typeof name === "string"; +const name = 'Freddy' +typeof name === 'string' -if (!("serviceWorker" in navigator)) { +if (!('serviceWorker' in navigator)) { // you have an old browser :-( } -const greeting = "hello"; -console.log(`${greeting} world!`); +const greeting = 'hello' +console.log(`${greeting} world!`) -[(1, 2, 3)].forEach(x => console.log(x)); +;[(1, 2, 3)].forEach(x => console.log(x))