8000 chore(eslint-plugin): [no-unused-vars] remove unused nested TSModuleD… · danvk/typescript-eslint@1bc3c97 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1bc3c97

Browse files
auvreddanvk
authored andcommitted
chore(eslint-plugin): [no-unused-vars] remove unused nested TSModuleDeclaration rule listener (typescript-eslint#8279)
1 parent c9ceb9d commit 1bc3c97

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

packages/eslint-plugin/src/rules/no-unused-vars.ts

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -312,23 +312,6 @@ export default createRule<Options, MessageIds>({
312312
markDeclarationChildAsUsed(node);
313313
},
314314

315-
// module declaration in module declaration should not report unused vars error
316-
// this is workaround as this change should be done in better way
317-
'TSModuleDeclaration > TSModuleDeclaration'(
318-
node: TSESTree.TSModuleDeclaration,
319-
): void {
320-
if (node.id.type === AST_NODE_TYPES.Identifier) {
321-
let scope = getScope(context);
322-
if (scope.upper) {
323-
scope = scope.upper;
324-
}
325-
const superVar = scope.set.get(node.id.name);
326-
if (superVar) {
327-
superVar.eslintUsed = true;
328-
}
329-
}
330-
},
331-
332315
// children of a namespace that is a child of a declared namespace are auto-exported
333316
[ambientDeclarationSelector(
334317
'TSModuleDeclaration[declare = true] > TSModuleBlock TSModuleDeclaration > TSModuleBlock',

0 commit comments

Comments
 (0)
0