mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-06-19 17:53:49 +08:00
Fix eslint findings
This commit is contained in:
@@ -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');
|
||||
|
||||
@@ -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 = '/';
|
||||
|
||||
@@ -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;
|
||||
|
||||
2
packages/react-scripts/scripts/build.js
vendored
2
packages/react-scripts/scripts/build.js
vendored
@@ -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);
|
||||
|
||||
@@ -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) ? '<rootDir>/src/setupTests.ts' : undefined;
|
||||
|
||||
Reference in New Issue
Block a user