Skip to content

Commit 35bb3c3

Browse files
committed
Merge branch 'main' into eslint-prefer-rest
2 parents 075c733 + b35fa04 commit 35bb3c3

File tree

461 files changed

+7380
-4245
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

461 files changed

+7380
-4245
lines changed

.devcontainer/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.154.0/containers/javascript-node/.devcontainer/base.Dockerfile
1+
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/blob/v0.245.2/containers/javascript-node/.devcontainer/base.Dockerfile
22

3-
# [Choice] Node.js version: 14, 12, 10
4-
ARG VARIANT="14-buster"
3+
# [Choice] Node.js version: 18, 16, 14
4+
ARG VARIANT="18-buster"
55
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT}
66

77
RUN sudo -u node npm install -g hereby

.devcontainer/devcontainer.json

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,24 @@
33
"build": {
44
"dockerfile": "Dockerfile",
55
"args": {
6-
"VARIANT": "14"
6+
"VARIANT": "18"
77
}
88
},
9-
"settings": {
10-
"terminal.integrated.defaultProfile.linux": "bash",
11-
"terminal.integrated.profiles.linux": {
12-
"bash": {
13-
"path": "/bin/bash",
14-
"icon": "terminal-bash",
9+
"customizations": {
10+
"vscode": {
11+
"settings": {
12+
"terminal.integrated.defaultProfile.linux": "bash",
13+
"terminal.integrated.profiles.linux": {
14+
"bash": {
15+
"path": "/bin/bash",
16+
"icon": "terminal-bash"
17+
}
18+
}
1519
},
16-
},
20+
"extensions": [
21+
"dbaeumer.vscode-eslint"
22+
]
23+
}
1724
},
18-
"extensions": [
19-
"dbaeumer.vscode-eslint"
20-
],
2125
"remoteUser": "node"
22-
}
26+
}

.eslintrc.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484
"@typescript-eslint/class-literal-property-style": "off",
8585
"@typescript-eslint/consistent-indexed-object-style": "off",
8686
"@typescript-eslint/no-duplicate-enum-values": "off",
87+
"@typescript-eslint/no-empty-function": "off",
8788
"@typescript-eslint/no-namespace": "off",
8889
"@typescript-eslint/no-non-null-asserted-optional-chain": "off",
8990
"@typescript-eslint/no-var-requires": "off",
@@ -103,8 +104,6 @@
103104
],
104105

105106
// Todo: For each of these, investigate whether we want to enable them ✨
106-
"no-useless-escape": "off",
107-
"@typescript-eslint/no-empty-function": "off",
108107
"@typescript-eslint/no-unused-vars": "off",
109108

110109
// Pending https://github.com/typescript-eslint/typescript-eslint/issues/4820

.github/ISSUE_TEMPLATE/Bug_report.md

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

