From 4e99723b1863e741dd75c73a42872391229f3596 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Fri, 28 Jul 2023 14:02:18 +0530 Subject: [PATCH] linting fix --- .../src/lib/providers/codeActionProvider.ts | 53 +++++++++---------- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/libs/remix-ui/editor/src/lib/providers/codeActionProvider.ts b/libs/remix-ui/editor/src/lib/providers/codeActionProvider.ts index 7c1fcd4e38..d1858ce9dc 100644 --- a/libs/remix-ui/editor/src/lib/providers/codeActionProvider.ts +++ b/libs/remix-ui/editor/src/lib/providers/codeActionProvider.ts @@ -43,37 +43,36 @@ export class RemixCodeActionProvider implements monaco.languages.CodeActionProvi endColumn: error.startColumn + msg.length } } else { - const lineContent = model.getLineContent(nodeAtPosition.loc.start.line) - const i = lineContent.indexOf('()') - msg = lineContent.substring(0, i + 3) + fix.message + lineContent.substring(i + 3, lineContent.length) - fix.range = { - startLineNumber: nodeAtPosition.loc.start.line, - endLineNumber: nodeAtPosition.loc.start.line, - startColumn: 0, - endColumn: error.startColumn + msg.length - } + const lineContent = model.getLineContent(nodeAtPosition.loc.start.line) + const i = lineContent.indexOf('()') + msg = lineContent.substring(0, i + 3) + fix.message + lineContent.substring(i + 3, lineContent.length) + fix.range = { + startLineNumber: nodeAtPosition.loc.start.line, + endLineNumber: nodeAtPosition.loc.start.line, + startColumn: 0, + endColumn: error.startColumn + msg.length } + } } } - } - - actions.push({ - title: fix.title, - diagnostics: [error], - kind: "quickfix", - edit: { - edits: [ - { - resource: model.uri, - edit: { - range: fix.range || error, - text: msg || fix.message + actions.push({ + title: fix.title, + diagnostics: [error], + kind: "quickfix", + edit: { + edits: [ + { + resource: model.uri, + edit: { + range: fix.range || error, + text: msg || fix.message + } } - } - ] - }, - isPreferred: true - }) + ] + }, + isPreferred: true + }) + } } return {