mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-04-28 09:25:42 +08:00
Lint internal scripts with eslint:recommended (#1729)
* Lint internal scripts with eslint:recommended * Warnings r bad
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var fs = require('fs');
|
||||
var path = require('path');
|
||||
var chalk = require('chalk');
|
||||
|
||||
2
packages/react-dev-utils/clearConsole.js
vendored
2
packages/react-dev-utils/clearConsole.js
vendored
@@ -7,6 +7,8 @@
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
function clearConsole() {
|
||||
process.stdout.write(process.platform === 'win32' ? '\x1Bc' : '\x1B[2J\x1B[3J\x1B[H');
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
// WARNING: this code is untranspiled and is used in browser too.
|
||||
// Please make sure any changes are in ES5 or contribute a Babel compile step.
|
||||
|
||||
|
||||
11
packages/react-dev-utils/getProcessForPort.js
vendored
11
packages/react-dev-utils/getProcessForPort.js
vendored
@@ -1,3 +1,14 @@
|
||||
/**
|
||||
* Copyright (c) 2015-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var chalk = require('chalk');
|
||||
var execSync = require('child_process').execSync;
|
||||
var path = require('path');
|
||||
|
||||
2
packages/react-dev-utils/openBrowser.js
vendored
2
packages/react-dev-utils/openBrowser.js
vendored
@@ -7,6 +7,8 @@
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var execSync = require('child_process').execSync;
|
||||
var opn = require('opn');
|
||||
|
||||
|
||||
4
packages/react-dev-utils/prompt.js
vendored
4
packages/react-dev-utils/prompt.js
vendored
@@ -7,6 +7,8 @@
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var rl = require('readline');
|
||||
|
||||
// Convention: "no" should be the conservative choice.
|
||||
@@ -37,6 +39,6 @@ function prompt(question, isYesDefault) {
|
||||
return resolve(isYes);
|
||||
});
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = prompt;
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
// This alternative WebpackDevServer combines the functionality of:
|
||||
// https://github.com/webpack/webpack-dev-server/blob/webpack-1/client/index.js
|
||||
// https://github.com/webpack/webpack/blob/webpack-1/hot/dev-server.js
|
||||
@@ -323,4 +325,4 @@ function tryApplyUpdates(onHotUpdateSuccess) {
|
||||
}
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user