.github/ISSUE_TEMPLATE/Feature_request.md

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

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
name: "Bug report"
2+
description: "Create a report to help us improve TypeScript"
3+
body:
4+
- type: markdown
5+
attributes:
6+
value: Please fill in each section completely. Thank you!
7+
- type: textarea
8+
id: search_terms
9+
attributes:
10+
label: "🔎 Search Terms"
11+
description: |
12+
What search terms did you use when trying to find an existing bug report?
13+
14+
List them here so people in the future can find this one more easily.
15+
placeholder: |
16+
List of keywords you searched for before creating this issue.
17+
Write them down here so that others can find this bug more easily and help provide feedback.
18+
19+
e.g. "function inference any", "jsx attribute spread", "move to file duplicate imports", "discriminated union inference", "ts2822"
20+
validations:
21+
required: true
22+
- type: textarea
23+
id: version_info
24+
attributes:
25+
label: "🕗 Version & Regression Information"
26+
description: |
27+
When did you start seeing this bug occur?
28+
29+
"Bugs" that have existed in TS for a long time are very likely to be FAQs; refer to
30+
https://github.com/Microsoft/TypeScript/wiki/FAQ#common-bugs-that-arent-bugs
31+
32+
33+
If possible, please try testing the nightly version of TS to see if it's already been fixed. For npm: `typescript@next`
34+
35+
This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly
36+
37+
38+
Note: The TypeScript Playground can be used to try older versions of TypeScript.
39+
40+
Please keep and fill in the line that best applies.
41+
value: |
42+
- This is a crash
43+
- This changed between versions ______ and _______
44+
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
45+
- I was unable to test this on prior versions because _______
46+
validations:
47+
required: true
48+
- type: input
49+
id: playground_link
50+
attributes:
51+
label: ⏯ Playground Link
52+
description: |
53+
A link to a TypeScript Playground "Share" link which shows this behavior.
54+
55+
This should have the same code as the code snippet below, and use whichever settings are relevant to your report.
56+
57+
58+
As a last resort, you can link to a repo, but these will be slower for us to investigate.
59+
placeholder: "Playground link with relevant code: https://www.typescriptlang.org/play?#code/PTAEFkE9QYwewCYFNQHM5IM6gBZIE5JA"
60+
validations:
61+
required: false
62+
- type: textarea
63+
id: code
64+
attributes:
65+
label: 💻 Code
66+
description: |
67+
Please post the relevant code sample here as well.
68+
This code and the Playground code should be the same, do not use separate examples.
69+
70+
We can quickly address your report if:
71+
72+
- The code sample is short. Nearly all TypeScript bugs can be demonstrated in 20-30 lines of code!
73+
- It doesn't use external libraries. These are often issues with the type definitions rather than TypeScript bugs.
74+
- The incorrectness of the behavior is readily apparent from reading the sample.
75+
76+
Reports are slower to investigate if:
77+
- We have to pare too much extraneous code.
78+
- We have to clone a large repo and validate that the problem isn't elsewhere.
79+
- The sample is confusing or doesn't clearly demonstrate what's wrong.
80+
value: |
81+
```ts
82+
// Your code here
83+
```
84+
validations:
85+
required: false
86+
- type: textarea
87+
id: actual_behavior
88+
attributes:
89+
label: 🙁 Actual behavior
90+
description: "What happened, and why it was wrong."
91+
validations:
92+
required: true
93+
- type: textarea
94+
id: expected_behavior
95+
attributes:
96+
label: 🙂 Expected behavior
97+
description: What you expected to happen instead, and why
98+
validations:
99+
required: true
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: "Feature request"
2+
description: "Suggest an idea"
3+
body:
4+
- type: markdown
5+
attributes:
6+
value: "Please fill in each section completely. Thank you!"
7+
- type: textarea
8+
id: search_terms
9+
attributes:
10+
label: "🔍 Search Terms"
11+
description: |
12+
💡 Did you know? TypeScript has over 2,000 open suggestions!
13+
14+
🔎 Please search thoroughly before logging new feature requests as most common ideas already have a proposal in progress.
15+
16+
The "Common Feature Requests" section of the FAQ lists many popular requests: https://github.com/Microsoft/TypeScript/wiki/FAQ#common-feature-requests
17+
placeholder: |
18+
List of keywords you searched for before creating this issue.
19+
Write them down here so that others can find this suggestion more easily and help provide feedback.
20+
21+
e.g. "isArray readonly", "regex string types", "json const assertion import"
22+
validations:
23+
required: true
24+
- type: checkboxes
25+
id: viability_checklist
26+
attributes:
27+
label: "✅ Viability Checklist"
28+
description: |
29+
Suggestions that don't meet all these criteria are very, very unlikely to be accepted.
30+
We always recommend reviewing the TypeScript design goals before investing time writing
31+
a proposal for ideas outside the scope of the project.
32+
33+
My suggestion meets the following guidelines.
34+
options:
35+
- label: This wouldn't be a breaking change in existing TypeScript/JavaScript code
36+
required: true
37+
- label: This wouldn't change the runtime behavior of existing JavaScript code
38+
required: true
39+
- label: This could be implemented without emitting different JS based on the types of the expressions
40+
required: true
41+
- label: This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
42+
required: true
43+
- label: "This feature would agree with the rest of our Design Goals: https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals"
44+
required: true
45+
- type: textarea
46+
id: suggestion_summary
47+
attributes:
48+
label: "⭐ Suggestion"
49+
description: "A summary of what you'd like to see added or changed"
50+
validations:
51+
required: true
52+
- type: textarea
53+
id: motivating_example
54+
attributes:
55+
label: "📃 Motivating Example"
56+
description: |
57+
If you were announcing this feature in a blog post, what's a short
58+
explanation that shows a developer why this feature improves the language?
59+
validations:
60+
required: true
61+
- type: textarea
62+
id: use_cases
63+
attributes:
64+
label: "💻 Use Cases"
65+
value: |
66+
1. What do you want to use this for?
67+
2. What shortcomings exist with current approaches?
68+
3. What workarounds are you using in the meantime?
69+
validations:
70+
required: true

0 commit comments

Comments
 (0)