From e8dca3ce7d2f83ca61675f25492260a9906856df Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Wed, 2 Oct 2024 01:06:56 +0100 Subject: [PATCH] website/Reference: really fix the eslint error :D --- .docs/Reference.11tydata.mjs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.docs/Reference.11tydata.mjs b/.docs/Reference.11tydata.mjs index 27dcf14..4a5df77 100644 --- a/.docs/Reference.11tydata.mjs +++ b/.docs/Reference.11tydata.mjs @@ -11,8 +11,7 @@ import parse_sections from "./lib/parse_sections.mjs"; // HACK: Make sure __dirname is defined when using es6 modules. I forget where I found this - a PR with a source URL would be great! const __dirname = import.meta.url.slice(7, import.meta.url.lastIndexOf("/")); -// eslint-disable-next-line prefer-const -let { sections, categories } = parse_sections(fs.readFileSync( +const { sections, categories } = parse_sections(fs.readFileSync( path.resolve( __dirname, `../Chat-Command-Reference.md` @@ -20,7 +19,7 @@ let { sections, categories } = parse_sections(fs.readFileSync( "utf-8" )) -sections = sections.sort((a, b) => a.title.replace(/^\/+/g, "").localeCompare( +sections.sort((a, b) => a.title.replace(/^\/+/g, "").localeCompare( b.title.replace(/^\/+/g, "")));