From 99fe29bc19d6b5c9f7f152bf6ebe80317fcd9d04 Mon Sep 17 00:00:00 2001 From: rajitha1998 Date: Sat, 25 Jan 2020 18:48:37 +0530 Subject: [PATCH] formatting code with prettier --- .prettierrc | 1 + examples/compute/google.js | 2 +- lib/core/base-provider.js | 2 +- test/core/base-provider.js | 5 +---- 4 files changed, 4 insertions(+), 6 deletions(-) create mode 100644 .prettierrc diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000..ca82cc39 --- /dev/null +++ b/.prettierrc @@ -0,0 +1 @@ +{ "arrowParens": "always" } diff --git a/examples/compute/google.js b/examples/compute/google.js index 8818a8cc..6eddb2b1 100644 --- a/examples/compute/google.js +++ b/examples/compute/google.js @@ -24,7 +24,7 @@ gceCompute .list({ maxResults: 1 }) - .then(res => { + .then((res) => { // console.log(res); }) .catch((err) => { diff --git a/lib/core/base-provider.js b/lib/core/base-provider.js index cc3104e5..676ddc6e 100644 --- a/lib/core/base-provider.js +++ b/lib/core/base-provider.js @@ -27,7 +27,7 @@ class Provider { let providersToLoad = {}; if (options && options.hasOwnProperty("overrideProviders")) { - ncConfig.map(provider => { + ncConfig.map((provider) => { const module = provider.plugin; providersToLoad[provider.tag] = module(provider.configPath); }); diff --git a/test/core/base-provider.js b/test/core/base-provider.js index ec1fad5f..756dfb2f 100644 --- a/test/core/base-provider.js +++ b/test/core/base-provider.js @@ -5,10 +5,7 @@ const providers = require("../../lib/providers"); describe("Base provider", () => { it("should return AWS provider", (done) => { - const ncAWS = new NcProvider( - providers.AWS, - null, - ); + const ncAWS = new NcProvider(providers.AWS, null); assert.typeOf(ncAWS, "object"); done();