diff --git a/packages/react-scripts/config/jest/typescriptTransform.js b/packages/react-scripts/config/jest/typescriptTransform.js index b6ac285e..6e6fd075 100644 --- a/packages/react-scripts/config/jest/typescriptTransform.js +++ b/packages/react-scripts/config/jest/typescriptTransform.js @@ -1,5 +1,7 @@ // Copyright 2004-present Facebook. All Rights Reserved. +'use strict'; + const fs = require('fs'); const tsc = require('typescript'); const tsconfigPath = require('app-root-path').resolve('/tsconfig.json'); diff --git a/packages/react-scripts/config/webpack.config.dev.js b/packages/react-scripts/config/webpack.config.dev.js index 31adcb5b..c46e2caa 100644 --- a/packages/react-scripts/config/webpack.config.dev.js +++ b/packages/react-scripts/config/webpack.config.dev.js @@ -19,11 +19,6 @@ var WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeMod var getClientEnvironment = require('./env'); var paths = require('./paths'); -// @remove-on-eject-begin -// `path` is not used after eject - see https://github.com/facebookincubator/create-react-app/issues/1174 -var path = require('path'); -// @remove-on-eject-end - // Webpack uses `publicPath` to determine where the app is being served from. // In development, we always serve from the root. This makes config easier. var publicPath = '/'; diff --git a/packages/react-scripts/config/webpack.config.prod.js b/packages/react-scripts/config/webpack.config.prod.js index e633cbe9..cca410a4 100644 --- a/packages/react-scripts/config/webpack.config.prod.js +++ b/packages/react-scripts/config/webpack.config.prod.js @@ -19,11 +19,6 @@ var InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin'); var paths = require('./paths'); var getClientEnvironment = require('./env'); -// @remove-on-eject-begin -// `path` is not used after eject - see https://github.com/facebookincubator/create-react-app/issues/1174 -var path = require('path'); -// @remove-on-eject-end - // Webpack uses `publicPath` to determine where the app is being served from. // It requires a trailing slash, or the file assets will get an incorrect path. var publicPath = paths.servedPath; diff --git a/packages/react-scripts/scripts/build.js b/packages/react-scripts/scripts/build.js index 9958960e..de3093be 100644 --- a/packages/react-scripts/scripts/build.js +++ b/packages/react-scripts/scripts/build.js @@ -31,8 +31,6 @@ var FileSizeReporter = require('react-dev-utils/FileSizeReporter'); var measureFileSizesBeforeBuild = FileSizeReporter.measureFileSizesBeforeBuild; var printFileSizesAfterBuild = FileSizeReporter.printFileSizesAfterBuild; -var recursive = require('recursive-readdir'); -var stripAnsi = require('strip-ansi'); var { highlight } = require('cli-highlight'); var useYarn = fs.existsSync(paths.yarnLockFile); diff --git a/packages/react-scripts/utils/createJestConfig.js b/packages/react-scripts/utils/createJestConfig.js index e2f03d40..67a33426 100644 --- a/packages/react-scripts/utils/createJestConfig.js +++ b/packages/react-scripts/utils/createJestConfig.js @@ -14,7 +14,7 @@ const fs = require('fs'); const paths = require('../config/paths'); -module.exports = (resolve, rootDir, isEjecting) => { +module.exports = (resolve, rootDir) => { // Use this instead of `paths.testsSetup` to avoid putting // an absolute filename into configuration after ejecting. const setupTestsFile = fs.existsSync(paths.testsSetup) ? '/src/setupTests.ts' : undefined;