linting fix

solVersion
aniket-engg 1 year ago committed by Aniket
parent b5743ceb80
commit 4e99723b18
  1. 53
      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 {

Loading…
Cancel
Save