Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Adjust for latest linting rules #202

Merged
merged 2 commits into from
Aug 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
/.gantry/**/*.yml
gantry*.yaml
gantry*.yml
pnpm-lock.yaml
# end managed by skuba
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"@types/supertest": "2.0.12",
"hot-shots": "10.0.0",
"koa": "2.14.2",
"skuba": "7.0.1",
"skuba": "7.1.1",
"supertest": "6.3.3"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/metricsMiddleware/statsD.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
type Tags = { [key: string]: string } | string[];
type Tags = Record<string, string> | string[];

/**
* Vendored from `hot-shots.StatsD` so that TypeScript consumers are not forced
Expand Down
4 changes: 1 addition & 3 deletions src/requestLogging/requestLogging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ export type Fields = Record<string, unknown>;
* used to omit uninteresting headers from the request log by replacing them
* with `undefined`.
*/
interface HeaderReplacements {
[lowercaseName: string]: string | undefined;
}
type HeaderReplacements = Record<string, string | undefined>;

// The Koala emoji should hopefully be a hint that:
// 1. This isn't an actual value of a header
Expand Down
4 changes: 2 additions & 2 deletions src/tracingHeaders/tracingHeaders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,12 @@ export const tracingFromContext = (ctx: Koa.Context): SEEKTracing => {
export const outgoingHeaders = (
appID: AppIdentifier,
tracing: SEEKTracing,
): { [header: string]: string } => {
): Record<string, string> => {
const userAgent = appID.version
? `${appID.name}/${appID.version}`
: `${appID.name}`;

const headers: { [header: string]: string } = {
const headers: Record<string, string> = {
'user-agent': userAgent,
[REQUEST_ID_HEADER]: tracing.requestID,
};
Expand Down
Loading