refactor: update a few dev deps and convert to using type imports where possible (#2886)

* build: bump deps and add some new eslint rules

* refactor: run eslint --fix on code to convert to type imports where possible
This commit is contained in:
Ryan Cohen
2022-08-03 12:57:51 +09:00
committed by GitHub
parent 25eb765f9b
commit f5864b49de
245 changed files with 1034 additions and 620 deletions

View File

@@ -1,6 +1,7 @@
import axios, { AxiosInstance, AxiosRequestConfig } from 'axios';
import type { AxiosInstance, AxiosRequestConfig } from 'axios';
import axios from 'axios';
import rateLimit from 'axios-rate-limit';
import NodeCache from 'node-cache';
import type NodeCache from 'node-cache';
// 5 minute default TTL (in seconds)
const DEFAULT_TTL = 300;

View File

@@ -1,5 +1,6 @@
import NodePlexAPI from 'plex-api';
import { getSettings, Library, PlexSettings } from '../lib/settings';
import type { Library, PlexSettings } from '../lib/settings';
import { getSettings } from '../lib/settings';
import logger from '../logger';
export interface PlexLibraryItem {
@@ -130,7 +131,6 @@ class PlexAPI {
});
}
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
public async getStatus() {
return await this.plexClient.query('/');
}

View File

@@ -1,6 +1,7 @@
import axios, { AxiosInstance } from 'axios';
import type { AxiosInstance } from 'axios';
import axios from 'axios';
import xml2js from 'xml2js';
import { PlexDevice } from '../interfaces/api/plexInterfaces';
import type { PlexDevice } from '../interfaces/api/plexInterfaces';
import { getSettings } from '../lib/settings';
import logger from '../logger';

View File

@@ -1,5 +1,6 @@
import cacheManager, { AvailableCacheIds } from '../../lib/cache';
import { DVRSettings } from '../../lib/settings';
import type { AvailableCacheIds } from '../../lib/cache';
import cacheManager from '../../lib/cache';
import type { DVRSettings } from '../../lib/settings';
import ExternalAPI from '../externalapi';
export interface SystemStatus {

View File

@@ -1,7 +1,8 @@
import axios, { AxiosInstance } from 'axios';
import type { AxiosInstance } from 'axios';
import axios from 'axios';
import { uniqWith } from 'lodash';
import { User } from '../entity/User';
import { TautulliSettings } from '../lib/settings';
import type { User } from '../entity/User';
import type { TautulliSettings } from '../lib/settings';
import logger from '../logger';
export interface TautulliHistoryRecord {

View File

@@ -1,7 +1,7 @@
import { sortBy } from 'lodash';
import cacheManager from '../../lib/cache';
import ExternalAPI from '../externalapi';
import {
import type {
TmdbCollection,
TmdbExternalIdResponse,
TmdbGenre,