diff --git a/.jshintrc b/.jshintrc
index 73c8cb3691..05f93ee7c8 100644
--- a/.jshintrc
+++ b/.jshintrc
@@ -1,5 +1,5 @@
{
- "curly": false,
+ "curly": true,
"noempty": true,
"newcap": true,
"eqeqeq": true,
@@ -17,6 +17,10 @@
"immed": true,
"smarttabs": true,
"strict": false,
+ "quotmark": false,
+ "nonbsp": true,
+ "noempty": true,
+ "camelcase": false,
"globals": {
"define": true
}
diff --git a/browser/main.js b/browser/main.js
index 1a2ab7364d..04c8d5f54b 100644
--- a/browser/main.js
+++ b/browser/main.js
@@ -19,16 +19,18 @@ if (argv.integration) {
process.env.TEST_TYPE = 'test';
}
+var windowOptions = {
+ width: 1000,
+ height: 700,
+ 'min-width': 1000,
+ 'min-height': 700,
+ resizable: true,
+ frame: false,
+ show: false
+};
+
app.on('activate-with-no-open-windows', function () {
- var mainWindow = new BrowserWindow({
- width: 1000,
- height: 700,
- 'min-width': 1000,
- 'min-height': 700,
- resizable: true,
- frame: false,
- show: false
- });
+ var mainWindow = new BrowserWindow(windowOptions);
if (mainWindow) {
mainWindow.show();
}
@@ -36,15 +38,7 @@ app.on('activate-with-no-open-windows', function () {
});
app.on('ready', function() {
- var mainWindow = new BrowserWindow({
- width: 1000,
- height: 700,
- 'min-width': 1000,
- 'min-height': 700,
- resizable: true,
- frame: false,
- show: false
- });
+ var mainWindow = new BrowserWindow(windowOptions);
if (argv.test) {
mainWindow.loadUrl('file://' + __dirname + '/../tests/tests.html');
} else {
diff --git a/src/Boot2Docker.js b/src/Boot2Docker.js
index e702c77a04..c8bb0f742b 100644
--- a/src/Boot2Docker.js
+++ b/src/Boot2Docker.js
@@ -131,8 +131,8 @@ var Boot2Docker = {
var totalGb = parseInt(tokens[3], 10) / 1000000;
var percent = parseInt(tokens[4].replace('%', ''), 10);
callback(null, {
- used_gb: usedGb.toFixed(2),
- total_gb: totalGb.toFixed(2),
+ usedGb: usedGb.toFixed(2),
+ totalGb: totalGb.toFixed(2),
percent: percent
});
} catch (error) {
@@ -160,9 +160,9 @@ var Boot2Docker = {
var totalGb = usedGb + freeGb;
var percent = Math.round(usedGb / totalGb * 100);
callback(null, {
- used_gb: usedGb.toFixed(2),
- total_gb: totalGb.toFixed(2),
- free_gb: freeGb.toFixed(2),
+ usedGb: usedGb.toFixed(2),
+ totalGb: totalGb.toFixed(2),
+ freeGb: freeGb.toFixed(2),
percent: percent
});
} catch (error) {
diff --git a/src/Main.js b/src/Main.js
index 5c48980e0c..4582a2235f 100644
--- a/src/Main.js
+++ b/src/Main.js
@@ -16,11 +16,11 @@ if (process.env.NODE_ENV === 'development') {
if (!window.location.hash.length || window.location.hash === '#/') {
SetupStore.run(function () {
boot2docker.ip(function (err, ip) {
- if (err) console.log(err);
+ if (err) { console.log(err); }
docker.setHost(ip);
router.transitionTo('containers');
ContainerStore.init(function (err) {
- if (err) console.log(err);
+ if (err) { console.log(err); }
router.run(function (Handler) {
React.render(, document.body);
});
@@ -29,10 +29,10 @@ if (!window.location.hash.length || window.location.hash === '#/') {
});
} else {
boot2docker.ip(function (err, ip) {
- if (err) console.log(err);
+ if (err) { console.log(err); }
docker.setHost(ip);
ContainerStore.init(function (err) {
- if (err) console.log(err);
+ if (err) { console.log(err); }
router.run(function (Handler) {
React.render(, document.body);
});