diff --git a/.travis.yml b/.travis.yml index 9e5ea13..f0705de 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,13 +31,13 @@ matrix: script: - yarn - yarn build - - node_modules/eslint/bin/eslint.js ui-src + - yarn lint - language: node_js node_js: "lts/*" script: - yarn - yarn build - - node_modules/eslint/bin/eslint.js ui-src + - yarn lint allow_failures: - rust: nightly cache: diff --git a/package.json b/package.json index 0ae1210..b1b5cd6 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,8 @@ }, "scripts": { "start": "webpack-dev-server --mode development --config webpack/dev.config.js --progress", - "build": "webpack --mode production --config webpack/prod.config.js" + "build": "webpack --mode production --config webpack/prod.config.js", + "lint": "eslint ui-src" }, "dependencies": { "jquery": "^3.2.1", diff --git a/ui-src/NVRApplication.js b/ui-src/NVRApplication.js index 14a40df..87622f1 100644 --- a/ui-src/NVRApplication.js +++ b/ui-src/NVRApplication.js @@ -382,7 +382,7 @@ export default class NVRApplication { * Start the application. */ start() { - let nav = $('#nav'); + const nav = $('#nav'); $('#toggle-nav').click(() => { nav.toggle('slide'); diff --git a/ui-src/lib/views/RecordingsView.js b/ui-src/lib/views/RecordingsView.js index f42113b..1c87424 100644 --- a/ui-src/lib/views/RecordingsView.js +++ b/ui-src/lib/views/RecordingsView.js @@ -112,7 +112,8 @@ export default class RecordingsView { $('').append( $( _columnOrder - .map((name) => `${_columnLabels[name]}`) + .map((name) => + `${_columnLabels[name]}`) .join('') ) ), diff --git a/ui-src/lib/views/VideoDialogView.js b/ui-src/lib/views/VideoDialogView.js index f695db8..ed54811 100644 --- a/ui-src/lib/views/VideoDialogView.js +++ b/ui-src/lib/views/VideoDialogView.js @@ -103,10 +103,10 @@ export default class VideoDialogView { if (narrowWindow) { console.log('Narrow window; starting video in full-screen mode.'); videoDomElement.requestFullscreen(); - videoDomElement.addEventListener('fullscreenchange', (event) => { + videoDomElement.addEventListener('fullscreenchange', () => { if (document.fullscreenElement !== videoDomElement) { console.log('Closing video because user exited full-screen mode.'); - this.dialogElement_.dialog("close"); + this.dialogElement_.dialog('close'); } }); }