Skip to content

Commit a0e1603

Browse files
Tomer RosenthalTomer Rosenthal
authored andcommitted
chore: update dependencies and ESLint configuration
- Updated ESLint and Prettier dependencies in package.json for improved linting and formatting. - Removed specific file extensions from ESLint linting command to simplify usage. - Added new ESLint configuration file (eslint.config.mjs) with custom rules and settings. - Refactored TypeScript imports to use ES module syntax and removed unnecessary require statements. - Enhanced error handling and logging in TaskHubGrpcClient methods. - Cleaned up code by removing commented-out sections and unused variables. - Deleted deprecated TaskHubGrpcWorker class to streamline the codebase. - Updated TypeScript configuration to include baseUrl for module resolution.
1 parent a7676fe commit a0e1603

19 files changed

Lines changed: 7455 additions & 8103 deletions

File tree

.eslintignore

Lines changed: 0 additions & 11 deletions
This file was deleted.

.eslintrc.json

Lines changed: 0 additions & 28 deletions
This file was deleted.

eslint.config.mjs

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
import eslint from "@eslint/js";
5+
import tseslint from "typescript-eslint";
6+
import globals from "globals";
7+
8+
export default tseslint.config(
9+
eslint.configs.recommended,
10+
...tseslint.configs.recommended,
11+
{
12+
languageOptions: {
13+
ecmaVersion: 2020,
14+
sourceType: "module",
15+
globals: {
16+
...globals.browser,
17+
...globals.node,
18+
...globals.amd,
19+
},
20+
},
21+
rules: {
22+
"@typescript-eslint/ban-ts-comment": "off",
23+
"@typescript-eslint/no-explicit-any": "off",
24+
"@typescript-eslint/no-inferrable-types": "off",
25+
"@typescript-eslint/no-empty-function": "off",
26+
"@typescript-eslint/no-require-imports": "off",
27+
"no-constant-condition": "off",
28+
"@typescript-eslint/no-unused-vars": [
29+
"error",
30+
{
31+
varsIgnorePattern: "^_",
32+
argsIgnorePattern: "^_",
33+
},
34+
],
35+
},
36+
},
37+
{
38+
ignores: [
39+
"**/dist/**",
40+
"**/node_modules/**",
41+
"**/src/version.ts",
42+
"**/jest.config.js",
43+
"**/src/proto/**",
44+
],
45+
}
46+
);

examples/hello-world/activity-sequence.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
33

4-
import { TaskHubGrpcClient } from "../src/client/client";
5-
import { ActivityContext } from "../src/task/context/activity-context";
6-
import { OrchestrationContext } from "../src/task/context/orchestration-context";
7-
import { TOrchestrator } from "../src/types/orchestrator.type";
8-
import { TaskHubGrpcWorker } from "../src/worker/task-hub-grpc-worker";
4+
import {
5+
TaskHubGrpcClient,
6+
TaskHubGrpcWorker,
7+
ActivityContext,
8+
OrchestrationContext,
9+
TOrchestrator,
10+
} from "@microsoft/durabletask-js";
911

1012
// Wrap the entire code in an immediately-invoked async function
1113
(async () => {

examples/hello-world/fanout-fanin.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
33

4-
import { TaskHubGrpcClient } from "../src/client/client";
5-
import { whenAll } from "../src/task";
6-
import { ActivityContext } from "../src/task/context/activity-context";
7-
import { OrchestrationContext } from "../src/task/context/orchestration-context";
8-
import { Task } from "../src/task/task";
9-
import { TOrchestrator } from "../src/types/orchestrator.type";
10-
import { TaskHubGrpcWorker } from "../src/worker/task-hub-grpc-worker";
4+
import {
5+
TaskHubGrpcClient,
6+
TaskHubGrpcWorker,
7+
ActivityContext,
8+
OrchestrationContext,
9+
Task,
10+
TOrchestrator,
11+
whenAll,
12+
} from "@microsoft/durabletask-js";
1113

1214
// Wrap the entire code in an immediately-invoked async function
1315
(async () => {

examples/hello-world/human_interaction.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
33

4-
import { TaskHubGrpcClient } from "../src/client/client";
5-
import { whenAny } from "../src/task";
6-
import { ActivityContext } from "../src/task/context/activity-context";
7-
import { OrchestrationContext } from "../src/task/context/orchestration-context";
8-
import { Task } from "../src/task/task";
9-
import { TOrchestrator } from "../src/types/orchestrator.type";
10-
import { TaskHubGrpcWorker } from "../src/worker/task-hub-grpc-worker";
4+
import {
5+
TaskHubGrpcClient,
6+
TaskHubGrpcWorker,
7+
ActivityContext,
8+
OrchestrationContext,
9+
Task,
10+
TOrchestrator,
11+
whenAny,
12+
} from "@microsoft/durabletask-js";
1113
import * as readlineSync from "readline-sync";
1214

1315
// Wrap the entire code in an immediately-invoked async function

0 commit comments

Comments
 (0)