Skip to content

Commit

Permalink
fix: Adjust for latest linting rules (#202)
Browse files Browse the repository at this point in the history
* deps: skuba 7.1.1

* Run `skuba format`

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ryan Ling <ryan@outlook.com.au>
  • Loading branch information
renovate[bot] and 72636c authored Aug 28, 2023
1 parent 97847d7 commit 760c9bd
Show file tree
Hide file tree
Showing 6 changed files with 254 additions and 206 deletions.
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

0 comments on commit 760c9bd

Please sign in to comment.