diff --git a/packages/metro-bundler/src/JSTransformer/worker/__tests__/inline-test.js b/packages/metro-bundler/src/JSTransformer/worker/__tests__/inline-test.js index 88e7f4af..9a452aee 100644 --- a/packages/metro-bundler/src/JSTransformer/worker/__tests__/inline-test.js +++ b/packages/metro-bundler/src/JSTransformer/worker/__tests__/inline-test.js @@ -10,6 +10,8 @@ */ 'use strict'; +/* eslint-disable max-len */ + const inline = require('../inline'); const {transform, transformFromAst} = require('babel-core'); diff --git a/packages/metro-bundler/src/ModuleGraph/node-haste/node-haste.js b/packages/metro-bundler/src/ModuleGraph/node-haste/node-haste.js index 8920bd71..cfc8c6cc 100644 --- a/packages/metro-bundler/src/ModuleGraph/node-haste/node-haste.js +++ b/packages/metro-bundler/src/ModuleGraph/node-haste/node-haste.js @@ -31,7 +31,11 @@ const {ModuleMap} = require('jest-haste-map'); import type {Moduleish} from '../../node-haste/DependencyGraph/ResolutionRequest'; import type {ResolveFn, TransformedCodeFile} from '../types.flow'; -import type {Extensions, Path} from './node-haste.flow'; +import type { + // eslint-disable-line sort-requires + Extensions, + Path, +} from './node-haste.flow'; type ResolveOptions = {| assetExts: Extensions, diff --git a/packages/metro-bundler/src/Resolver/__tests__/Resolver-test.js b/packages/metro-bundler/src/Resolver/__tests__/Resolver-test.js index 8dd63ba8..66f2085a 100644 --- a/packages/metro-bundler/src/Resolver/__tests__/Resolver-test.js +++ b/packages/metro-bundler/src/Resolver/__tests__/Resolver-test.js @@ -121,6 +121,7 @@ describe('Resolver', function() { it('passes custom platforms to the dependency graph', function() { expect.assertions(1); return Resolver.load({ + // eslint-disable-line no-new projectRoot: '/root', platforms: ['ios', 'windows', 'vr'], }).then(() => { @@ -197,6 +198,7 @@ describe('Resolver', function() { it('should resolve modules', function() { expect.assertions(1); + /*eslint-disable */ var code = [ // require 'require("x")', diff --git a/packages/metro-bundler/src/Resolver/polyfills/prelude.js b/packages/metro-bundler/src/Resolver/polyfills/prelude.js index c4afe04a..0959142a 100644 --- a/packages/metro-bundler/src/Resolver/polyfills/prelude.js +++ b/packages/metro-bundler/src/Resolver/polyfills/prelude.js @@ -10,6 +10,8 @@ * @format */ +/* eslint-disable strict */ + global.__DEV__ = false; global.__BUNDLE_START_TIME__ = global.nativePerformanceNow diff --git a/packages/metro-bundler/src/Resolver/polyfills/prelude_dev.js b/packages/metro-bundler/src/Resolver/polyfills/prelude_dev.js index 068785bc..4b3e5ecd 100644 --- a/packages/metro-bundler/src/Resolver/polyfills/prelude_dev.js +++ b/packages/metro-bundler/src/Resolver/polyfills/prelude_dev.js @@ -10,6 +10,8 @@ * @format */ +/* eslint-disable strict */ + global.__DEV__ = true; global.__BUNDLE_START_TIME__ = global.nativePerformanceNow diff --git a/packages/metro-bundler/src/lib/GlobalTransformCache.js b/packages/metro-bundler/src/lib/GlobalTransformCache.js index b9f2f5bb..40d9c49d 100644 --- a/packages/metro-bundler/src/lib/GlobalTransformCache.js +++ b/packages/metro-bundler/src/lib/GlobalTransformCache.js @@ -410,7 +410,7 @@ class OptionsHasher { )}`; throw new CannotHashOptionsError(message); } - // eslint-disable-next-line no-bitwise + // eslint-disable-next-line no-undef, no-bitwise hash.update(new Buffer([+dev | (+minify << 1)])); hash.update(JSON.stringify(platform)); return this.hashTransformOptions(hash, transform);