Skip to content

Commit

Permalink
⬆️ 👕 updated to eslint 2.1.0
Browse files Browse the repository at this point in the history
Verified migration doc (nothing to be done)
http://eslint.org/docs/user-guide/migrating-to-2.0.0

And made sure the eslint tasks passed
  • Loading branch information
cesine committed Feb 16, 2016
1 parent f3f6fa9 commit 2aff0c4
Show file tree
Hide file tree
Showing 16 changed files with 28 additions and 27 deletions.
6 changes: 4 additions & 2 deletions atom/browser/lib/rpc-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,20 +130,21 @@ var unwrapArgs = function(sender, args) {
return Promise.resolve({
then: metaToValue(meta.then)
});
case 'object':
case 'object': {
let ret = v8Util.createObjectWithName(meta.name);
ref = meta.members;
for (i = 0, len = ref.length; i < len; i++) {
member = ref[i];
ret[member.name] = metaToValue(member.value);
}
return ret;
}
case 'function-with-return-value':
returnValue = metaToValue(meta.value);
return function() {
return returnValue;
};
case 'function':
case 'function': {
// Cache the callbacks in renderer.
if (!sender.callbacks) {
sender.callbacks = new IDWeakMap;
Expand Down Expand Up @@ -172,6 +173,7 @@ var unwrapArgs = function(sender, args) {
});
sender.callbacks.set(meta.id, callIntoRenderer);
return callIntoRenderer;
}
default:
throw new TypeError("Unknown type: " + meta.type);
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.36.7",
"devDependencies": {
"asar": "^0.9.0",
"eslint": "^1.10.3",
"eslint": "^2.1.0",
"request": "*"
},
"optionalDependencies": {
Expand Down
1 change: 0 additions & 1 deletion spec/asar-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,6 @@ describe('asar package', function() {
});
});
describe('child_process.fork', function() {
child_process = require('child_process');
it('opens a normal js file', function(done) {
var child;
child = child_process.fork(path.join(fixtures, 'asar', 'a.asar', 'ping.js'));
Expand Down
12 changes: 6 additions & 6 deletions spec/fixtures/api/quit-app/main.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
var app = require('electron').app
var app = require('electron').app;

app.on('ready', function () {
// This setImmediate call gets the spec passing on Linux
setImmediate(function () {
app.exit(123)
})
})
app.exit(123);
});
});

process.on('exit', function (code) {
console.log('Exit event with code: ' + code)
})
console.log('Exit event with code: ' + code);
});
4 changes: 2 additions & 2 deletions spec/fixtures/module/call.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
exports.call = function(func) {
return func();
}
};

exports.constructor = function() {
this.test = 'test';
}
};
2 changes: 1 addition & 1 deletion spec/fixtures/module/id.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
exports.id = 1127
exports.id = 1127;
2 changes: 1 addition & 1 deletion spec/fixtures/module/locale-compare.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
process.on('message', function (msg) {
process.on('message', function () {
process.send([
'a'.localeCompare('a'),
'ä'.localeCompare('z', 'de'),
Expand Down
2 changes: 1 addition & 1 deletion spec/fixtures/module/original-fs.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
process.on('message', function (msg) {
process.on('message', function () {
process.send(typeof require('original-fs'));
});
4 changes: 2 additions & 2 deletions spec/fixtures/module/print_name.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
exports.print = function(obj) {
return obj.constructor.name;
}
};

exports.echo = function(obj) {
return obj;
}
};
2 changes: 1 addition & 1 deletion spec/fixtures/module/promise.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ exports.twicePromise = function (promise) {
return promise.then(function (value) {
return value * 2;
});
}
};
2 changes: 1 addition & 1 deletion spec/fixtures/module/property.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
exports.property = 1127
exports.property = 1127;
2 changes: 1 addition & 1 deletion spec/fixtures/module/send-later.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var ipcRenderer = require('electron').ipcRenderer;
window.onload = function() {
ipcRenderer.send('answer', typeof window.process);
}
};
2 changes: 1 addition & 1 deletion spec/fixtures/module/set-immediate.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ process.on('uncaughtException', function(error) {
process.exit(1);
});

process.on('message', function(msg) {
process.on('message', function() {
setImmediate(function() {
process.send('ok');
process.exit(0);
Expand Down
6 changes: 3 additions & 3 deletions spec/fixtures/workers/shared_worker.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
onconnect = function(event) {
this.onconnect = function(event) {
var port = event.ports[0];
port.start();
port.onmessage = function(event) {
port.postMessage(event.data);
}
}
};
};
2 changes: 1 addition & 1 deletion spec/fixtures/workers/worker.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
this.onmessage = function(msg) {
this.postMessage(msg.data);
}
};
4 changes: 2 additions & 2 deletions spec/static/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ app.on('ready', function() {

// Send auto updater errors to window to be verified in specs
electron.autoUpdater.on('error', function (error) {
window.send('auto-updater-error', error.message)
window.send('auto-updater-error', error.message);
});

window = new BrowserWindow({
Expand Down Expand Up @@ -108,7 +108,7 @@ app.on('ready', function() {
// reply the result to renderer for verifying
var downloadFilePath = path.join(__dirname, '..', 'fixtures', 'mock.pdf');
ipcMain.on('set-download-option', function(event, need_cancel, prevent_default) {
window.webContents.session.once('will-download', function(e, item, webContents) {
window.webContents.session.once('will-download', function(e, item) {
if (prevent_default) {
e.preventDefault();
const url = item.getURL();
Expand Down

0 comments on commit 2aff0c4

Please sign in to comment.