chore(npm): bump @cordova/eslint-config@^4.0.0 (#1421)

* chore(npm): bump @cordova/eslint-config@^4.0.0
* style(lint): apply auto corrections
* style(lint): convert hasAndroidHome var to let and hoisted
This commit is contained in:
エリス
2022-04-18 10:39:54 +09:00
committed by GitHub
parent 62ed71c539
commit a2bb7f1173
25 changed files with 1091 additions and 2686 deletions
+16 -16
View File
@@ -17,17 +17,17 @@
under the License.
*/
var path = require('path');
const path = require('path');
var AndroidProject = require('./AndroidProject');
var PluginManager = require('cordova-common').PluginManager;
const AndroidProject = require('./AndroidProject');
const PluginManager = require('cordova-common').PluginManager;
var CordovaLogger = require('cordova-common').CordovaLogger;
var selfEvents = require('cordova-common').events;
var ConfigParser = require('cordova-common').ConfigParser;
const CordovaLogger = require('cordova-common').CordovaLogger;
const selfEvents = require('cordova-common').events;
const ConfigParser = require('cordova-common').ConfigParser;
const prepare = require('./prepare').prepare;
var PLATFORM = 'android';
const PLATFORM = 'android';
const VERSION = require('../package').version;
function setupEvents (externalEventEmitter) {
@@ -88,7 +88,7 @@ class Api {
* platform's file structure and other properties of platform.
*/
getPlatformInfo () {
var result = {};
const result = {};
result.locations = this.locations;
result.root = this.root;
result.name = this.platform;
@@ -139,8 +139,8 @@ class Api {
* CordovaError instance.
*/
addPlugin (plugin, installOptions) {
var project = AndroidProject.getProjectFile(this.root);
var self = this;
const project = AndroidProject.getProjectFile(this.root);
const self = this;
installOptions = installOptions || {};
installOptions.variables = installOptions.variables || {};
@@ -175,7 +175,7 @@ class Api {
* CordovaError instance.
*/
removePlugin (plugin, uninstallOptions) {
var project = AndroidProject.getProjectFile(this.root);
const project = AndroidProject.getProjectFile(this.root);
if (uninstallOptions && uninstallOptions.usePlatformWww === true) {
uninstallOptions.usePlatformWww = false;
@@ -239,7 +239,7 @@ class Api {
* arhcitectures is specified.
*/
build (buildOptions) {
var self = this;
const self = this;
return require('./check_reqs').run().then(function () {
return require('./build').run.call(self, buildOptions);
@@ -269,7 +269,7 @@ class Api {
* successfully, or rejected with CordovaError.
*/
run (runOptions) {
var self = this;
const self = this;
return require('./check_reqs').run().then(function () {
return require('./run').run.call(self, runOptions);
});
@@ -283,7 +283,7 @@ class Api {
* CordovaError.
*/
clean (cleanOptions) {
var self = this;
const self = this;
// This will lint, checking for null won't
if (typeof cleanOptions === 'undefined') {
cleanOptions = {};
@@ -328,7 +328,7 @@ class Api {
*/
static createPlatform (destination, config, options, events) {
events = setupEvents(events);
var result;
let result;
try {
result = require('./create').create(destination, config, options, events).then(function (destination) {
return new Api(PLATFORM, destination, events);
@@ -358,7 +358,7 @@ class Api {
*/
static updatePlatform (destination, options, events) {
events = setupEvents(events);
var result;
let result;
try {
result = require('../../lib/create').update(destination, options, events).then(function (destination) {
return new Api(PLATFORM, destination, events);