Skip to content
Permalink
Browse files
Fix new ESLint object-curly-spacing violations
  • Loading branch information
raphinesse committed Apr 3, 2019
1 parent ca986bd commit c482f5704f28b6984006ac6f91ba349495b3b0cf
Showing 7 changed files with 11 additions and 11 deletions.
@@ -128,8 +128,8 @@ var cordova = {
* @return object
*/
getOriginalHandlers: function () {
return {'document': {'addEventListener': m_document_addEventListener, 'removeEventListener': m_document_removeEventListener},
'window': {'addEventListener': m_window_addEventListener, 'removeEventListener': m_window_removeEventListener}};
return { 'document': { 'addEventListener': m_document_addEventListener, 'removeEventListener': m_document_removeEventListener },
'window': { 'addEventListener': m_window_addEventListener, 'removeEventListener': m_window_removeEventListener } };
},
/**
* Method to fire event from native code
@@ -33,7 +33,7 @@ module.exports = function computeCommitId (callback, cachedGitVersion) {
if (fs.existsSync(path.join(__dirname, '../../.git'))) {
var gitPath = 'git';
var args = 'rev-list HEAD --max-count=1';
childProcess.exec(gitPath + ' ' + args, {cwd: cordovaJSDir}, function (err, stdout, stderr) {
childProcess.exec(gitPath + ' ' + args, { cwd: cordovaJSDir }, function (err, stdout, stderr) {
var isWindows = process.platform.slice(0, 3) === 'win';
if (err && isWindows) {
gitPath = '"' + path.join(process.env['ProgramFiles'], 'Git', 'bin', 'git.exe') + '"';
@@ -169,7 +169,7 @@ describe('android exec.processMessages', function () {
it('Test#008 : should handle payloads of JSON objects', function () {
var messages = createCallbackMessage(true, true, 1, 'id', '{"a":1}');
return performExecAndAwaitSingleCallback(messages).then(() => {
expect(callbackSpy).toHaveBeenCalledWith('id', true, 1, [{a: 1}], true);
expect(callbackSpy).toHaveBeenCalledWith('id', true, 1, [{ a: 1 }], true);
});
});
it('Test#009 : should handle payloads of JSON arrays', function () {
@@ -39,7 +39,7 @@ describe('builder', function () {

it('Test#002 : returns an empty object literal if no path', function () {
var target = {};
var objects = {cat: {}};
var objects = { cat: {} };

builder.buildIntoButDoNotClobber(objects, target);

@@ -52,11 +52,11 @@ describe('channel', function () {
}).not.toThrow();

expect(function () {
multiChannel.subscribe({handleEvent: function () {}});
multiChannel.subscribe({ handleEvent: function () {} });
}).not.toThrow();

expect(function () {
multiChannel.subscribe({apply: function () {}, call: function () {}});
multiChannel.subscribe({ apply: function () {}, call: function () {} });
}).toThrow();
});
it('Test#003 : should not change number of handlers if no function is provided', function () {
@@ -103,11 +103,11 @@ describe('channel', function () {
}).not.toThrow();

expect(function () {
multiChannel.unsubscribe({handleEvent: function () {}});
multiChannel.unsubscribe({ handleEvent: function () {} });
}).not.toThrow();

expect(function () {
multiChannel.unsubscribe({apply: function () {}, call: function () {}});
multiChannel.unsubscribe({ apply: function () {}, call: function () {} });
}).toThrow();
});
it('Test#007 : should not decrement numHandlers if unsubscribing something that does not exist', function () {
@@ -31,7 +31,7 @@ describe('modulemapper', function () {
context = {
func: function () {},
num: 1,
obj: { str: 'hello', num: 8, subObj: {num: 9} },
obj: { str: 'hello', num: 8, subObj: { num: 9 } },
TestClass: TestClass
};
utils.defineGetter(context, 'getme', function () { return 'getter'; });
@@ -83,7 +83,7 @@ describe('utils', function () {

describe('when cloning', function () {
it('Test#013 : can clone an array', function () {
var orig = [1, 2, 3, {four: 4}, '5'];
var orig = [1, 2, 3, { four: 4 }, '5'];

expect(utils.clone(orig)).toEqual(orig);
expect(utils.clone(orig)).not.toBe(orig);

0 comments on commit c482f57

Please sign in to comment.