From 78858a0e06f6022c62a1a17840e63c5f2bc4039f Mon Sep 17 00:00:00 2001 From: hypnos Date: Fri, 18 Aug 2017 03:23:04 +0300 Subject: [PATCH 1/2] Run eslint --fix --- app/react-native/src/bin/storybook-start.js | 16 ++++---- lib/codemod/src/index.js | 4 +- .../__tests__/update-addon-info.test.js | 7 +--- .../src/transforms/update-addon-info.js | 37 ++++++++----------- .../modules/ui/components/left_panel/index.js | 6 +-- 5 files changed, 29 insertions(+), 41 deletions(-) diff --git a/app/react-native/src/bin/storybook-start.js b/app/react-native/src/bin/storybook-start.js index 08934d9b8e2e..ec80c34b7068 100644 --- a/app/react-native/src/bin/storybook-start.js +++ b/app/react-native/src/bin/storybook-start.js @@ -41,17 +41,19 @@ server.listen(...listenAddr, err => { }); if (!program.skipPackager) { - let symlinks = [] - - try{ + let symlinks = []; + + try { const findSymlinksPaths = require('react-native/local-cli/util/findSymlinksPaths'); // eslint-disable-line global-require symlinks = findSymlinksPaths(path.join(projectDir, 'node_modules'), [projectDir]); - }catch(e){ - console.warn(`Unable to load findSymlinksPaths: ${e.message}`); + } catch (e) { + console.warn(`Unable to load findSymlinksPaths: ${e.message}`); } - const projectRoots = (configDir === projectDir ? [configDir] : [configDir, projectDir]).concat(symlinks); - + const projectRoots = (configDir === projectDir ? [configDir] : [configDir, projectDir]).concat( + symlinks + ); + let cliCommand = 'node node_modules/react-native/local-cli/cli.js start'; if (program.haul) { cliCommand = `node node_modules/.bin/haul start --config ${program.haul} --platform all`; diff --git a/lib/codemod/src/index.js b/lib/codemod/src/index.js index 119ba5956596..3803050c2678 100644 --- a/lib/codemod/src/index.js +++ b/lib/codemod/src/index.js @@ -5,6 +5,4 @@ export { packageNames, } from './transforms/update-organisation-name'; -export { - default as updateAddonInfo -} from './transforms/update-addon-info'; +export { default as updateAddonInfo } from './transforms/update-addon-info'; diff --git a/lib/codemod/src/transforms/__tests__/update-addon-info.test.js b/lib/codemod/src/transforms/__tests__/update-addon-info.test.js index 0091d9f11ec5..0c71d93f970b 100644 --- a/lib/codemod/src/transforms/__tests__/update-addon-info.test.js +++ b/lib/codemod/src/transforms/__tests__/update-addon-info.test.js @@ -1,8 +1,3 @@ import { defineTest } from 'jscodeshift/dist/testUtils'; -defineTest( - __dirname, - 'update-addon-info', - null, - 'update-addon-info/update-addon-info' -); +defineTest(__dirname, 'update-addon-info', null, 'update-addon-info/update-addon-info'); diff --git a/lib/codemod/src/transforms/update-addon-info.js b/lib/codemod/src/transforms/update-addon-info.js index 58f2f8cc26d5..4ad524d7cae9 100644 --- a/lib/codemod/src/transforms/update-addon-info.js +++ b/lib/codemod/src/transforms/update-addon-info.js @@ -22,7 +22,7 @@ *