Fix Prettier (#7066)

This commit is contained in:
Diamond Lewis
2020-12-13 11:19:04 -06:00
committed by GitHub
parent d4948572a8
commit 033a0bd443
64 changed files with 697 additions and 1887 deletions

View File

@@ -5,7 +5,7 @@ let _definitions;
let _reverseDefinitions;
let _defaults;
Command.prototype.loadDefinitions = function(definitions) {
Command.prototype.loadDefinitions = function (definitions) {
_definitions = definitions;
Object.keys(definitions).reduce((program, opt) => {
@@ -47,7 +47,7 @@ Command.prototype.loadDefinitions = function(definitions) {
}, {});
/* istanbul ignore next */
this.on('--help', function() {
this.on('--help', function () {
console.log(' Configure From Environment:');
console.log('');
Object.keys(_reverseDefinitions).forEach(key => {
@@ -100,7 +100,7 @@ function parseConfigFile(program) {
return options;
}
Command.prototype.setValuesIfNeeded = function(options) {
Command.prototype.setValuesIfNeeded = function (options) {
Object.keys(options).forEach(key => {
if (!Object.prototype.hasOwnProperty.call(this, key)) {
this[key] = options[key];
@@ -110,7 +110,7 @@ Command.prototype.setValuesIfNeeded = function(options) {
Command.prototype._parse = Command.prototype.parse;
Command.prototype.parse = function(args, env) {
Command.prototype.parse = function (args, env) {
this._parse(args);
// Parse the environment first
const envOptions = parseEnvironment(env);
@@ -123,7 +123,7 @@ Command.prototype.parse = function(args, env) {
this.setValuesIfNeeded(_defaults);
};
Command.prototype.getOptions = function() {
Command.prototype.getOptions = function () {
return Object.keys(_definitions).reduce((options, key) => {
if (typeof this[key] !== 'undefined') {
options[key] = this[key];

View File

@@ -24,7 +24,7 @@ function logStartupOptions(options) {
}
}
export default function({ definitions, help, usage, start }) {
export default function ({ definitions, help, usage, start }) {
program.loadDefinitions(definitions);
if (usage) {
program.usage(usage);
@@ -35,7 +35,7 @@ export default function({ definitions, help, usage, start }) {
program.parse(process.argv, process.env);
const options = program.getOptions();
start(program, options, function() {
start(program, options, function () {
logStartupOptions(options);
});
}