Skip to content

Commit 26e1044

Browse files
committed
Fix linting complete
Signed-off-by: Shubham Sharma <[email protected]>
1 parent 3c42ba6 commit 26e1044

File tree

15 files changed

+22
-26
lines changed

15 files changed

+22
-26
lines changed

examples/http/actor/src/index.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { DaprServer, DaprClient, HttpMethod } from "dapr-client";
1+
import { DaprServer, DaprClient } from "dapr-client";
22
import DemoActorCounterImpl from "./actor/DemoActorCounterImpl";
33
import DemoActorReminderImpl from "./actor/DemoActorReminderImpl";
44
import DemoActorSayImpl from "./actor/DemoActorSayImpl";
@@ -8,7 +8,6 @@ const daprHost = "127.0.0.1";
88
const daprPort = "50000"; // Dapr Sidecar Port of this Example Server
99
const serverHost = "127.0.0.1"; // App Host of this Example Server
1010
const serverPort = "50001"; // App Port of this Example Server
11-
const daprAppId = "example-hello-world";
1211

1312
async function start() {
1413
const server = new DaprServer(serverHost, serverPort, daprHost, daprPort);
@@ -33,7 +32,6 @@ async function start() {
3332
console.log("EXECUTING CLIENT - ACTORS");
3433
console.log("Note: we create new client for now since Actors are not supported internally!")
3534
console.log("===============================================================");
36-
const actorId = "MyActorId1";
3735

3836
const resRegisteredActors = await server.actor.getRegisteredActors();
3937
console.log(`Registered Actor Types: ${JSON.stringify(resRegisteredActors)}`);

examples/http/pubsub/src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ const daprHost = "127.0.0.1";
44
const daprPort = "50000"; // Dapr Sidecar Port of this Example Server
55
const serverHost = "127.0.0.1"; // App Host of this Example Server
66
const serverPort = "50001"; // App Port of this Example Server
7-
const daprAppId = "example-http-pubsub";
87

98
async function start() {
109
// Create a Server (will subscribe) and Client (will publish)

examples/invocation/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { DaprServer, DaprClient, HttpMethod, CommunicationProtocolEnum } from "dapr-client";
1+
import { DaprServer, DaprClient, HttpMethod } from "dapr-client";
22

33
// Common settings
44
const daprAppId = "example-invocation";

examples/pubsub/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { DaprServer, DaprClient, CommunicationProtocolEnum } from "dapr-client";
1+
import { DaprServer, DaprClient } from "dapr-client";
22

33
// Common settings
44
const serverHost = "127.0.0.1"; // App Host of this Example Server

src/actors/client/ActorClient/ActorClientGRPC.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export default class ActorClientGRPC implements IClientActor {
6969

7070
return new Promise((resolve, reject) => {
7171
const client = this.client.getClient();
72-
client.executeActorStateTransaction(msgService, (err, res) => {
72+
client.executeActorStateTransaction(msgService, (err, _res) => {
7373
if (err) {
7474
return reject(err);
7575
}
@@ -126,7 +126,7 @@ export default class ActorClientGRPC implements IClientActor {
126126

127127
return new Promise((resolve, reject) => {
128128
const client = this.client.getClient();
129-
client.registerActorReminder(msgService, (err, res) => {
129+
client.registerActorReminder(msgService, (err, _res) => {
130130
if (err) {
131131
return reject(err);
132132
}
@@ -145,7 +145,7 @@ export default class ActorClientGRPC implements IClientActor {
145145

146146
return new Promise((resolve, reject) => {
147147
const client = this.client.getClient();
148-
client.unregisterActorReminder(msgService, (err, res) => {
148+
client.unregisterActorReminder(msgService, (err, _res) => {
149149
if (err) {
150150
return reject(err);
151151
}
@@ -180,7 +180,7 @@ export default class ActorClientGRPC implements IClientActor {
180180

181181
return new Promise((resolve, reject) => {
182182
const client = this.client.getClient();
183-
client.registerActorTimer(msgService, (err, res) => {
183+
client.registerActorTimer(msgService, (err, _res) => {
184184
if (err) {
185185
return reject(err);
186186
}
@@ -199,7 +199,7 @@ export default class ActorClientGRPC implements IClientActor {
199199

200200
return new Promise((resolve, reject) => {
201201
const client = this.client.getClient();
202-
client.unregisterActorTimer(msgService, (err, res) => {
202+
client.unregisterActorTimer(msgService, (err, _res) => {
203203
if (err) {
204204
return reject(err);
205205
}

src/actors/client/ActorProxyBuilder.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default class ActorProxyBuilder<T> {
2727
const actorClient = this.actorClient;
2828

2929
const handler = {
30-
get(target: any, propKey: any, receiver: any) {
30+
get(_target: any, propKey: any, _receiver: any) {
3131
return async function (...args: any) {
3232
const body = args.length > 0 ? args : null;
3333
const res = await actorClient.actor.invoke(actorTypeClassName, actorId, propKey, body);

src/actors/runtime/AbstractActor.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export default abstract class AbstractActor {
7171
* @param <Type> Type of the state object
7272
* @return Async void response
7373
*/
74-
async registerActorReminder<Type>(reminderName: string, dueTime: Temporal.Duration, period: Temporal.Duration, state?: any) {
74+
async registerActorReminder<_Type>(reminderName: string, dueTime: Temporal.Duration, period: Temporal.Duration, state?: any) {
7575
await this.actorClient.actor.registerActorReminder(this.actorType, this.id, reminderName, {
7676
period,
7777
dueTime,
@@ -184,7 +184,7 @@ export default abstract class AbstractActor {
184184
return;
185185
}
186186

187-
async receiveReminder(data: string): Promise<void> {
187+
async receiveReminder(_data: string): Promise<void> {
188188
console.warn(JSON.stringify({
189189
error: "ACTOR_METHOD_NOT_IMPLEMENTED",
190190
errorMsg: `A reminder was created for the actor with id: ${this.id} but the method 'receiveReminder' was not implemented`,

src/implementation/Client/GRPCClient/binding.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default class GRPCClientBinding implements IClientBinding {
1313
// Send an event to an external system
1414
// @todo: should pass the metadata object
1515
// @todo: should return a specific typed Promise<TypeBindingResponse> instead of Promise<object>
16-
async send(bindingName: string, operation: string, data: any, metadata: object = {}): Promise<object> {
16+
async send(bindingName: string, operation: string, data: any, _metadata: object = {}): Promise<object> {
1717
const msgService = new InvokeBindingRequest();
1818
msgService.setName(bindingName);
1919
msgService.setOperation(operation);

src/implementation/Client/GRPCClient/health.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ export default class GRPCClientHealth implements IClientHealth {
1313

1414
// There is no gRPC implementation of /healthz, so we try to fetch the metadata
1515
async isHealthy(): Promise<boolean> {
16-
return new Promise((resolve, reject) => {
16+
return new Promise((resolve, _reject) => {
1717
const client = this.client.getClient();
1818

1919
try {
20-
client.getMetadata(new Empty(), (err, res: GetMetadataResponse) => {
20+
client.getMetadata(new Empty(), (err, _res: GetMetadataResponse) => {
2121
if (err) {
2222
return resolve(false);
2323
}

src/implementation/Client/GRPCClient/invoker.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ export default class GRPCClientInvoker implements IClientInvoker {
6060

6161
// const res = await fetch(`${this.daprUrl}/invoke/${appId}/method/${methodName}`, fetchOptions);
6262
// return ResponseUtil.handleResponse(res);
63-
const resContentType = res.getContentType();
6463
const resData = Buffer.from((res.getData() as Any).getValue()).toString();
6564

6665
try {

0 commit comments

Comments
 (0)