1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

chore: enable no-undef-init lint rule

This commit is contained in:
Cosmin Cioaclă 2023-10-05 20:00:38 +02:00
parent 9f090da01f
commit 73083424cf
3 changed files with 3 additions and 2 deletions

View file

@ -63,6 +63,7 @@ module.exports = {
'@typescript-eslint/no-shadow': ['error'],
'no-throw-literal': ['error'],
'no-trailing-spaces': ['error'],
'no-undef-init': ['error'],
'no-unused-expressions': ['off'],
'@typescript-eslint/no-unused-expressions': ['error', { 'allowShortCircuit': true, 'allowTernary': true, 'allowTaggedTemplates': true }],
'no-unused-private-class-members': ['error'],

View file

@ -5,7 +5,7 @@ import React from 'react';
import globalize from 'scripts/globalize';
const LogLevelChip = ({ level }: { level: LogLevel }) => {
let color: 'info' | 'warning' | 'error' | undefined = undefined;
let color: 'info' | 'warning' | 'error' | undefined;
switch (level) {
case LogLevel.Information:
color = 'info';

View file

@ -74,7 +74,7 @@ export function fillImage(entry) {
throw new Error('entry cannot be null');
}
const target = entry.target;
let source = undefined;
let source;
if (target) {
source = target.getAttribute('data-src');