diff --git a/.eslintrc.js b/.eslintrc.js index 7243df99a8..5aa1cdf132 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -6,6 +6,7 @@ * * @format */ + 'use strict'; module.exports = { diff --git a/flow-typed/console.js.flow b/flow-typed/console.js.flow index 3f96f84678..d2df334e87 100644 --- a/flow-typed/console.js.flow +++ b/flow-typed/console.js.flow @@ -7,6 +7,7 @@ * @flow * @format */ + 'use strict'; declare module 'console' { diff --git a/packages/metro-babel-register/src/babel-register.js b/packages/metro-babel-register/src/babel-register.js index 2b2a446ae2..923d71107d 100644 --- a/packages/metro-babel-register/src/babel-register.js +++ b/packages/metro-babel-register/src/babel-register.js @@ -6,6 +6,7 @@ * * @format */ + 'use strict'; const escapeRegExp = require('escape-string-regexp'); diff --git a/packages/metro-babel-transformer/src/index.js b/packages/metro-babel-transformer/src/index.js index 85c4b4cd82..1ab376849b 100644 --- a/packages/metro-babel-transformer/src/index.js +++ b/packages/metro-babel-transformer/src/index.js @@ -7,6 +7,7 @@ * @flow * @format */ + 'use strict'; const {parseSync, transformFromAstSync} = require('@babel/core'); diff --git a/packages/metro-config/src/defaults/blacklist.js b/packages/metro-config/src/defaults/blacklist.js index d694557a12..30570ec25d 100644 --- a/packages/metro-config/src/defaults/blacklist.js +++ b/packages/metro-config/src/defaults/blacklist.js @@ -6,6 +6,7 @@ * * @format */ + 'use strict'; var path = require('path'); diff --git a/packages/metro-config/src/defaults/defaults.js b/packages/metro-config/src/defaults/defaults.js index 984cba4494..37fab2ec3a 100644 --- a/packages/metro-config/src/defaults/defaults.js +++ b/packages/metro-config/src/defaults/defaults.js @@ -7,6 +7,7 @@ * @flow strict * @format */ + 'use strict'; const defaultCreateModuleIdFactory = require('metro/src/lib/createModuleIdFactory'); diff --git a/packages/metro-config/src/defaults/validConfig.js b/packages/metro-config/src/defaults/validConfig.js index 9732397737..17c8839c26 100644 --- a/packages/metro-config/src/defaults/validConfig.js +++ b/packages/metro-config/src/defaults/validConfig.js @@ -7,6 +7,7 @@ * @flow * @format */ + 'use strict'; module.exports = (async () => { diff --git a/packages/metro-config/src/oldConfig.js b/packages/metro-config/src/oldConfig.js index a72a99eed0..d5a50082cf 100644 --- a/packages/metro-config/src/oldConfig.js +++ b/packages/metro-config/src/oldConfig.js @@ -7,6 +7,7 @@ * @flow * @format */ + 'use strict'; const blacklist = require('./defaults/blacklist'); diff --git a/packages/metro-core/src/__tests__/Logger-test.js b/packages/metro-core/src/__tests__/Logger-test.js index 33900ec6a4..8ac3a51c41 100644 --- a/packages/metro-core/src/__tests__/Logger-test.js +++ b/packages/metro-core/src/__tests__/Logger-test.js @@ -8,6 +8,7 @@ * @emails oncall+js_foundation * @flow strict-local */ + 'use strict'; const { diff --git a/packages/metro-minify-uglify/__tests__/minify-test.js b/packages/metro-minify-uglify/__tests__/minify-test.js index 6b27663d7e..926b27cf03 100644 --- a/packages/metro-minify-uglify/__tests__/minify-test.js +++ b/packages/metro-minify-uglify/__tests__/minify-test.js @@ -8,6 +8,7 @@ * @format * @emails oncall+js_foundation */ + 'use strict'; import type {BasicSourceMap} from 'metro-source-map'; diff --git a/packages/metro-react-native-babel-preset/src/configs/hmr.js b/packages/metro-react-native-babel-preset/src/configs/hmr.js index c7ee7723ed..53d0f3d4ef 100644 --- a/packages/metro-react-native-babel-preset/src/configs/hmr.js +++ b/packages/metro-react-native-babel-preset/src/configs/hmr.js @@ -6,6 +6,7 @@ * * @format */ + 'use strict'; module.exports = function() { diff --git a/packages/metro-source-map/src/__tests__/composeSourceMaps-test.js b/packages/metro-source-map/src/__tests__/composeSourceMaps-test.js index 0dd61bf056..030161af3c 100644 --- a/packages/metro-source-map/src/__tests__/composeSourceMaps-test.js +++ b/packages/metro-source-map/src/__tests__/composeSourceMaps-test.js @@ -8,6 +8,7 @@ * @flow * @format */ + 'use strict'; /* eslint-disable no-multi-str */ diff --git a/packages/metro-source-map/src/composeSourceMaps.js b/packages/metro-source-map/src/composeSourceMaps.js index 47c509f0a5..48dec3f5a7 100644 --- a/packages/metro-source-map/src/composeSourceMaps.js +++ b/packages/metro-source-map/src/composeSourceMaps.js @@ -7,6 +7,7 @@ * @flow * @format */ + 'use strict'; // eslint-disable-next-line lint/sort-requires diff --git a/packages/metro-source-map/src/encode.js b/packages/metro-source-map/src/encode.js index 87beeca743..926e284df2 100644 --- a/packages/metro-source-map/src/encode.js +++ b/packages/metro-source-map/src/encode.js @@ -1,5 +1,5 @@ /** - * Copyright (c) Facebook, Inc. and its affiliates. + * Portions 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. diff --git a/packages/metro-source-map/src/generateFunctionMap.js b/packages/metro-source-map/src/generateFunctionMap.js index eb007a8e54..fe665839f9 100644 --- a/packages/metro-source-map/src/generateFunctionMap.js +++ b/packages/metro-source-map/src/generateFunctionMap.js @@ -6,8 +6,8 @@ * * @flow * @format - * */ + 'use strict'; const B64Builder = require('./B64Builder'); diff --git a/packages/metro/src/DeltaBundler/__tests__/WorkerFarm-test.js b/packages/metro/src/DeltaBundler/__tests__/WorkerFarm-test.js index 501844b8a1..f58b51b5bd 100644 --- a/packages/metro/src/DeltaBundler/__tests__/WorkerFarm-test.js +++ b/packages/metro/src/DeltaBundler/__tests__/WorkerFarm-test.js @@ -7,6 +7,7 @@ * @emails oncall+metro_bundler * @format */ + 'use strict'; const getDefaultConfig = require('metro-config/src/defaults'); diff --git a/packages/metro/src/JSTransformer/__mocks__/worker.js b/packages/metro/src/JSTransformer/__mocks__/worker.js index e8f91da94a..ebc6afd043 100644 --- a/packages/metro/src/JSTransformer/__mocks__/worker.js +++ b/packages/metro/src/JSTransformer/__mocks__/worker.js @@ -6,6 +6,7 @@ * * @format */ + 'use strict'; module.exports = function(data, callback) { diff --git a/packages/metro/src/JSTransformer/worker/__tests__/import-export-plugin-test.js b/packages/metro/src/JSTransformer/worker/__tests__/import-export-plugin-test.js index 2a292290a4..f6e1258a26 100644 --- a/packages/metro/src/JSTransformer/worker/__tests__/import-export-plugin-test.js +++ b/packages/metro/src/JSTransformer/worker/__tests__/import-export-plugin-test.js @@ -7,6 +7,7 @@ * @emails oncall+js_foundation * @format */ + 'use strict'; const importExportPlugin = require('../import-export-plugin'); diff --git a/packages/metro/src/JSTransformer/worker/__tests__/inline-plugin-test.js b/packages/metro/src/JSTransformer/worker/__tests__/inline-plugin-test.js index 9cdf4b26e0..b653fe6d1d 100644 --- a/packages/metro/src/JSTransformer/worker/__tests__/inline-plugin-test.js +++ b/packages/metro/src/JSTransformer/worker/__tests__/inline-plugin-test.js @@ -8,6 +8,7 @@ * @flow * @format */ + 'use strict'; const inlinePlugin = require('../inline-plugin'); diff --git a/packages/metro/src/JSTransformer/worker/__tests__/worker-test.js b/packages/metro/src/JSTransformer/worker/__tests__/worker-test.js index 2ff20451aa..763270b266 100644 --- a/packages/metro/src/JSTransformer/worker/__tests__/worker-test.js +++ b/packages/metro/src/JSTransformer/worker/__tests__/worker-test.js @@ -7,6 +7,7 @@ * @emails oncall+metro_bundler * @format */ + 'use strict'; jest diff --git a/packages/metro/src/ModuleGraph/module.js b/packages/metro/src/ModuleGraph/module.js index ab6b501a70..b9c8320e90 100644 --- a/packages/metro/src/ModuleGraph/module.js +++ b/packages/metro/src/ModuleGraph/module.js @@ -7,6 +7,7 @@ * @flow strict-local * @format */ + 'use strict'; import type {Module} from './types.flow'; diff --git a/packages/metro/src/ModuleGraph/node-haste/node-haste.flow.js b/packages/metro/src/ModuleGraph/node-haste/node-haste.flow.js index c26c5d2e0c..7a068b4a4f 100644 --- a/packages/metro/src/ModuleGraph/node-haste/node-haste.flow.js +++ b/packages/metro/src/ModuleGraph/node-haste/node-haste.flow.js @@ -7,6 +7,7 @@ * @flow * @format */ + 'use strict'; 'use strict'; diff --git a/packages/metro/src/ModuleGraph/silent-console.js b/packages/metro/src/ModuleGraph/silent-console.js index 42cee976b2..338d907f2a 100644 --- a/packages/metro/src/ModuleGraph/silent-console.js +++ b/packages/metro/src/ModuleGraph/silent-console.js @@ -7,6 +7,7 @@ * @format * @flow strict */ + 'use strict'; const {Console} = require('console'); diff --git a/packages/metro/src/ModuleGraph/test-helpers.js b/packages/metro/src/ModuleGraph/test-helpers.js index 59e5dc8ae2..de9d09fab5 100644 --- a/packages/metro/src/ModuleGraph/test-helpers.js +++ b/packages/metro/src/ModuleGraph/test-helpers.js @@ -6,6 +6,7 @@ * * @format */ + 'use strict'; const generate = require('@babel/generator').default; diff --git a/packages/metro/src/ModuleGraph/types.flow.js b/packages/metro/src/ModuleGraph/types.flow.js index f61b9c22ee..eeacef312e 100644 --- a/packages/metro/src/ModuleGraph/types.flow.js +++ b/packages/metro/src/ModuleGraph/types.flow.js @@ -7,6 +7,7 @@ * @flow * @format */ + 'use strict'; import type {Ast} from '@babel/core'; diff --git a/packages/metro/src/Server/MultipartResponse.js b/packages/metro/src/Server/MultipartResponse.js index 7012b9b0e4..c47b33bcd3 100644 --- a/packages/metro/src/Server/MultipartResponse.js +++ b/packages/metro/src/Server/MultipartResponse.js @@ -6,6 +6,7 @@ * * @format */ + 'use strict'; const CRLF = '\r\n'; diff --git a/packages/metro/src/Server/__tests__/MultipartResponse-test.js b/packages/metro/src/Server/__tests__/MultipartResponse-test.js index e42cb589ce..c08f936d63 100644 --- a/packages/metro/src/Server/__tests__/MultipartResponse-test.js +++ b/packages/metro/src/Server/__tests__/MultipartResponse-test.js @@ -8,6 +8,7 @@ * @emails oncall+js_foundation * @flow */ + 'use strict'; const MultipartResponse = require('../MultipartResponse'); diff --git a/packages/metro/src/Server/symbolicate.js b/packages/metro/src/Server/symbolicate.js index 72ed18f3ca..492ef46cb0 100644 --- a/packages/metro/src/Server/symbolicate.js +++ b/packages/metro/src/Server/symbolicate.js @@ -7,6 +7,7 @@ * @flow strict-local * @format */ + 'use strict'; const {greatestLowerBound} = require('metro-source-map/src/Consumer/search'); diff --git a/packages/metro/src/__mocks__/debug.js b/packages/metro/src/__mocks__/debug.js index 41b21d419a..b0756bd585 100644 --- a/packages/metro/src/__mocks__/debug.js +++ b/packages/metro/src/__mocks__/debug.js @@ -7,6 +7,7 @@ * @format * @flow strict */ + 'use strict'; module.exports = () => () => {}; diff --git a/packages/metro/src/__tests__/HmrServer-test.js b/packages/metro/src/__tests__/HmrServer-test.js index 3606d9f2ac..95003098bf 100644 --- a/packages/metro/src/__tests__/HmrServer-test.js +++ b/packages/metro/src/__tests__/HmrServer-test.js @@ -7,6 +7,7 @@ * @format * @emails oncall+js_foundation */ + 'use strict'; const HmrServer = require('../HmrServer'); diff --git a/packages/metro/src/assetTransformer.js b/packages/metro/src/assetTransformer.js index 52b4ff521a..7ce3d2234f 100644 --- a/packages/metro/src/assetTransformer.js +++ b/packages/metro/src/assetTransformer.js @@ -7,6 +7,7 @@ * @flow * @format */ + 'use strict'; const path = require('path'); diff --git a/packages/metro/src/cli.js b/packages/metro/src/cli.js index 719b0cd0c0..6b683cbcd4 100755 --- a/packages/metro/src/cli.js +++ b/packages/metro/src/cli.js @@ -1,5 +1,4 @@ #!/usr/bin/env node - /** * Copyright (c) Facebook, Inc. and its affiliates. * diff --git a/packages/metro/src/lib/RamBundleParser.js b/packages/metro/src/lib/RamBundleParser.js index be365ea8e8..fe18691214 100644 --- a/packages/metro/src/lib/RamBundleParser.js +++ b/packages/metro/src/lib/RamBundleParser.js @@ -7,6 +7,7 @@ * @format * @flow strict */ + 'use strict'; const MAGIC_NUMBER = require('../shared/output/RamBundle/magic-number'); diff --git a/packages/metro/src/lib/__tests__/addParamsToDefineCall-test.js b/packages/metro/src/lib/__tests__/addParamsToDefineCall-test.js index cea0cffda0..1ab40767cf 100644 --- a/packages/metro/src/lib/__tests__/addParamsToDefineCall-test.js +++ b/packages/metro/src/lib/__tests__/addParamsToDefineCall-test.js @@ -8,6 +8,7 @@ * @emails oncall+js_foundation * @flow strict */ + 'use strict'; const addParamsToDefineCall = require('../addParamsToDefineCall'); diff --git a/packages/metro/src/lib/bundle-modules/HMRClient.js b/packages/metro/src/lib/bundle-modules/HMRClient.js index b5b20e6589..329ca1dfaa 100644 --- a/packages/metro/src/lib/bundle-modules/HMRClient.js +++ b/packages/metro/src/lib/bundle-modules/HMRClient.js @@ -7,6 +7,7 @@ * @flow strict-local * @format */ + 'use strict'; const EventEmitter = require('eventemitter3'); diff --git a/packages/metro/src/lib/bundle-modules/__tests__/HMRClient-test.js b/packages/metro/src/lib/bundle-modules/__tests__/HMRClient-test.js index 2fe5a89204..15f924075a 100644 --- a/packages/metro/src/lib/bundle-modules/__tests__/HMRClient-test.js +++ b/packages/metro/src/lib/bundle-modules/__tests__/HMRClient-test.js @@ -8,6 +8,7 @@ * @emails oncall+js_foundation * @format */ + 'use strict'; const HMRClient = require('../HMRClient'); diff --git a/packages/metro/src/shared/output/RamBundle/as-assets.js b/packages/metro/src/shared/output/RamBundle/as-assets.js index 520760bba9..616c9f2dc3 100644 --- a/packages/metro/src/shared/output/RamBundle/as-assets.js +++ b/packages/metro/src/shared/output/RamBundle/as-assets.js @@ -7,6 +7,7 @@ * @flow * @format */ + 'use strict'; const MAGIC_RAM_BUNDLE_NUMBER = require('./magic-number'); diff --git a/packages/metro/src/shared/output/RamBundle/as-indexed-file.js b/packages/metro/src/shared/output/RamBundle/as-indexed-file.js index c669dc6656..153b777b9b 100644 --- a/packages/metro/src/shared/output/RamBundle/as-indexed-file.js +++ b/packages/metro/src/shared/output/RamBundle/as-indexed-file.js @@ -7,6 +7,7 @@ * @flow * @format */ + 'use strict'; const MAGIC_UNBUNDLE_FILE_HEADER = require('./magic-number'); diff --git a/packages/metro/src/shared/output/RamBundle/buildSourcemapWithMetadata.js b/packages/metro/src/shared/output/RamBundle/buildSourcemapWithMetadata.js index 41b1c0733b..0356631833 100644 --- a/packages/metro/src/shared/output/RamBundle/buildSourcemapWithMetadata.js +++ b/packages/metro/src/shared/output/RamBundle/buildSourcemapWithMetadata.js @@ -7,6 +7,7 @@ * @flow strict-local * @format */ + 'use strict'; const { diff --git a/packages/metro/src/shared/output/RamBundle/magic-number.js b/packages/metro/src/shared/output/RamBundle/magic-number.js index e0759defd5..50ad0f3347 100644 --- a/packages/metro/src/shared/output/RamBundle/magic-number.js +++ b/packages/metro/src/shared/output/RamBundle/magic-number.js @@ -7,6 +7,7 @@ * @flow strict * @format */ + 'use strict'; module.exports = 0xfb0bd1e5; diff --git a/packages/metro/src/shared/output/RamBundle/util.js b/packages/metro/src/shared/output/RamBundle/util.js index 66e40bec8c..b780831a64 100644 --- a/packages/metro/src/shared/output/RamBundle/util.js +++ b/packages/metro/src/shared/output/RamBundle/util.js @@ -7,6 +7,7 @@ * @flow strict-local * @format */ + 'use strict'; const invariant = require('invariant'); diff --git a/packages/metro/src/shared/output/RamBundle/write-sourcemap.js b/packages/metro/src/shared/output/RamBundle/write-sourcemap.js index d763f63213..09cefbf679 100644 --- a/packages/metro/src/shared/output/RamBundle/write-sourcemap.js +++ b/packages/metro/src/shared/output/RamBundle/write-sourcemap.js @@ -7,6 +7,7 @@ * @flow strict-local * @format */ + 'use strict'; const writeFile = require('../writeFile'); diff --git a/packages/metro/src/shared/output/__tests__/meta-test.js b/packages/metro/src/shared/output/__tests__/meta-test.js index 3b4d4358ab..f7499e40f3 100644 --- a/packages/metro/src/shared/output/__tests__/meta-test.js +++ b/packages/metro/src/shared/output/__tests__/meta-test.js @@ -8,6 +8,7 @@ * @emails oncall+js_foundation * @flow strict */ + 'use strict'; const meta = require('../meta'); diff --git a/packages/metro/src/shared/output/meta.js b/packages/metro/src/shared/output/meta.js index 3ee50055e6..3054067bd7 100644 --- a/packages/metro/src/shared/output/meta.js +++ b/packages/metro/src/shared/output/meta.js @@ -7,6 +7,7 @@ * @flow strict * @format */ + 'use strict'; /* global Buffer: true */ diff --git a/packages/metro/src/shared/output/writeFile.js b/packages/metro/src/shared/output/writeFile.js index 9806584bc4..13b4dbae24 100644 --- a/packages/metro/src/shared/output/writeFile.js +++ b/packages/metro/src/shared/output/writeFile.js @@ -7,6 +7,7 @@ * @flow * @format */ + 'use strict'; const denodeify = require('denodeify'); diff --git a/packages/metro/src/shared/types.flow.js b/packages/metro/src/shared/types.flow.js index 55585f973f..30c3e4244e 100644 --- a/packages/metro/src/shared/types.flow.js +++ b/packages/metro/src/shared/types.flow.js @@ -7,6 +7,7 @@ * @flow strict-local * @format */ + 'use strict'; import type {Options as DeltaBundlerOptions} from '../DeltaBundler/types.flow'; diff --git a/scripts/createSubpackage.js b/scripts/createSubpackage.js index 462584227c..1d2a32a0eb 100644 --- a/scripts/createSubpackage.js +++ b/scripts/createSubpackage.js @@ -6,6 +6,7 @@ * * @format */ + 'use strict'; const fs = require('fs'); diff --git a/scripts/mapCoverage.js b/scripts/mapCoverage.js index e4a50b529d..92c617ba45 100644 --- a/scripts/mapCoverage.js +++ b/scripts/mapCoverage.js @@ -3,7 +3,6 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - * */ /** diff --git a/scripts/setupJest.js b/scripts/setupJest.js index 1fd65e8013..5f3935e20b 100644 --- a/scripts/setupJest.js +++ b/scripts/setupJest.js @@ -6,6 +6,7 @@ * * @format */ + 'use strict'; global.Promise = require('promise');