mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-13 12:36:15 -08:00
chore(test): clean lint and warning baseline
This commit is contained in:
1 parent
3d4d2ca9bf
commit
a1b0d9186c
9 files changed
+154
-60
No files matched your search
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "shared-testing",
|
||||
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "libs/shared/testing/src",
|
||||
"projectType": "library",
|
||||
"tags": ["scope:shared", "domain:shared-runtime", "type:util"],
|
||||
"targets": {
|
||||
"lint": {
|
||||
"executor": "@nx/eslint:lint"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export { installDuplicateVideoJsQualityLevelsWarnFilter } from './lib/console-warn-filters';
|
||||
@@ -0,0 +1,19 @@
|
||||
export function installDuplicateVideoJsQualityLevelsWarnFilter(): void {
|
||||
const originalConsoleWarn = console.warn.bind(console);
|
||||
|
||||
console.warn = (...args: unknown[]) => {
|
||||
const message = args
|
||||
.filter((arg): arg is string => typeof arg === 'string')
|
||||
.join(' ');
|
||||
|
||||
if (isDuplicateVideoJsQualityLevelsWarning(message)) {
|
||||
return;
|
||||
}
|
||||
|
||||
originalConsoleWarn(...args);
|
||||
};
|
||||
}
|
||||
|
||||
function isDuplicateVideoJsQualityLevelsWarning(message: string): boolean {
|
||||
return message.includes('A plugin named "qualityLevels" already exists.');
|
||||
}
|
||||
Reference in new issue
Block a user