From b404a9cfdffb6b6130eb483da8ebfc19878203ad Mon Sep 17 00:00:00 2001 From: Naomi Carrigan Date: Wed, 8 Oct 2025 10:54:35 -0700 Subject: [PATCH] fix(ci): generate a fake order.json for CI linting --- .gitea/workflows/ci.yml | 3 +++ eslint.config.js | 1 - src/index.ts | 2 -- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index cf414e4..08a9087 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -28,6 +28,9 @@ jobs: - name: Install Dependencies run: pnpm install + - name: Create fake order.json + run: echo '{"chapters":[{"modules":[{"blocks":["responsive-web-design",]}]}]}' > ./data/order.json + - name: Lint Source Files run: pnpm run lint diff --git a/eslint.config.js b/eslint.config.js index aeb2b37..be2c841 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -6,7 +6,6 @@ export default [ rules: { "no-console" : "off", "no-await-in-loop": "off", - "comments/no-unlimited-disable": "off", } } ]; \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index 01dec6a..7e096c5 100644 --- a/src/index.ts +++ b/src/index.ts @@ -17,13 +17,11 @@ import order from "../data/order.json" assert { type: "json" }; import { options } from "./config/options.js"; import { starterText } from "./config/text.js"; -/* eslint-disable -- Because we do not commit the order object, the CI cannot process this declaration.*/ const flattenedOrder: Array = order.chapters.flatMap((chapter) => { return chapter.modules.flatMap((module) => { return module.blocks; }); }); -/* eslint-enable */ const readDirectoryRecursively = async( directory: string,