Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion packages/cli/scripts/compile-rules.ts
Original file line number Diff line number Diff line change
@@ -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/');
Expand All @@ -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',
Copy link
Preview

Copilot AI Jul 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The relative path '../../../examples/boilerplate-project/checkly.config.ts' creates a fragile dependency that reaches outside the package scope. Consider moving the example config into the cli package or using a more robust path resolution method.

Suggested change
'../../../examples/boilerplate-project/checkly.config.ts',
'resources/example-configs/checkly.config.ts',

Copilot uses AI. Check for mistakes.

Copy link
Collaborator Author

@stefanjudis stefanjudis Jul 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I know. I'm waiting for feedback first. Of course, we could follow the suggestion but then we have another example checkly.config file in the code base.

},
BROWSER_CHECK: {
templateString: '// INSERT BROWSER CHECK EXAMPLE HERE //',
exampleConfigPath:
Expand Down
4 changes: 4 additions & 0 deletions packages/cli/src/rules/checkly.rules.template.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading