mirror of https://github.com/docker/docs.git
Stricter lint checks.
This commit is contained in:
parent
117ddb6fa9
commit
3ba951ce94
|
@ -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
|
||||
}
|
||||
|
|
|
@ -19,8 +19,7 @@ if (argv.integration) {
|
|||
process.env.TEST_TYPE = 'test';
|
||||
}
|
||||
|
||||
app.on('activate-with-no-open-windows', function () {
|
||||
var mainWindow = new BrowserWindow({
|
||||
var windowOptions = {
|
||||
width: 1000,
|
||||
height: 700,
|
||||
'min-width': 1000,
|
||||
|
@ -28,7 +27,10 @@ app.on('activate-with-no-open-windows', function () {
|
|||
resizable: true,
|
||||
frame: false,
|
||||
show: false
|
||||
});
|
||||
};
|
||||
|
||||
app.on('activate-with-no-open-windows', function () {
|
||||
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 {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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(<Handler/>, 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(<Handler/>, document.body);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue