Fix ESLint warnings using 'yarn lint --fix'

Summary:
Hi! I would like to contribute to React Native, and I am just starting out. I forked the repo and found that it has quite a lot of ESLint warnings – many of which were automatically fixable. This PR is simply the result of running `yarn lint --fix` from the root folder.

Most changes are removing trailing spaces from comments.

Haven't really done any manual testing, since I haven't done any code changes manually. `yarn test` runs fine, `yarn flow` runs fine, `yarn prettier` is satisfied.

N/A

[INTERNAL][MINOR][] - Fix ESLint warnings
Closes https://github.com/facebook/react-native/pull/18047

Differential Revision: D7054948

Pulled By: hramos

fbshipit-source-id: d53e692698d1687de5821c3fb5cdb76a5e03b71e
This commit is contained in:
Mats Byrkeland 2018-02-22 07:04:35 -08:00 committed by Facebook Github Bot
parent 47e57ef8c1
commit edb6ca72fd
22 changed files with 151 additions and 151 deletions

View File

@ -199,7 +199,7 @@ function pressItem(context: Object, key: string) {
}
function renderSmallSwitchOption(context: Object, key: string) {
if(Platform.isTVOS) {
if (Platform.isTVOS) {
return null;
}
return (

View File

@ -107,7 +107,7 @@ if (issueCommandsFileModified) {
// Warns if the PR is opened against stable, as commits need to be cherry picked and tagged by a release maintainer.
// Fails if the PR is opened against anything other than `master` or `-stable`.
const isMergeRefMaster = danger.github.pr.base.ref === 'master';
const isMergeRefStable = danger.github.pr.base.ref.indexOf(`-stable`) !== -1;
const isMergeRefStable = danger.github.pr.base.ref.indexOf('-stable') !== -1;
if (!isMergeRefMaster && isMergeRefStable) {
const title = ':grey_question: Base Branch';
const idea = 'The base branch for this PR is something other than `master`. Are you sure you want to merge these changes into a stable release? If you are interested in backporting updates to an older release, the suggested approach is to land those changes on `master` first and then cherry-pick the commits into the branch for that release. The [Releases Guide](https://github.com/facebook/react-native/blob/master/Releases.md) has more information.';

View File

@ -22,6 +22,6 @@ module.exports = function getTargets(project) {
target: nativeTargetSection[key],
name: nativeTargetSection[key].productReference_comment,
isTVOS: (buildConfiguration.buildSettings.SDKROOT && (buildConfiguration.buildSettings.SDKROOT.indexOf('appletv') !== -1)) || false
}
};
});
};

View File

@ -46,8 +46,8 @@ module.exports = function registerNativeModuleIOS(dependencyConfig, projectConfi
getTargets(dependencyProject).forEach(product => {
var i;
if (!product.isTVOS) {
for (i=0; i<targets.length; i++) {
if(!targets[i].isTVOS) {
for (i = 0; i < targets.length; i++) {
if (!targets[i].isTVOS) {
project.addStaticLibrary(product.name, {
target: targets[i].uuid
});
@ -56,8 +56,8 @@ module.exports = function registerNativeModuleIOS(dependencyConfig, projectConfi
}
if (product.isTVOS) {
for (i=0; i<targets.length; i++) {
if(targets[i].isTVOS) {
for (i = 0; i < targets.length; i++) {
if (targets[i].isTVOS) {
project.addStaticLibrary(product.name, {
target: targets[i].uuid
});