Skip to content

Commit 480eb2d

Browse files
torosentTomer RosenthalYunchuWang
authored
Update dependencies, ESLint configuration, and add pull request template (#81)
* 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. * feat: add pull request template for consistent contributions * remove submodule * chore: remove unused globals.amd from ESLint configuration --------- Co-authored-by: Tomer Rosenthal <Tomer.Rosenthal@microsoft.com> Co-authored-by: peterstone2017 <12449837+YunchuWang@users.noreply.github.com>
1 parent a7676fe commit 480eb2d

File tree

19 files changed

+7518
-8103
lines changed

19 files changed

+7518
-8103
lines changed

.eslintignore

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

.eslintrc.json

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

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Summary
2+
3+
## What changed?
4+
-
5+
6+
## Why is this change needed?
7+
-
8+
9+
## Issues / work items
10+
- Resolves #
11+
- Related #
12+
13+
---
14+
15+
# Project checklist
16+
- [ ] Release notes are not required for the next release
17+
- [ ] Otherwise: Notes added to `CHANGELOG.md`
18+
- [ ] Backport is not required
19+
- [ ] Otherwise: Backport tracked by issue/PR #issue_or_pr
20+
- [ ] All required tests have been added/updated (unit tests, E2E tests)
21+
- [ ] Breaking change?
22+
- [ ] If yes:
23+
- Impact:
24+
- Migration guidance:
25+
26+
---
27+
28+
# AI-assisted code disclosure (required)
29+
30+
## Was an AI tool used? (select one)
31+
- [ ] No
32+
- [ ] Yes, AI helped write parts of this PR (e.g., GitHub Copilot)
33+
- [ ] Yes, an AI agent generated most of this PR
34+
35+
If AI was used:
36+
- Tool(s):
37+
- AI-assisted areas/files:
38+
- What you changed after AI output:
39+
40+
AI verification (required if AI was used):
41+
- [ ] I understand the code and can explain it
42+
- [ ] I verified referenced APIs/types exist and are correct
43+
- [ ] I reviewed edge cases/failure paths (timeouts, retries, cancellation, exceptions)
44+
- [ ] I reviewed concurrency/async behavior
45+
- [ ] I checked for unintended breaking or behavior changes
46+
47+
---
48+
49+
# Testing
50+
51+
## Automated tests
52+
- Result: Passed / Failed (link logs if failed)
53+
54+
## Manual validation (only if runtime/behavior changed)
55+
- Environment (OS, Node.js version, components):
56+
- Steps + observed results:
57+
1.
58+
2.
59+
3.
60+
- Evidence (optional):
61+
62+
---
63+
64+
# Notes for reviewers
65+
- N/A

eslint.config.mjs

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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+
},
19+
},
20+
rules: {
21+
"@typescript-eslint/ban-ts-comment": "off",
22+
"@typescript-eslint/no-explicit-any": "off",
23+
"@typescript-eslint/no-inferrable-types": "off",
24+
"@typescript-eslint/no-empty-function": "off",
25+
"@typescript-eslint/no-require-imports": "off",
26+
"no-constant-condition": "off",
27+
"@typescript-eslint/no-unused-vars": [
28+
"error",
29+
{
30+
varsIgnorePattern: "^_",
31+
argsIgnorePattern: "^_",
32+
},
33+
],
34+
},
35+
},
36+
{
37+
ignores: [
38+
"**/dist/**",
39+
"**/node_modules/**",
40+
"**/src/version.ts",
41+
"**/jest.config.js",
42+
"**/src/proto/**",
43+
],
44+
}
45+
);

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)