Skip to content
Permalink
Browse files
eslint cleanup fixes for: padded-blocks
and remove padded-blocks exception from .eslintrc.yml

with src & spec fixed by the following command:

    npm run eslint -- --fix
  • Loading branch information
Christopher J. Brody committed Jul 18, 2019
1 parent a339f53 commit 112b5cd1c78a128abe070f8d7ffa786e0ae97ef2
Showing 14 changed files with 0 additions and 23 deletions.
@@ -5,7 +5,6 @@ rules:
- error
- 4
camelcase: off
padded-blocks: off
no-unused-vars:
- error
- args: after-used
@@ -413,7 +413,6 @@ describe('config-changes module', function () {
expect(sdk.attrib['android:targetSdkVersion']).toEqual('24');
expect(sdk.attrib['android:minSdkVersion']).toEqual('14');
expect(sdk.attrib['android:maxSdkVersion']).toBeUndefined();

});
it('should append new children to XML document tree', function () {
var configfile_cfg = new ConfigParser(configfile_xml);
@@ -484,7 +483,6 @@ describe('config-changes module', function () {
var munger = new configChanges.PlatformMunger('android', temp, platformJson, pluginInfoProvider);
munger.add_config_changes(cfg, true);
expect(function () { munger.process(plugins_dir); }).toThrow(new Error('org.test.editconfigtest_two cannot be added. <edit-config> changes in this plugin conflicts with <edit-config> changes in config.xml. Conflicts must be resolved before plugin can be added.'));

});
});
describe('of plist config files', function () {
@@ -22,7 +22,6 @@ var path = require('path');
var projectDir = path.join('project_dir', 'app', 'src', 'main');

describe('ConfigFile tests', function () {

beforeEach(function () {
spyOn(configFile, 'isBinaryPlist').and.callThrough();
});
@@ -43,7 +43,6 @@ describe('CordovaLogger class', function () {
});

describe('instance', function () {

var logger;

beforeEach(function () {
@@ -92,7 +91,6 @@ describe('CordovaLogger class', function () {
});

it('Test 009 : should attach corresponding listeners to supplied emitter', function () {

var eventNamesExclusions = {
log: 'normal',
warning: 'warn'
@@ -110,7 +108,6 @@ describe('CordovaLogger class', function () {
});

describe('log method', function () {

function CursorSpy (name) {
var cursorMethods = ['reset', 'write'];
var spy = jasmine.createSpyObj(name, cursorMethods);
@@ -120,7 +120,6 @@ var testFileStats3 = mockFileStats(now);
var nullLogger = function () {};

describe('FileUpdater class', function () {

beforeEach(function () {
FileUpdater.updatePathWithStatsCalls = [];
FileUpdater.updatePathWithStatsResult = true;
@@ -759,6 +758,5 @@ describe('FileUpdater class', function () {
testTargetDir,
null);
});

});
});
@@ -84,7 +84,6 @@ describe('PlatformJson class', function () {
});

it('Test 007 : should remove plugin modules from "root.modules" array based on file path', function () {

var pluginPaths = [
'plugins/fakeId/www/fakeModule.js',
'plugins/otherPlugin/www/module1.js',
@@ -37,7 +37,6 @@ var FAKE_LOCATIONS = {
};

describe('PluginManager class', function () {

beforeEach(function () {
spyOn(ConfigChanges, 'PlatformMunger');
spyOn(fs, 'outputJsonSync');
@@ -124,5 +124,4 @@ describe('spawn method', function () {
});
});
});

});
@@ -434,7 +434,6 @@ describe('xml-helpers', function () {
xml_helpers.mergeXml(testXml, dstXml, '', true);
testElements = dstXml.findall('access');
expect(testElements.length).toEqual(2);

});

it('Test 042 : should remove duplicate preferences (by name attribute value)', function () {
@@ -220,7 +220,6 @@ function add_config_changes (config, should_increment) {
// skip no chnages
return changes.filter(function (x) { return isConflictingInfo.noChanges.indexOf(x) === -1; });
}

}
return changes;
})(changes);
@@ -443,11 +442,9 @@ function is_conflicting (editchanges, config_munge, self, force) {
mungeutil.deep_add(conflictingMunge, change_file, conflictingParent, target_elem);
});
}

} else {
// plugin cannot overwrite other plugin changes without --force
conflictingPlugin = target[0].plugin;

}
}
}
@@ -74,7 +74,6 @@ function getCordovaNamespacePrefix (doc) {
* @return {String}
*/
function findElementAttributeValue (attributeName, elems) {

elems = Array.isArray(elems) ? elems : [elems];

var value = elems.filter(function (elem) {
@@ -186,15 +185,13 @@ ConfigParser.prototype = {
pref.attrib.value = value;
},
getPreference: function (name, platform) {

var platformPreference = '';

if (platform) {
platformPreference = this.getPlatformPreference(name, platform);
}

return platformPreference || this.getGlobalPreference(name);

},
setPreference: function (name, platform, value) {
if (!value) {
@@ -89,7 +89,6 @@ PlatformJson.prototype.addPlugin = function (pluginId, variables, isTopLevel) {
* @returns {this} Current PlatformJson instance to allow calls chaining
*/
PlatformJson.prototype.addPluginMetadata = function (pluginInfo) {

var installedModules = this.root.modules || [];

var installedPaths = installedModules.map(function (installedModule) {
@@ -242,7 +241,6 @@ function fix_munge (root) {
* @param (JsModule|Object) jsModule A js-module entry from PluginInfo class to generate metadata for
*/
function ModuleMetadata (pluginId, jsModule) {

if (!pluginId) throw new TypeError('pluginId argument must be a valid plugin id');
if (!jsModule.src && !jsModule.name) throw new TypeError('jsModule argument must contain src or/and name properties');

@@ -18,7 +18,6 @@
*/

module.exports = function addProperty (module, property, modulePath, obj) {

obj = obj || module.exports;
// Add properties as getter to delay load the modules on first invocation
Object.defineProperty(obj, property, {
@@ -172,7 +172,6 @@ module.exports = {
});

return true;

},

parseElementtreeSync: function (filename) {

0 comments on commit 112b5cd

Please sign in to comment.