fix: better error info on expected headings (#43)

* fix: pre-linting CI errors

* fix: give better error information on expected headings
This commit is contained in:
Jacob Creech 2023-03-21 22:57:33 -05:00 committed by GitHub
parent 4762b28483
commit 2847f68c75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -36,9 +36,8 @@ export const enforceHeaderStructure = {
if (index + 1 >= filtered.length) {
onError({
lineNumber: token.lineNumber,
detail: `Expected heading \`${expectedHeadings[index]}\` and none exists. Please follow the structure outlined in the Proposal Template.`,
context: token.line,
lineNumber: 0,
detail: `Expected heading \`${tempHeadings[0]}\` and none exists. Please follow the structure outlined in the Proposal Template.`,
})
return