forked from microsoft/vscode
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Ashwin Kumar <[email protected]>
- Loading branch information
Showing
1,147 changed files
with
90,136 additions
and
19,085 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for license information. | ||
*--------------------------------------------------------------------------------------------*/ | ||
|
||
import * as eslint from 'eslint'; | ||
import { TSESTree } from '@typescript-eslint/experimental-utils'; | ||
|
||
/** | ||
* WORKAROUND for https://github.com/evanw/esbuild/issues/3823 | ||
*/ | ||
export = new class implements eslint.Rule.RuleModule { | ||
|
||
create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener { | ||
|
||
function checkProperty(inNode: any) { | ||
|
||
const classDeclaration = context.getAncestors().find(node => node.type === 'ClassDeclaration'); | ||
const propertyDefinition = <TSESTree.PropertyDefinition>inNode; | ||
|
||
if (!classDeclaration || !classDeclaration.id?.name) { | ||
return; | ||
} | ||
|
||
if (!propertyDefinition.value) { | ||
return; | ||
} | ||
|
||
const classCtor = classDeclaration.body.body.find(node => node.type === 'MethodDefinition' && node.kind === 'constructor') | ||
|
||
if (!classCtor) { | ||
return; | ||
} | ||
|
||
const name = classDeclaration.id.name; | ||
const valueText = context.getSourceCode().getText(<any>propertyDefinition.value) | ||
|
||
if (valueText.includes(name + '.')) { | ||
|
||
if (classCtor.value?.type === 'FunctionExpression' && !classCtor.value.params.find((param: any) => param.type === 'TSParameterProperty' && param.decorators?.length > 0)) { | ||
return | ||
} | ||
|
||
context.report({ | ||
loc: propertyDefinition.value.loc, | ||
message: `Static properties in decorated classes should not reference the class they are defined in. Use 'this' instead. This is a workaround for https://github.com/evanw/esbuild/issues/3823.` | ||
}); | ||
} | ||
|
||
} | ||
|
||
return { | ||
'PropertyDefinition[static=true]': checkProperty, | ||
}; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -156,6 +156,37 @@ | |
"addLabel": "confirmation-pending", | ||
"removeLabel": "confirmed" | ||
}, | ||
{ | ||
"type": "comment", | ||
"name": "needsMoreInfo", | ||
"allowUsers": [ | ||
"cleidigh", | ||
"usernamehw", | ||
"gjsjohnmurray", | ||
"IllusionMH" | ||
], | ||
"action": "updateLabels", | ||
"addLabel": "~info-needed" | ||
}, | ||
{ | ||
"type": "comment", | ||
"name": "needsPerfInfo", | ||
"allowUsers": [ | ||
"cleidigh", | ||
"usernamehw", | ||
"gjsjohnmurray", | ||
"IllusionMH" | ||
], | ||
"addLabel": "info-needed", | ||
"comment": "Thanks for creating this issue regarding performance! Please follow this guide to help us diagnose performance issues: https://github.com/microsoft/vscode/wiki/Performance-Issues \n\nHappy Coding!" | ||
}, | ||
{ | ||
"type": "comment", | ||
"name": "jsDebugLogs", | ||
"action": "updateLabels", | ||
"addLabel": "info-needed", | ||
"comment": "Please collect trace logs using the following instructions:\n\n> If you're able to, add `\"trace\": true` to your `launch.json` and reproduce the issue. The location of the log file on your disk will be written to the Debug Console. Share that with us.\n>\n> ⚠️ This log file will not contain source code, but will contain file paths. You can drop it into https://microsoft.github.io/vscode-pwa-analyzer/index.html to see what it contains. If you'd rather not share the log publicly, you can email it to [email protected]" | ||
}, | ||
{ | ||
"type": "comment", | ||
"name": "closedWith", | ||
|
@@ -169,6 +200,19 @@ | |
"reason": "completed", | ||
"addLabel": "unreleased" | ||
}, | ||
{ | ||
"type": "comment", | ||
"name": "spam", | ||
"allowUsers": [ | ||
"cleidigh", | ||
"usernamehw", | ||
"gjsjohnmurray", | ||
"IllusionMH" | ||
], | ||
"action": "close", | ||
"reason": "not_planned", | ||
"addLabel": "invalid" | ||
}, | ||
{ | ||
"type": "comment", | ||
"name": "a11ymas", | ||
|
@@ -414,6 +458,32 @@ | |
"addLabel": "*caused-by-extension", | ||
"comment": "It looks like this is caused by the Copilot extension. Please file the issue in the [Copilot Discussion Forum](https://github.com/community/community/discussions/categories/copilot). Make sure to check their issue reporting template and provide them relevant information such as the extension version you're using. See also our [issue reporting guidelines](https://aka.ms/vscodeissuereporting) for more information.\n\nHappy Coding!" | ||
}, | ||
{ | ||
"type": "comment", | ||
"name": "gifPlease", | ||
"allowUsers": [ | ||
"cleidigh", | ||
"usernamehw", | ||
"gjsjohnmurray", | ||
"IllusionMH" | ||
], | ||
"action": "comment", | ||
"addLabel": "info-needed", | ||
"comment": "Thanks for reporting this issue! Unfortunately, it's hard for us to understand what issue you're seeing. Please help us out by providing a screen recording showing exactly what isn't working as expected. While we can work with most standard formats, `.gif` files are preferred as they are displayed inline on GitHub. You may find https://gifcap.dev helpful as a browser-based gif recording tool.\n\nIf the issue depends on keyboard input, you can help us by enabling screencast mode for the recording (`Developer: Toggle Screencast Mode` in the command palette). Lastly, please attach this file via the GitHub web interface as emailed responses will strip files out from the issue.\n\nHappy coding!" | ||
}, | ||
{ | ||
"type": "comment", | ||
"name": "confirmPlease", | ||
"allowUsers": [ | ||
"cleidigh", | ||
"usernamehw", | ||
"gjsjohnmurray", | ||
"IllusionMH" | ||
], | ||
"action": "comment", | ||
"addLabel": "info-needed", | ||
"comment": "Please diagnose the root cause of the issue by running the command `F1 > Help: Troubleshoot Issue` and following the instructions. Once you have done that, please update the issue with the results.\n\nHappy Coding!" | ||
}, | ||
{ | ||
"__comment__": "Allows folks on the team to label issues by commenting: `\\label My-Label` ", | ||
"type": "comment", | ||
|
@@ -444,5 +514,29 @@ | |
"addLabel": "verification-steps-needed", | ||
"removeLabel": "~verification-steps-needed", | ||
"comment": "Friendly ping! Looks like this issue requires some further steps to be verified. Please provide us with the steps necessary to verify this issue." | ||
}, | ||
{ | ||
"type": "label", | ||
"name": "~info-needed", | ||
"action": "updateLabels", | ||
"addLabel": "info-needed", | ||
"removeLabel": "~info-needed", | ||
"comment": "Thanks for creating this issue! We figured it's missing some basic information or in some other way doesn't follow our [issue reporting guidelines](https://aka.ms/vscodeissuereporting). Please take the time to review these and update the issue.\n\nHappy Coding!" | ||
}, | ||
{ | ||
"type": "label", | ||
"name": "~version-info-needed", | ||
"action": "updateLabels", | ||
"addLabel": "info-needed", | ||
"removeLabel": "~version-info-needed", | ||
"comment": "Thanks for creating this issue! We figured it's missing some basic information, such as a version number, or in some other way doesn't follow our [issue reporting guidelines](https://aka.ms/vscodeissuereporting). Please take the time to review these and update the issue.\n\nHappy Coding!" | ||
}, | ||
{ | ||
"type": "label", | ||
"name": "~confirmation-needed", | ||
"action": "updateLabels", | ||
"addLabel": "info-needed", | ||
"removeLabel": "~confirmation-needed", | ||
"comment": "Please diagnose the root cause of the issue by running the command `F1 > Help: Troubleshoot Issue` and following the instructions. Once you have done that, please update the issue with the results.\n\nHappy Coding!" | ||
} | ||
] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.