Skip to content

Commit

Permalink
Set console assert as allowable console messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
itsjamie committed May 24, 2020
1 parent 93decb9 commit 8600ec3
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 8 deletions.
7 changes: 6 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,12 @@ module.exports = {
'no-empty': 1,
'no-mixed-operators': 1,
'no-unused-vars': 2,
'no-console': 1,
'no-console': [
1,
{
"allow": ["assert"]
}
],
'no-fallthrough': 1,
'no-case-declarations': 2,
'no-irregular-whitespace': 1,
Expand Down
16 changes: 9 additions & 7 deletions src/controller/abr-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,18 @@
*/

import { Events } from '../events';
import { BufferHelper, Bufferable } from '../utils/buffer-helper';
import { BufferHelper } from '../utils/buffer-helper';
import { ErrorDetails } from '../errors';
import { logger } from '../utils/logger';
import EwmaBandWidthEstimator from '../utils/ewma-bandwidth-estimator';
import Fragment from '../loader/fragment';
import { LoaderStats } from '../types/loader';
import LevelDetails from '../loader/level-details';
import Hls from '../hls';
import { FragLoadingData, FragLoadedData, FragBufferedData, ErrorData, LevelLoadedData } from '../types/events';
import { ComponentAPI } from '../types/component-api';

import type { Bufferable } from '../utils/buffer-helper';
import type Fragment from '../loader/fragment';
import type { LoaderStats } from '../types/loader';
import type LevelDetails from '../loader/level-details';
import type Hls from '../hls';
import type { FragLoadingData, FragLoadedData, FragBufferedData, ErrorData, LevelLoadedData } from '../types/events';
import type { ComponentAPI } from '../types/component-api';

const { performance } = self;

Expand Down
1 change: 1 addition & 0 deletions src/utils/cea-608-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ const logger: {
log: function (severity, msg) {
const minLevel = this.verboseFilter[severity];
if (this.verboseLevel >= minLevel) {
// eslint-disable-next-line no-console
console.log(this.time + ' [' + severity + '] ' + msg);
}
}
Expand Down
1 change: 1 addition & 0 deletions src/utils/mp4-tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ export function parseSegmentIndex (initSegment) {
const referenceType = (referenceInfo & 0x80000000) >>> 31;

if (referenceType === 1) {
// eslint-disable-next-line no-console
console.warn('SIDX has hierarchical references (not supported)');
return;
}
Expand Down

0 comments on commit 8600ec3

Please sign in to comment.