mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2025-11-23 19:17:44 -05:00
Fix a whole bunch of eslint errors
These apparently were silent until 92c532d mass-upgraded deps.
Apparently eslint returned status 0 despite errors before and now
returns 1.
Most of these were handled by its "--fix" option; I manually took care
of the remaining two:
/Users/slamb/git/moonfire-nvr/ui-src/lib/views/RecordingsView.js
140:1 error This line has a length of 82. Maximum allowed is 80 max-len
/Users/slamb/git/moonfire-nvr/ui-src/lib/views/StreamSelectorView.js
72:1 error This line has a length of 82. Maximum allowed is 80 max-len
This commit is contained in:
@@ -45,13 +45,13 @@ import moment from 'moment-timezone';
|
||||
* @type {RegExp}
|
||||
*/
|
||||
const timeRe = new RegExp(
|
||||
[
|
||||
'^', // Start
|
||||
'([0-9]{1,2}:[0-9]{2})', // Capture HH:MM
|
||||
'(?:(:[0-9]{2})(?::([0-9]{5}))?)?', // Capture [:ss][:FFFFF]
|
||||
'([+-][0-9]{1,2}:?(?:[0-9]{2})?)?', // Capture [+-][zone]
|
||||
'$', // End
|
||||
].join('')
|
||||
[
|
||||
'^', // Start
|
||||
'([0-9]{1,2}:[0-9]{2})', // Capture HH:MM
|
||||
'(?:(:[0-9]{2})(?::([0-9]{5}))?)?', // Capture [:ss][:FFFFF]
|
||||
'([+-][0-9]{1,2}:?(?:[0-9]{2})?)?', // Capture [+-][zone]
|
||||
'$', // End
|
||||
].join('')
|
||||
);
|
||||
|
||||
/**
|
||||
|
||||
@@ -106,7 +106,7 @@ export default class TimeFormatter {
|
||||
let format = this._formatStr;
|
||||
const ms = ts90k / 90.0;
|
||||
const fracFmt = 'FFFFF';
|
||||
let fracLoc = format.indexOf(fracFmt);
|
||||
const fracLoc = format.indexOf(fracFmt);
|
||||
if (fracLoc != -1) {
|
||||
const frac = ts90k % 90000;
|
||||
format =
|
||||
|
||||
@@ -70,7 +70,7 @@ export default class TimeStamp90kFormatter {
|
||||
formatSameDayShortened(ts1, ts2) {
|
||||
let ts1Formatted = this.formatTimeStamp90k(ts1);
|
||||
let ts2Formatted = this.formatTimeStamp90k(ts2);
|
||||
let timePos = this._formatter.formatStr.indexOf('T');
|
||||
const timePos = this._formatter.formatStr.indexOf('T');
|
||||
if (timePos != -1) {
|
||||
const datePortion = ts1Formatted.substr(0, timePos);
|
||||
ts1Formatted = datePortion + ' ' + ts1Formatted.substr(timePos + 1);
|
||||
|
||||
Reference in New Issue
Block a user