Skip to content

Commit

Permalink
chore: add eslint unused import
Browse files Browse the repository at this point in the history
  • Loading branch information
BrunnerLivio committed Nov 27, 2023
1 parent 198080e commit 98e09ca
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 7 deletions.
11 changes: 8 additions & 3 deletions lib/health-indicator/microservice/grpc.health.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,14 @@ export class GRPCHealthIndicator extends HealthIndicator {
private createClient<GrpcOptions extends GrpcClientOptionsLike>(
options: CheckGRPCServiceOptions<GrpcOptions>,
): NestJSMicroservices.ClientGrpc {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { timeout, healthServiceName, healthServiceCheck, ...grpcOptions } =
options;
const {
// Remove the options which are not needed for the client
timeout: _t,
healthServiceName: _hS,
healthServiceCheck: _hSC,

...grpcOptions
} = options;
return this.nestJsMicroservices.ClientProxyFactory.create({
transport: 4,
options: grpcOptions as any,
Expand Down
46 changes: 46 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 11 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
"eslint-plugin-deprecation": "^2.0.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jest": "^27.2.3",
"eslint-plugin-unused-imports": "^3.0.0",
"fastify": "4.23.2",
"gulp": "4.0.2",
"gulp-clean": "0.4.0",
Expand Down Expand Up @@ -257,7 +258,8 @@
"sourceType": "module"
},
"plugins": [
"@typescript-eslint/eslint-plugin"
"@typescript-eslint/eslint-plugin",
"unused-imports"
],
"extends": [
"plugin:deprecation/recommended",
Expand Down Expand Up @@ -313,10 +315,15 @@
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/prefer-optional-chain": 1,
"@typescript-eslint/no-unused-vars": [
1,
"@typescript-eslint/no-unused-vars": "off",
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": [
"warn",
{
"varsIgnorePattern": "^_"
"vars": "all",
"varsIgnorePattern": "^_",
"args": "after-used",
"argsIgnorePattern": "^_"
}
],
"@typescript-eslint/consistent-type-imports": [
Expand Down

0 comments on commit 98e09ca

Please sign in to comment.