Skip to content

Commit 2e247a1

Browse files
authored
tweak event-naming rule and remove disable-pragma from vscode.d.ts, (microsoft#154914)
fixes microsoft#154526
1 parent 261e65f commit 2e247a1

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

build/lib/eslint/vscode-dts-event-naming.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ module.exports = new (_a = class ApiEventNaming {
7676
if (def.type === experimental_utils_1.AST_NODE_TYPES.Identifier) {
7777
return def;
7878
}
79-
else if ((def.type === experimental_utils_1.AST_NODE_TYPES.TSPropertySignature || def.type === experimental_utils_1.AST_NODE_TYPES.Property) && def.key.type === experimental_utils_1.AST_NODE_TYPES.Identifier) {
79+
else if ((def.type === experimental_utils_1.AST_NODE_TYPES.TSPropertySignature || def.type === experimental_utils_1.AST_NODE_TYPES.PropertyDefinition) && def.key.type === experimental_utils_1.AST_NODE_TYPES.Identifier) {
8080
return def.key;
8181
}
8282
return this.getIdent(def.parent);

build/lib/eslint/vscode-dts-event-naming.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,10 @@ export = new class ApiEventNaming implements eslint.Rule.RuleModule {
8888

8989
if (def.type === AST_NODE_TYPES.Identifier) {
9090
return def;
91-
} else if ((def.type === AST_NODE_TYPES.TSPropertySignature || def.type === AST_NODE_TYPES.Property) && def.key.type === AST_NODE_TYPES.Identifier) {
91+
} else if ((def.type === AST_NODE_TYPES.TSPropertySignature || def.type === AST_NODE_TYPES.PropertyDefinition) && def.key.type === AST_NODE_TYPES.Identifier) {
9292
return def.key;
9393
}
9494

9595
return this.getIdent(def.parent);
9696
}
9797
};
98-

src/vscode-dts/vscode.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1608,7 +1608,6 @@ declare module 'vscode' {
16081608
/**
16091609
* The event listeners can subscribe to.
16101610
*/
1611-
// eslint-disable-next-line vscode-dts-event-naming
16121611
event: Event<T>;
16131612

16141613
/**

0 commit comments

Comments
 (0)