From 640c8af0119ae00381e767b33b77403bf44a887a Mon Sep 17 00:00:00 2001 From: filip mertens Date: Wed, 6 Jul 2022 16:57:39 +0200 Subject: [PATCH] lint --- apps/remix-ide-e2e/src/tests/editor.test.ts | 1 + apps/remix-ide/src/app/plugins/parser/code-parser.tsx | 3 --- .../editor/src/lib/providers/completionProvider.ts | 10 +++++++++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/editor.test.ts b/apps/remix-ide-e2e/src/tests/editor.test.ts index 60da793817..14cd064265 100644 --- a/apps/remix-ide-e2e/src/tests/editor.test.ts +++ b/apps/remix-ide-e2e/src/tests/editor.test.ts @@ -234,6 +234,7 @@ contract Storage { } }` +// eslint-disable-next-line @typescript-eslint/no-unused-vars const BallotWithARefToOwner = ` diff --git a/apps/remix-ide/src/app/plugins/parser/code-parser.tsx b/apps/remix-ide/src/app/plugins/parser/code-parser.tsx index ed510f7d21..2f87ce1f1c 100644 --- a/apps/remix-ide/src/app/plugins/parser/code-parser.tsx +++ b/apps/remix-ide/src/app/plugins/parser/code-parser.tsx @@ -375,7 +375,6 @@ export class CodeParser extends Plugin { async positionOfDefinition(node: any): Promise { if (node) { if (node.src) { - console.log('positionOfDefinition', node) const position = sourceMappingDecoder.decode(node.src) if (position) { return position @@ -393,7 +392,6 @@ export class CodeParser extends Plugin { */ async resolveImports(node, imported = {}) { if (node.nodeType === 'ImportDirective' && !imported[node.sourceUnit]) { - console.log('IMPORTING', node) const importNode = await this.getNodeById(node.sourceUnit) imported[importNode.id] = importNode if (importNode.nodes) { @@ -402,7 +400,6 @@ export class CodeParser extends Plugin { } } } - console.log(imported) return imported } diff --git a/libs/remix-ui/editor/src/lib/providers/completionProvider.ts b/libs/remix-ui/editor/src/lib/providers/completionProvider.ts index 9800a1becd..6cf12581f0 100644 --- a/libs/remix-ui/editor/src/lib/providers/completionProvider.ts +++ b/libs/remix-ui/editor/src/lib/providers/completionProvider.ts @@ -56,7 +56,15 @@ export class RemixCompletionProvider implements languages.CompletionItemProvider } if (lastNodeInExpression.name === 'this') { dotCompleted = true - nodes = [...nodes, ...await this.getContractCompletions(nodes, position)] + let thisCompletionNodes = await this.getContractCompletions(nodes, position) + thisCompletionNodes = thisCompletionNodes.filter(node => + { + if(node.visibility && node.visibility === 'internal') { + return false + } + return true + }) + nodes = [...nodes, ...thisCompletionNodes] } //} if (expressionElements.length > 1 && !dotCompleted) {