Remove unused variables (#22097)

Summary:
Fix unused variable ESLint warnings.
Pull Request resolved: https://github.com/facebook/react-native/pull/22097

Differential Revision: D12919249

Pulled By: TheSavior

fbshipit-source-id: f680fa7277c58cf685e70dfb911753a30fe01c1d
This commit is contained in:
Ignacio Olaciregui
2018-11-04 10:39:44 -08:00
committed by Facebook Github Bot
parent 01b7c48852
commit 6ebee18d13
9 changed files with 11 additions and 94 deletions

View File

@@ -1,31 +0,0 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @emails oncall+javascript_foundation
*/
'use strict';
const xcode = require('xcode');
const getProducts = require('../../ios/getProducts');
const path = require('path');
const project = xcode.project(
path.join(__dirname, '../../__fixtures__/project.pbxproj'),
);
describe('ios::getProducts', () => {
beforeEach(() => {
project.parseSync();
});
it('should return an array of static libraries project exports', () => {
const products = getProducts(project);
expect(products.length).toBe(1);
expect(products).toContain('libRCTActionSheet.a');
});
});

View File

@@ -1,20 +0,0 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
/**
* Given xcodeproj it returns list of products ending with
* .a extension, so that we know what elements add to target
* project static library
*/
module.exports = function getProducts(project) {
return project
.pbxGroupByName('Products')
.children.map(c => c.comment)
.filter(c => c.indexOf('.a') > -1);
};

View File

@@ -10,19 +10,16 @@
const xcode = require('xcode');
const fs = require('fs');
const path = require('path');
const log = require('npmlog');
const addToHeaderSearchPaths = require('./addToHeaderSearchPaths');
const getHeadersInFolder = require('./getHeadersInFolder');
const getHeaderSearchPath = require('./getHeaderSearchPath');
const getProducts = require('./getProducts');
const getTargets = require('./getTargets');
const createGroupWithMessage = require('./createGroupWithMessage');
const addFileToProject = require('./addFileToProject');
const addProjectToLibraries = require('./addProjectToLibraries');
const addSharedLibraries = require('./addSharedLibraries');
const isEmpty = require('lodash').isEmpty;
const getGroup = require('./getGroup');
/**
* Register native module IOS adds given dependency to project by adding