Skip to content

Commit

Permalink
Merge pull request #152 from BoatsAreRockable/eslint
Browse files Browse the repository at this point in the history
Add ESLint for JavaScript linting
  • Loading branch information
Caleb Ely committed Apr 29, 2016
2 parents fcd766e + e819824 commit e3176ef
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 26 deletions.
14 changes: 14 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"env": {
"browser": true,
"node": true,
"es6": true
},
"rules": {
"no-undef": "error",
"no-unused-vars": ["error", {"varsIgnorePattern": "utils"}]
},
"globals": {
"utils": true
}
}
2 changes: 1 addition & 1 deletion app/animator.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<link rel="stylesheet" href="css/animator.css">
</head>

<body onload="startup()">
<body>
<!--Notification Bar-->
<section id="notification-container">
<div class="notification hidden">
Expand Down
3 changes: 0 additions & 3 deletions app/js/about.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/*jslint browser: true, node: true, debug: true*/
/* global Buffer, process */

// Launcher window
var launcherVersion = document.querySelector("#app-version"),
win = nw.Window.get();
Expand Down
3 changes: 0 additions & 3 deletions app/js/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/*jslint browser: true, node: true, debug: true*/
/* global nw */

(function() {
"use strict";
let win = nw.Window.get(),
Expand Down
6 changes: 2 additions & 4 deletions app/js/main.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/*jslint browser: true, node: true, debug: true*/
/* global Buffer, process, utils */

// The width and height of the captured photo. We will set the
// width to the value defined here, but the height will be
// calculated based on the aspect ratio of the input stream.
Expand Down Expand Up @@ -63,7 +60,6 @@ var width = 640,
frameExportDirectory = _getSaveDirectory(),
exportedFramesList = [],
curDirDisplay = document.querySelector("#currentDirectoryName"),
changeDirectoryButton = document.querySelector("#changeDirectoryButton"),

// Onion skin
isOnionSkinEnabled = false,
Expand Down Expand Up @@ -181,6 +177,7 @@ function startup() {
},
function(err) {
console.error("Could not find a camera to use!");
console.error(err);
notifyError("Could not find a camera to use!");
}
);
Expand Down Expand Up @@ -303,6 +300,7 @@ function startup() {
}
});
}
window.onload = startup;

/**
* Toggle between playback and capture windows.
Expand Down
3 changes: 1 addition & 2 deletions app/js/newsfeed.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* global nw */
module.exports = {};
module.exports = {};

(function() {
"use strict";
Expand Down
26 changes: 13 additions & 13 deletions app/js/utils.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
const utils = (function() {
"use strict";
"use strict";

const win = nw.Window.get();
const win = nw.Window.get();

/**
* Open a URL in the user's browser.
*
* @param {String} url - The URL to open.
*/
function openURL(url) {
nw.Shell.openExternal(url);
}
/**
* Open a URL in the user's browser.
*
* @param {String} url - The URL to open.
*/
function openURL(url) {
nw.Shell.openExternal(url);
}

return {
openURL: openURL
};
return {
openURL: openURL
};
}());

0 comments on commit e3176ef

Please sign in to comment.