Skip to content

Commit 852af53

Browse files
* Fix tsconfig.json including .eslintrc.js
* Use Summaries instead of Histograms
1 parent 657e6b2 commit 852af53

File tree

5 files changed

+8
-9
lines changed

5 files changed

+8
-9
lines changed

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# ESLint
2+
/.eslintrc.js

.eslintrc.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
module.exports = {
2-
env: {
3-
node: true,
4-
},
52
extends: [
63
"eslint:recommended",
74
"plugin:@typescript-eslint/strict-type-checked",
@@ -11,9 +8,9 @@ module.exports = {
118
"plugin:unicorn/recommended",
129
],
1310
ignorePatterns: ["/build/*"],
14-
parser: "@typescript-eslint/parser",
1511
parserOptions: {
1612
ecmaVersion: "latest",
13+
parser: "@typescript-eslint/parser",
1714
project: true,
1815
tsConfigRootDir: __dirname,
1916
},

src/shared/discord.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ import type {
1212

1313
import { Client, Events, Routes, User } from "discord.js";
1414
import assert from "node:assert";
15-
import { Gauge, Histogram } from "prom-client";
15+
import { Gauge, Summary } from "prom-client";
1616

1717
import loggerFactory from "../logger.factory";
1818

1919
// region Logger and Metrics
2020
const logger = loggerFactory(module);
2121

22-
const interactionRequestDuration = new Histogram({
22+
const interactionRequestDuration = new Summary({
2323
help: "Interaction request duration in milliseconds",
2424
labelNames: ["status", "handler"],
2525
name: "interaction_request_duration_milliseconds",

src/shared/postgresql.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { PoolClient } from "pg";
22

33
import { Pool } from "pg";
4-
import { Histogram } from "prom-client";
4+
import { Summary } from "prom-client";
55

66
import type { Caller } from "./caller";
77

@@ -15,7 +15,7 @@ type Callback<T> = (client: PoolClient) => Promise<T>;
1515
// region Logger and Metrics
1616
const logger = loggerFactory(module);
1717

18-
const databaseRequestDuration = new Histogram({
18+
const databaseRequestDuration = new Summary({
1919
help: "Database request duration in milliseconds",
2020
labelNames: ["caller", "status", "connected"],
2121
name: "database_request_duration_milliseconds",

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@
1717
"strict": true,
1818
"target": "es2021"
1919
},
20-
"include": [".eslintrc.js", "src"]
20+
"include": ["src"]
2121
}

0 commit comments

Comments
 (0)