Skip to content

Commit

Permalink
chore: add ts-eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Apr 16, 2024
1 parent cdae42f commit 350da53
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
16 changes: 16 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,22 @@
"rules": {
"no-console": "off"
}
},
{
"files": ["**/*.ts"],
"extends": ["plugin:@typescript-eslint/recommended"],
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"rules": {
"node/no-unsupported-features/es-syntax": "off"
}
},
{
"files": ["**/*.d.ts"],
"rules": {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": "off"
}
}
]
}
6 changes: 3 additions & 3 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export class Registry<RegistryContentType = PrometheusContentType> {
* @param labels of name/value pairs:
* { defaultLabel: "value", anotherLabel: "value 2" }
*/
setDefaultLabels(labels: Object): void;
setDefaultLabels(labels: object): void;

/**
* Get a string representation of a single metric by name
Expand Down Expand Up @@ -197,7 +197,7 @@ interface MetricObject {
help: string;
type: MetricType;
aggregator: Aggregator;
collect: CollectFunction<any>;
collect: CollectFunction<unknown>;
}

interface MetricObjectWithValues<T extends MetricValue<string>>
Expand Down Expand Up @@ -770,7 +770,7 @@ export interface DefaultMetricsCollectorConfiguration<
prefix?: string;
gcDurationBuckets?: number[];
eventLoopMonitoringPrecision?: number;
labels?: Object;
labels?: object;
}

export const collectDefaultMetrics: {
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
"homepage": "https://github.com/siimon/prom-client",
"devDependencies": {
"@clevernature/benchmark-regression": "^1.0.0",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"eslint": "^8.32.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-node": "^11.0.0",
Expand Down

0 comments on commit 350da53

Please sign in to comment.