fix: fix test script lint errors

This commit is contained in:
Andrew Bastin
2021-07-22 01:22:55 -04:00
parent 7105e7a86f
commit dd004c921e

View File

@@ -15,6 +15,7 @@ import {
getPreRequestScriptCompletions,
getTestScriptCompletions,
performPreRequestLinting,
performTestLinting,
} from "~/helpers/tern"
export default {
@@ -177,7 +178,12 @@ export default {
provideLinting: debounce(function (code) {
let results = []
performPreRequestLinting(code)
const lintFunc =
this.completeMode === "pre"
? performPreRequestLinting
: performTestLinting
lintFunc(code)
.then((semanticLints) => {
results = results.concat(
semanticLints.map((lint) => ({