From 06506f9f4b04be9df0f952cd9c5acb4383376b8d Mon Sep 17 00:00:00 2001 From: Alec Lomas Date: Wed, 21 Oct 2020 15:58:30 -0700 Subject: [PATCH] :rotating_light: fix linter warnings --- graphql/resolvers/books.ts | 4 ++-- graphql/resolvers/tweets.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/graphql/resolvers/books.ts b/graphql/resolvers/books.ts index 1effb4a..b908bd8 100644 --- a/graphql/resolvers/books.ts +++ b/graphql/resolvers/books.ts @@ -1,4 +1,4 @@ -import xml2js from 'xml2js' +import { parseString } from 'xml2js' import fetch from '../lib/fetchWithTimeout' // this insane bullshit is 100% goodreads fault. also what `xml2js` spits out. @@ -27,7 +27,7 @@ const getBooks = async (): Promise => { const books: Book[] = [] - xml2js.parseString(data, { normalizeTags: true }, (error, result) => { + parseString(data, { normalizeTags: true }, (error, result) => { if (error) { throw new Error(error.message) } diff --git a/graphql/resolvers/tweets.ts b/graphql/resolvers/tweets.ts index e073ed9..9db1799 100644 --- a/graphql/resolvers/tweets.ts +++ b/graphql/resolvers/tweets.ts @@ -10,7 +10,7 @@ interface Tweet { const thirtyDaysAgoTime = thirtyDaysAgo().getTime() const getTweets = async ( - tweets: Set = new Set(), + tweets: Set = new Set(), //eslint-disable-line default-param-last maxId?: number ): Promise => { let uri = -- 2.51.2