diff --git a/ContainerShip/scripts/run-android-ci-instrumentation-tests.js b/ContainerShip/scripts/run-android-ci-instrumentation-tests.js index 00a9f4955814db..34ee3336a168d2 100644 --- a/ContainerShip/scripts/run-android-ci-instrumentation-tests.js +++ b/ContainerShip/scripts/run-android-ci-instrumentation-tests.js @@ -20,7 +20,6 @@ * --package - com.facebook.react.tests * --retries [num] - how many times to retry possible flaky commands: npm install and running tests, default 1 */ -/*eslint-disable no-undef */ const argv = require('yargs').argv; const async = require('async'); diff --git a/Libraries/Animated/src/__tests__/bezier-test.js b/Libraries/Animated/src/__tests__/bezier-test.js index a44b9be465ae38..e34c4f799d7d8e 100644 --- a/Libraries/Animated/src/__tests__/bezier-test.js +++ b/Libraries/Animated/src/__tests__/bezier-test.js @@ -5,100 +5,132 @@ * @copyright 2014-2015 Gaetan Renaudeau. MIT License. * @noflow * @emails oncall+react_native + * @format */ -/* eslint-disable */ - 'use strict'; var bezier = require('bezier'); -var identity = function (x) { return x; }; +var identity = function(x) { + return x; +}; -function assertClose (a, b, precision = 3) { +function assertClose(a, b, precision = 3) { expect(a).toBeCloseTo(b, precision); } -function makeAssertCloseWithPrecision (precision) { - return function (a, b) { +function makeAssertCloseWithPrecision(precision) { + return function(a, b) { assertClose(a, b, precision); }; } -function allEquals (be1, be2, samples, assertion) { - if (!assertion) assertion = assertClose; - for (var i=0; i<=samples; ++i) { +function allEquals(be1, be2, samples, assertion) { + if (!assertion) { + assertion = assertClose; + } + for (var i = 0; i <= samples; ++i) { var x = i / samples; assertion(be1(x), be2(x)); } } -function repeat (n) { - return function (f) { - for (var i=0; i but not ' + '`scrollEventThrottle`. You will only receive one event. ' + 'Using `16` you get all the events but be aware that it may ' + diff --git a/Libraries/Core/InitializeCore.js b/Libraries/Core/InitializeCore.js index 2e3821410e3af1..f0fc6723543d24 100644 --- a/Libraries/Core/InitializeCore.js +++ b/Libraries/Core/InitializeCore.js @@ -10,7 +10,6 @@ * @flow */ -/* eslint-disable strict */ /* globals window: true */ /** @@ -115,9 +114,7 @@ if (!global.__fbDisableExceptionsManager) { try { ExceptionsManager.handleException(e, isFatal); } catch (ee) { - /* eslint-disable no-console */ console.log('Failed to print error: ', ee.message); - /* eslint-enable no-console */ throw e; } }; diff --git a/Libraries/Inspector/Inspector.js b/Libraries/Inspector/Inspector.js index 6cfe8c20e90f24..8bfe2ef4238399 100644 --- a/Libraries/Inspector/Inspector.js +++ b/Libraries/Inspector/Inspector.js @@ -10,8 +10,6 @@ * @flow */ -/* eslint-disable dot-notation, no-dimensions-get-window */ - 'use strict'; const Dimensions = require('Dimensions'); diff --git a/Libraries/Lists/FillRateHelper.js b/Libraries/Lists/FillRateHelper.js index bc119a83774637..8d52111e1cdbab 100644 --- a/Libraries/Lists/FillRateHelper.js +++ b/Libraries/Lists/FillRateHelper.js @@ -11,8 +11,6 @@ * @format */ -/* eslint-disable no-console */ - 'use strict'; /* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error diff --git a/Libraries/Network/fetch.js b/Libraries/Network/fetch.js index e64317136706c0..d34d46987a1484 100644 --- a/Libraries/Network/fetch.js +++ b/Libraries/Network/fetch.js @@ -10,7 +10,7 @@ * */ -/* eslint-disable */ + /* globals Headers, Request, Response */ 'use strict'; diff --git a/Libraries/Utilities/infoLog.js b/Libraries/Utilities/infoLog.js index 71fed5d2b2e7c7..6a2a726a60822d 100644 --- a/Libraries/Utilities/infoLog.js +++ b/Libraries/Utilities/infoLog.js @@ -14,7 +14,7 @@ * Intentional info-level logging for clear separation from ad-hoc console debug logging. */ function infoLog(...args) { - return console.log(...args); // eslint-disable-line no-console + return console.log(...args); } module.exports = infoLog; diff --git a/Libraries/polyfills/Array.es6.js b/Libraries/polyfills/Array.es6.js index 09153c8680369f..e6621252994e6c 100644 --- a/Libraries/polyfills/Array.es6.js +++ b/Libraries/polyfills/Array.es6.js @@ -11,7 +11,7 @@ * @nolint */ -/* eslint-disable */ +/* eslint-disable consistent-this */ /** * Creates an array from array like objects. diff --git a/Libraries/polyfills/Array.prototype.es6.js b/Libraries/polyfills/Array.prototype.es6.js index 3d9e4a53e81a74..67799decae7a09 100644 --- a/Libraries/polyfills/Array.prototype.es6.js +++ b/Libraries/polyfills/Array.prototype.es6.js @@ -11,7 +11,7 @@ * @nolint */ -/* eslint-disable */ +/* eslint-disable no-bitwise, no-extend-native, radix, no-self-compare */ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex function findIndex(predicate, context) { diff --git a/Libraries/polyfills/Number.es6.js b/Libraries/polyfills/Number.es6.js index 78af739deabf3e..9323b2d3ef2e9f 100644 --- a/Libraries/polyfills/Number.es6.js +++ b/Libraries/polyfills/Number.es6.js @@ -11,8 +11,6 @@ * @nolint */ -/* eslint-disable strict */ - if (Number.EPSILON === undefined) { Object.defineProperty(Number, 'EPSILON', { value: Math.pow(2, -52), @@ -29,7 +27,6 @@ if (Number.MIN_SAFE_INTEGER === undefined) { }); } if (!Number.isNaN) { - // eslint-disable-next-line max-len // https://github.com/dherman/tc39-codex-wiki/blob/master/data/es6/number/index.md#polyfill-for-numberisnan const globalIsNaN = global.isNaN; Object.defineProperty(Number, 'isNaN', { diff --git a/Libraries/polyfills/Object.es6.js b/Libraries/polyfills/Object.es6.js index 5aa2abd574c2ae..a87a40311e5b2e 100644 --- a/Libraries/polyfills/Object.es6.js +++ b/Libraries/polyfills/Object.es6.js @@ -11,8 +11,6 @@ * @nolint */ -/* eslint-disable strict */ - // WARNING: This is an optimized version that fails on hasOwnProperty checks // and non objects. It's not spec-compliant. It's a perf optimization. // This is only needed for iOS 8 and current Android JSC. diff --git a/Libraries/polyfills/String.prototype.es6.js b/Libraries/polyfills/String.prototype.es6.js index 195f5fd2969dd2..9d9b47c6bd65ef 100644 --- a/Libraries/polyfills/String.prototype.es6.js +++ b/Libraries/polyfills/String.prototype.es6.js @@ -11,7 +11,7 @@ * @nolint */ -/* eslint-disable strict, no-extend-native, no-bitwise */ +/* eslint-disable no-extend-native, no-bitwise */ /* * NOTE: We use (Number(x) || 0) to replace NaN values with zero. diff --git a/Libraries/polyfills/__tests__/Object.es7-test.js b/Libraries/polyfills/__tests__/Object.es7-test.js index e820848d97aa3f..e8c4746c1d44ee 100644 --- a/Libraries/polyfills/__tests__/Object.es7-test.js +++ b/Libraries/polyfills/__tests__/Object.es7-test.js @@ -9,8 +9,6 @@ * @emails oncall+jsinfra */ -/* eslint-disable fb-www/object-create-only-one-param */ - 'use strict'; describe('Object (ES7)', () => { diff --git a/Libraries/polyfills/babelHelpers.js b/Libraries/polyfills/babelHelpers.js index e0c62d9175bde3..4965e5529ca230 100644 --- a/Libraries/polyfills/babelHelpers.js +++ b/Libraries/polyfills/babelHelpers.js @@ -11,7 +11,7 @@ * @nolint */ -/* eslint-disable */ +/* eslint-disable quotes, curly, no-proto, no-undef-init, dot-notation */ // Created by running: // require('babel-core').buildExternalHelpers('_extends classCallCheck createClass createRawReactElement defineProperty get inherits interopRequireDefault interopRequireWildcard objectWithoutProperties possibleConstructorReturn slicedToArray taggedTemplateLiteral toArray toConsumableArray '.split(' ')) diff --git a/Libraries/polyfills/console.js b/Libraries/polyfills/console.js index d08f139a515e27..747b0521e70d55 100644 --- a/Libraries/polyfills/console.js +++ b/Libraries/polyfills/console.js @@ -12,7 +12,7 @@ * @format */ -/* eslint-disable */ +/* eslint-disable no-shadow, eqeqeq, curly, no-unused-vars, no-void */ /** * This pipes all of our console logging functions to native logging so that diff --git a/Libraries/polyfills/error-guard.js b/Libraries/polyfills/error-guard.js index fe660e242957a6..24433346f92c80 100644 --- a/Libraries/polyfills/error-guard.js +++ b/Libraries/polyfills/error-guard.js @@ -11,8 +11,6 @@ * @nolint */ -/* eslint-disable strict */ - let _inGuard = 0; /** diff --git a/RNTester/js/WebViewExample.js b/RNTester/js/WebViewExample.js index 8b45084daed157..d04600512d1705 100644 --- a/RNTester/js/WebViewExample.js +++ b/RNTester/js/WebViewExample.js @@ -256,7 +256,7 @@ class MessagingTest extends React.Component<{}, $FlowFixMeState> { class InjectJS extends React.Component<{}> { webview = null; injectJS = () => { - const script = 'document.write("Injected JS ")'; // eslint-disable-line quotes + const script = 'document.write("Injected JS ")'; if (this.webview) { this.webview.injectJavaScript(script); } diff --git a/local-cli/__tests__/fs-mock-test.js b/local-cli/__tests__/fs-mock-test.js index 175ebcaccc9ae8..39f6e9e1248f49 100644 --- a/local-cli/__tests__/fs-mock-test.js +++ b/local-cli/__tests__/fs-mock-test.js @@ -13,8 +13,6 @@ 'use strict'; -/* eslint-disable no-unclear-flowtypes */ - declare var jest: any; declare var describe: any; declare var beforeEach: any;