Run eslint on all js files
Reviewed By: zertosh Differential Revision: D5405047 fbshipit-source-id: 5ade9d8beb3688d8bb08a208709c0dbf1ec671b2
This commit is contained in:
parent
1d353b4ef7
commit
fc86f25f9a
|
@ -4,3 +4,11 @@
|
|||
**/main.js
|
||||
Libraries/vendor/**/*
|
||||
Libraries/Renderer/*
|
||||
website/node_modules
|
||||
pr-inactivity-bookmarklet.js
|
||||
question-bookmarklet.js
|
||||
flow/
|
||||
website/core/metadata.js
|
||||
website/core/metadata-blog.js
|
||||
website/src/react-native/docs/
|
||||
website/src/react-native/blog/
|
||||
|
|
|
@ -10,8 +10,6 @@
|
|||
* @nolint
|
||||
*/
|
||||
|
||||
/* eslint-disable */
|
||||
|
||||
// These annotations are copy/pasted from the built-in Flow definitions for
|
||||
// Native Map.
|
||||
|
||||
|
|
|
@ -10,8 +10,6 @@
|
|||
* @nolint
|
||||
*/
|
||||
|
||||
/* eslint-disable */
|
||||
|
||||
declare class Position {
|
||||
coords: Coordinates,
|
||||
timestamp: number,
|
||||
|
|
|
@ -10,8 +10,6 @@
|
|||
* @nolint
|
||||
*/
|
||||
|
||||
/* eslint-disable */
|
||||
|
||||
// These annotations are copy/pasted from the built-in Flow definitions for
|
||||
// Native Promises with some non-standard APIs added in
|
||||
declare class Promise<+R> {
|
||||
|
|
|
@ -10,8 +10,6 @@
|
|||
* @nolint
|
||||
*/
|
||||
|
||||
/* eslint-disable */
|
||||
|
||||
// These annotations are copy/pasted from the built-in Flow definitions for
|
||||
// Native Set.
|
||||
|
||||
|
|
|
@ -10,8 +10,6 @@
|
|||
* @nolint
|
||||
*/
|
||||
|
||||
/* eslint-disable */
|
||||
|
||||
declare module 'console' {
|
||||
declare function assert(value: any, ...message: any): void;
|
||||
declare function dir(
|
||||
|
|
|
@ -10,8 +10,6 @@
|
|||
* @nolint
|
||||
*/
|
||||
|
||||
/* eslint-disable */
|
||||
|
||||
// Temporary patches for React.Component and React.Element.
|
||||
declare var ReactComponent: typeof React$Component;
|
||||
declare var ReactElement: typeof React$Element;
|
||||
|
|
|
@ -8,6 +8,9 @@
|
|||
*
|
||||
* @flow
|
||||
*/
|
||||
|
||||
/* eslint-env node */
|
||||
|
||||
'use strict';
|
||||
|
||||
const babel = require('babel-core');
|
||||
|
|
|
@ -161,7 +161,7 @@ function buildProject(xcodeProject, udid, scheme, configuration = 'Debug', launc
|
|||
if (productNameMatch && productNameMatch.length && productNameMatch.length > 1) {
|
||||
return resolve(productNameMatch[1]);//0 is the full match, 1 is the app name
|
||||
}
|
||||
return buildProcess.error? reject(error) : resolve();
|
||||
return buildProcess.error? reject(buildProcess.error) : resolve();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -13,9 +13,11 @@ var script = process.argv[1];
|
|||
var installedGlobally = script.indexOf('node_modules/.bin/react-native') === -1;
|
||||
|
||||
if (installedGlobally) {
|
||||
const chalk = require('chalk');
|
||||
|
||||
console.error([
|
||||
'\033[31mLooks like you installed react-native globally, maybe you meant react-native-cli?',
|
||||
'To fix the issue, run:\033[0m',
|
||||
chalk.red('Looks like you installed react-native globally, maybe you meant react-native-cli?'),
|
||||
chalk.red('To fix the issue, run:'),
|
||||
'npm uninstall -g react-native',
|
||||
'npm install -g react-native-cli'
|
||||
].join('\n'));
|
||||
|
|
|
@ -116,7 +116,7 @@
|
|||
"scripts": {
|
||||
"test": "jest",
|
||||
"flow": "flow",
|
||||
"lint": "eslint RNTester/ Libraries/",
|
||||
"lint": "eslint .",
|
||||
"start": "/usr/bin/env bash -c './scripts/packager.sh \"$@\" || true' --",
|
||||
"test-android-setup": "docker pull containership/android-base:latest",
|
||||
"test-android-build": "docker build -t react/android -f ContainerShip/Dockerfile.android .",
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
'use strict';
|
||||
|
||||
/**
|
||||
* Copyright (c) 2015-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*
|
||||
* Used in run-ci-e2e-test.js and executed in Travis and Circle CI.
|
||||
* E2e test that verifies that init app can be installed, compiled, started and Hot Module reloading and Chrome debugging work.
|
||||
* For other examples of appium refer to: https://github.com/appium/sample-code/tree/master/sample-code/examples/node and
|
||||
|
@ -20,6 +25,10 @@
|
|||
* - node ../node_modules/.bin/_mocha ../android-e2e-test.js
|
||||
*/
|
||||
|
||||
/* eslint-env mocha */
|
||||
|
||||
'use strict';
|
||||
|
||||
const wd = require('wd');
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
'use strict';
|
||||
|
||||
var semverCmp = require('semver-compare');
|
||||
/*eslint-disable no-undef */
|
||||
require(`shelljs/global`);
|
||||
|
||||
const CIRCLE_BRANCH = process.env.CIRCLE_BRANCH;
|
||||
|
|
Loading…
Reference in New Issue