Lint internal scripts with eslint:recommended (#1729)

* Lint internal scripts with eslint:recommended

* Warnings r bad
This commit is contained in:
Dan Abramov
2017-03-05 22:29:28 +00:00
committed by GitHub
parent df3ca8e614
commit 2f7e3a2168
13 changed files with 45 additions and 13 deletions

View File

@@ -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');

View File

@@ -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');
}

View File

@@ -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.

View File

@@ -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');

View File

@@ -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');

View File

@@ -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;

View File

@@ -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) {
}
);
}
};
}