Skip to content

Commit 407b755

Browse files
committed
run prettier on all files
1 parent 896ba7f commit 407b755

File tree

7 files changed

+15
-11
lines changed

7 files changed

+15
-11
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const argv = require('yargs')
4747
.version(
4848
true,
4949
'Display the create-react-storefront version and exit',
50-
`create-react-storefront v${getPackageJsonVersion()}`,
50+
`create-react-storefront v${getPackageJsonVersion()}`
5151
)
5252
.command('$0 <app-name>', 'Creates a new React Storefront app.', yargs => {
5353
const returnedYargs = yargs

lib/check-node-version.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ module.exports = function checkNodeVersion() {
55

66
if (parseInt(major) < 8) {
77
console.log('')
8-
console.log(`React Storefront requires node v8 or newer. You're running node ${process.version}.`)
8+
console.log(
9+
`React Storefront requires node v8 or newer. You're running node ${process.version}.`
10+
)
911
console.log('')
1012
process.exit(0)
1113
}

lib/config-defaults.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ module.exports = {
33
version: '1.0.0',
44
license: 'UNLICENSED',
55
private: true,
6-
createDirectory: true
6+
createDirectory: true,
77
}

lib/input-validation.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ const isTargetPathValid = targetPath => {
1414
// not valid.
1515
if (
1616
fs.existsSync(targetPath) &&
17-
(!fs.statSync(targetPath).isDirectory() || fs.readdirSync(targetPath).length !== 0)) {
17+
(!fs.statSync(targetPath).isDirectory() || fs.readdirSync(targetPath).length !== 0)
18+
) {
1819
return false
1920
}
2021
return true
@@ -27,5 +28,5 @@ const isTargetPathValid = targetPath => {
2728
}
2829

2930
module.exports = {
30-
isTargetPathValid
31+
isTargetPathValid,
3132
}

lib/retrieve-template.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const _calculateTemplateUrl = branch => {
2626
const _downloadTemplate = async ({ templateUrl } = {}) => {
2727
try {
2828
await download(templateUrl, process.cwd(), {
29-
filename: downloadedTemplateName
29+
filename: downloadedTemplateName,
3030
})
3131
} catch (err) {
3232
handleError(
@@ -43,7 +43,7 @@ const _getTemplatePath = () => {
4343
const _unzipTemplate = async targetPath => {
4444
try {
4545
await decompress(_getTemplatePath(), targetPath, {
46-
strip: 1
46+
strip: 1,
4747
})
4848
} catch (err) {
4949
handleError(err, 'Error decompressing the React Storefront template. See error stack above.')
@@ -75,7 +75,7 @@ const retrieveTemplate = async ({ branch, targetPath }) => {
7575
}
7676

7777
await _downloadTemplate({
78-
templateUrl: _calculateTemplateUrl(branch)
78+
templateUrl: _calculateTemplateUrl(branch),
7979
})
8080

8181
await _unzipTemplate(targetPath)
@@ -92,5 +92,5 @@ module.exports = {
9292
_getTemplatePath,
9393
_unzipTemplate,
9494
retrieveTemplate,
95-
checkTemplateExistence
95+
checkTemplateExistence,
9696
}

lib/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ const calculateReactStorefrontPath = (appName, userConfig) => {
1616
}
1717

1818
module.exports = {
19-
calculateReactStorefrontPath
19+
calculateReactStorefrontPath,
2020
}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
"scripts": {
2929
"start": "node .",
3030
"release": "yarn publish",
31-
"precommit": "lint-staged"
31+
"precommit": "lint-staged",
32+
"prettier": "prettier --write \"**/*.js\" \"!{node_modules,.next,.yalc}/**\""
3233
},
3334
"devDependencies": {
3435
"husky": "^4.0.10",

0 commit comments

Comments
 (0)