From 6671e78d9285d1c638bf799a54f0492f21e5ebbf Mon Sep 17 00:00:00 2001 From: Canh Date: Thu, 29 Mar 2018 23:57:26 +0200 Subject: [PATCH] fix: fix style --- packages/test-ecommerce/package.json | 4 +++- .../test-ecommerce/src/views/products-view.en.js | 12 ++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/packages/test-ecommerce/package.json b/packages/test-ecommerce/package.json index 52c347bd..518e4d64 100644 --- a/packages/test-ecommerce/package.json +++ b/packages/test-ecommerce/package.json @@ -22,10 +22,12 @@ "eslint-config-airbnb": "^15.0.1", "eslint-plugin-babel": "^4.1.1", "eslint-plugin-import": "^2.7.0", + "eslint-plugin-jest": "^21.4.2", "eslint-plugin-jsx-a11y": "^5.1.1", "eslint-plugin-mocha": "^4.11.0", "eslint-plugin-node": "^5.1.0", - "eslint-plugin-react": "^7.1.0" + "eslint-plugin-react": "^7.1.0", + "jest": "^21.2.1" }, "engines": { "node": "8.x" diff --git a/packages/test-ecommerce/src/views/products-view.en.js b/packages/test-ecommerce/src/views/products-view.en.js index 6a623231..648f2bdc 100644 --- a/packages/test-ecommerce/src/views/products-view.en.js +++ b/packages/test-ecommerce/src/views/products-view.en.js @@ -44,13 +44,11 @@ class ProductsView extends PromptView { WebAdapter.getImageUrl('product_order_confirm.handlebars', { productName: product.title, productImage: product.imageUrl, - }) - ) + }), + ), ); - messages.push( - new BotTextMessage(`You just bought the ${product.title}, good choice!`) - ); + messages.push(new BotTextMessage(`You just bought the ${product.title}, good choice!`)); } if (missingEntities.has('product')) { @@ -63,9 +61,7 @@ class ProductsView extends PromptView { static getCardsProducts() { return new CardsMessage( - ['top hat', 'cowboy hat', 'detective hat'].map(key => - productToCard(key, PRODUCTS[key]) - ) + ['top hat', 'cowboy hat', 'detective hat'].map(key => productToCard(key, PRODUCTS[key])), ); } }