From fc58cd160e82fbbe586634b57939a881eaba319c Mon Sep 17 00:00:00 2001 From: stefan judis Date: Thu, 17 Jul 2025 16:19:40 +0200 Subject: [PATCH] feat: add checkly config example to AI rules template MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added CHECKLY_CONFIG to compile-rules.ts and corresponding template placeholder in checkly.rules.template.md to include configuration examples in the AI rules. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- packages/cli/scripts/compile-rules.ts | 7 ++++++- packages/cli/src/rules/checkly.rules.template.md | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/cli/scripts/compile-rules.ts b/packages/cli/scripts/compile-rules.ts index 83a3d94fc..5bb8d37b9 100644 --- a/packages/cli/scripts/compile-rules.ts +++ b/packages/cli/scripts/compile-rules.ts @@ -1,5 +1,5 @@ /* eslint-disable no-console */ -import { readFile, writeFile, mkdir } from 'fs/promises'; +import { mkdir, readFile, writeFile } from 'fs/promises'; import { join } from 'path'; const EXAMPLES_DIR = join(__dirname, '../gen/'); @@ -12,6 +12,11 @@ const EXAMPLE_CONFIGS: Record< string, { templateString: string; exampleConfigPath: string } > = { + CHECKLY_CONFIG: { + templateString: '// INSERT CHECKLY CONFIG EXAMPLE HERE //', + exampleConfigPath: + '../../../examples/boilerplate-project/checkly.config.ts', + }, BROWSER_CHECK: { templateString: '// INSERT BROWSER CHECK EXAMPLE HERE //', exampleConfigPath: diff --git a/packages/cli/src/rules/checkly.rules.template.md b/packages/cli/src/rules/checkly.rules.template.md index 47fd4a18a..c70491b6f 100644 --- a/packages/cli/src/rules/checkly.rules.template.md +++ b/packages/cli/src/rules/checkly.rules.template.md @@ -33,6 +33,10 @@ Here is an example directory tree of what that would look like: The `checkly.config.ts` at the root of your project defines a range of defaults for all your checks. +```typescript +// INSERT CHECKLY CONFIG EXAMPLE HERE // +``` + ## Check and Monitor Constructs ### API Check