install and run prettier

This commit is contained in:
Kent C. Dodds
2019-07-31 20:38:32 -06:00
parent df642497e9
commit 945eaac136
3 changed files with 16 additions and 8 deletions

6
package-lock.json generated
View File

@@ -3257,6 +3257,12 @@
"integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=",
"dev": true
},
"prettier": {
"version": "1.18.2",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-1.18.2.tgz",
"integrity": "sha512-OeHeMc0JhFE9idD4ZdtNibzY0+TPHSpSSb9h8FqtP+YnoZZ1sl8Vc9b1sasjfymH3SonAF4QcA2+mzHPhMvIiw==",
"dev": true
},
"private": {
"version": "0.1.8",
"resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz",

View File

@@ -5,12 +5,14 @@
"license": "GPLv3",
"scripts": {
"build": "babel src --out-dir dist",
"lint": "eslint --ignore-path .gitignore ."
"lint": "eslint --ignore-path .gitignore .",
"format": "prettier --ignore-path .gitignore --write \"**/*.+(js|json)\""
},
"devDependencies": {
"@babel/cli": "^7.5.5",
"@babel/core": "^7.5.5",
"@babel/preset-env": "^7.5.5",
"eslint": "^6.1.0"
"eslint": "^6.1.0",
"prettier": "^1.18.2"
}
}

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));