Skip to content
Closed
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
4 changes: 2 additions & 2 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Use this guide to review both code and workflow. Focus on Mendix pluggable widge
- `packages/customWidgets/*`
- `packages/shared/*` (configs, plugins)
- **Stack**: TypeScript, React, SCSS, Rollup via `@mendix/pluggable-widgets-tools`, Jest/RTL, ESLint/Prettier.
- **Commands** (root): `pnpm lint`, `pnpm test`, `pnpm build`, `pnpm -w changelog`, `pnpm -w version`.
- **Commands** (root): `pnpm lint`, `pnpm test`, `pnpm build`, `pnpm -w changelog`.

## What to check on every PR

Expand Down Expand Up @@ -319,7 +319,7 @@ This repository uses a comprehensive three-tier testing strategy:
- Build: `pnpm build`
- E2E (dev): `pnpm e2edev` (with GUI debugger)
- E2E (CI): `pnpm e2e` (headless)
- Prepare changelog/version (workspace): `pnpm -w changelog`, `pnpm -w version`
- Prepare changelog (workspace): `pnpm -w changelog`

## Tone and format for comments

Expand Down
28 changes: 26 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ Key commands for working with this repository:
- **`pnpm test`** - Run unit tests across all packages
- **`pnpm build`** - Build all packages
- **`pnpm -w changelog`** - Update changelogs
- **`pnpm -w version`** - Bump versions across packages

## AI Development Assistant Context

Expand Down Expand Up @@ -91,4 +90,29 @@ When working on this repository, prioritize:
4. **Building**: Use `pnpm build` or `pnpm start` for development builds
5. **Testing**: Use `pnpm test` for unit tests, `pnpm e2e` for E2E tests

For detailed implementation guidance, refer to the specific requirement documents linked above.
For detailed implementation guidance, refer to the specific requirement documents linked above.

## How-To's

### Code Linting

ESLint with Prettier integration handles code quality and formatting. Fix errors using cli as much as possible, manual fixing is a last resort.

#### Key Rules

1. **Location**: Always `cd` into widget directory (e.g., `packages/pluggableWidgets/combobox-web/`) before running lint commands
2. **Command**: Use `pnpm run lint` (with optional `--fix` for fixing), this is custom command, not eslint - do not pass any extra arguments or filenames
3. **Focus**: Fix only errors and warnings in files you modified; ignore warnings in untouched files

#### Workflow

1. **Check**: Run `pnpm run lint`
- Output shows `prettier/prettier` violations (formatting) and ESLint rule errors

2. **Auto-fix**: Run `pnpm run lint --fix`
- Fixes Prettier formatting and auto-fixable ESLint rules
- Note: after fixes, this checks for errors as `pnpm run lint` would do, no need to rerun `pnpm run lint` before next step

3. **Manual fix**: Edit code directly for remaining errors

4. **Verify**: Re-run `pnpm run lint` until output shows 0 errors or passes silently
Loading