Skip to content

Commit b82f169

Browse files
committed
style: Run biome fixes
1 parent 27d2844 commit b82f169

File tree

7 files changed

+14
-16
lines changed

7 files changed

+14
-16
lines changed

biome.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/2.0.4/schema.json",
2+
"$schema": "https://biomejs.dev/schemas/2.2.4/schema.json",
33
"vcs": {
44
"enabled": true,
55
"clientKind": "git",
66
"useIgnoreFile": true
77
},
88
"files": {
99
"ignoreUnknown": false,
10-
"includes": ["!__fixtures__", "!package.json", "!package-lock.json"]
10+
"includes": ["**", "!__fixtures__", "!package.json", "!package-lock.json"]
1111
},
1212
"formatter": {
1313
"enabled": true,

src/__tests__/utils.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import http from "node:http";
2-
import express from "express";
3-
42
import { format } from "node:url";
53
import type { ApolloServer } from "@apollo/server";
64
import { expressMiddleware } from "@apollo/server/express4";
75
import type { AxiosResponse } from "axios";
6+
import express from "express";
87
import createServer from "../index.js";
98

109
export function testGraphqlApi(
@@ -49,7 +48,7 @@ export const listen = async (server: ApolloServer) => {
4948

5049
await server.start();
5150

52-
// @ts-ignore
51+
// @ts-expect-error
5352
app.use(express.json({ limit: "50mb" }), expressMiddleware(server));
5453

5554
return await new Promise<{ url: string; close: () => void }>(

src/errors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export class UpstreamHttpError extends BaseError {
5959
this.status = status;
6060
try {
6161
this.statusText = getReasonPhrase(status);
62-
} catch (error) {
62+
} catch (_error) {
6363
this.statusText = `Unknown error (${status})`;
6464
}
6565
}

src/handlers/findFeed.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
import * as cheerio from "cheerio";
21
import type { CheerioAPI } from "cheerio";
2+
import * as cheerio from "cheerio";
33
import type { Element, Node } from "domhandler";
4-
import normalizeUrl from "normalize-url";
5-
64
import isUrl from "is-url";
5+
import normalizeUrl from "normalize-url";
76
import { InvalidUrlError } from "../errors.js";
87
import { logger } from "../logger.js";
98
import request from "../request.js";

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { ApolloServer } from "@apollo/server";
22

33
import { createErrorFormatter, sentryIgnoreErrors } from "./errors.js";
4-
import { type LoggingOptions, createLogger } from "./logger.js";
4+
import { createLogger, type LoggingOptions } from "./logger.js";
55
import { schema } from "./schema.js";
66

77
export type Options = {
@@ -26,7 +26,7 @@ export default async function createServer(
2626
environment: process.env.NODE_ENV,
2727
ignoreErrors: sentryIgnoreErrors,
2828
onFatalError(error: Error) {
29-
// @ts-ignore error does not have response
29+
// @ts-expect-error error does not have response
3030
logger.error(error, error.response);
3131
},
3232
debug: process.env.DEBUG_SENTRY === "true",

src/parsers/feedme.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,17 @@ function unpack(
5151
required?: boolean,
5252
key?: string,
5353
): string | undefined {
54-
let output = undefined;
54+
let output;
5555
if (input && Array.isArray(input)) {
5656
// eslint-disable-next-line @typescript-eslint/no-use-before-define
5757
output = unpackArray(input, attribute)[0];
5858
}
5959
if (typeof input === "string") {
6060
output = input;
6161
}
62-
// @ts-ignore ---
62+
// @ts-expect-error ---
6363
if (typeof input === "object" && typeof input[attribute] === "string") {
64-
// @ts-ignore ---
64+
// @ts-expect-error ---
6565
output = input[attribute] as string | undefined;
6666
}
6767

@@ -96,7 +96,7 @@ export function parse(feed: string): Promise<ParserResponse> {
9696
throw new Error("Failed to parse");
9797
}
9898

99-
// @ts-ignore ---
99+
// @ts-expect-error ---
100100
const parser = new FeedMe(true);
101101

102102
parser.on("end", () => {

src/parsers/rss-parser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function getPubDate(entry: Parser.Item): string | undefined {
2020
return entry.pubDate
2121
? new Date(entry.pubDate?.replace(/CES?T/, "(CET)")).toISOString()
2222
: entry.pubDate;
23-
} catch (error) {
23+
} catch (_error) {
2424
return entry.pubDate;
2525
}
2626
}

0 commit comments

Comments
 (0)