From 2847f68c753d75bf8c38119fb9bdc7f9d6f2e4f3 Mon Sep 17 00:00:00 2001 From: Jacob Creech <82475023+jacobcreech@users.noreply.github.com> Date: Tue, 21 Mar 2023 22:57:33 -0500 Subject: [PATCH] fix: better error info on expected headings (#43) * fix: pre-linting CI errors * fix: give better error information on expected headings --- .github/linter/customRules.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/linter/customRules.ts b/.github/linter/customRules.ts index 2062b3a..e9fd730 100644 --- a/.github/linter/customRules.ts +++ b/.github/linter/customRules.ts @@ -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