From 1d0216d5d4d9a97e9bfbd6f9484316b42997e6fc Mon Sep 17 00:00:00 2001
From: Greg Jopa <534034+gregjopa@users.noreply.github.com>
Date: Tue, 22 Aug 2023 13:07:46 -0500
Subject: [PATCH] Use method definition syntax and fix glob pattern for
prettier (#76)
---
advanced-integration/package.json | 4 ++--
standard-integration/client/app.js | 4 ++--
standard-integration/package.json | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/advanced-integration/package.json b/advanced-integration/package.json
index c7211908..ff3f5b41 100644
--- a/advanced-integration/package.json
+++ b/advanced-integration/package.json
@@ -7,8 +7,8 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "nodemon server/server.js",
- "format": "npx prettier --write **.{js,md}",
- "format:check": "npx prettier --check **.{js,md}",
+ "format": "npx prettier --write **/*.{js,md}",
+ "format:check": "npx prettier --check **/*.{js,md}",
"lint": "npx eslint server/*.js --env=node && npx eslint client/*.js --env=browser"
},
"license": "Apache-2.0",
diff --git a/standard-integration/client/app.js b/standard-integration/client/app.js
index af056c7d..cab942a0 100644
--- a/standard-integration/client/app.js
+++ b/standard-integration/client/app.js
@@ -1,6 +1,6 @@
window.paypal
.Buttons({
- createOrder: async () => {
+ async createOrder() {
try {
const response = await fetch("/api/orders", {
method: "POST",
@@ -36,7 +36,7 @@ window.paypal
resultMessage(`Could not initiate PayPal Checkout...
${error}`);
}
},
- onApprove: async (data, actions) => {
+ async onApprove(data, actions) {
try {
const response = await fetch(`/api/orders/${data.orderID}/capture`, {
method: "POST",
diff --git a/standard-integration/package.json b/standard-integration/package.json
index 310fefad..5413d87e 100644
--- a/standard-integration/package.json
+++ b/standard-integration/package.json
@@ -7,8 +7,8 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "nodemon server/server.js",
- "format": "npx prettier --write **.{js,md}",
- "format:check": "npx prettier --check **.{js,md}",
+ "format": "npx prettier --write **/*.{js,md}",
+ "format:check": "npx prettier --check **/*.{js,md}",
"lint": "npx eslint server/*.js --env=node && npx eslint client/*.js --env=browser"
},
"license": "Apache-2.0",