Merged
Conversation
kulmann
approved these changes
Mar 23, 2026
AGENTS.md
Outdated
| - **Linting** – enforced via ESLint (`packages/eslint-config`). Run `pnpm lint` to check. | ||
| - **Vue unref() vs .value** – prefer `unref()` for accessing Ref values for better readability. Use `.value` only when setting values (e.g. `foo.value = 'bar'` or `foo.value.push('bar')`). | ||
| - **Functions vs arrow functions** – prefer named `function` declarations over arrow functions. Use arrow functions only for callbacks or when the `this` context requires it. | ||
| - **Import from monorepo packages** – the only shared packages that can be imported from other packages are `web-pkg`, `web-client`, `web-test-helpers` and `design-system`. always check the `package.json` of the package you're importing from for the `exports` field. Never use relative paths (use e.g. `import { useFoo } from '@opencloud-eu/web-pkg'`, never use e.g. `import { useFoo } from '../../web-pkg/src/composables/foo'`). |
Member
There was a problem hiding this comment.
shared packages and from other packages are two different scopes of the word packages. sounds super weird. but I guess it's fine 🙈
Member
Author
There was a problem hiding this comment.
Do you have an idea how to make it more clear? just leave out the word "shared"?
Member
Author
There was a problem hiding this comment.
I adjusted it, I (and Claude :D ) think it's cleaner now.
| - **Location:** `tests/unit/` inside each package, mirroring the `src/` folder structure. | ||
| - **File naming:** `{originalFileName}.spec.ts` (e.g. `src/composables/foo.ts` → `tests/unit/composables/foo.spec.ts`). | ||
| - **Helpers:** The `@opencloud-eu/web-test-helpers` package (`packages/web-test-helpers`) provides shared utilities for mounting components, mocking stores, etc. Use it instead of rolling your own helpers. | ||
| - **Snapshots:** Avoid using snapshot tests, as they can be brittle and hard to maintain. Prefer explicit assertions that check specific behavior or output. |
Member
There was a problem hiding this comment.
thank you ❤️ I hate snapshot tests.
Adds instructions for agents via an `AGENTS.md` file.
6eb131b to
d5711e4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds instructions for agents via an
AGENTS.mdfile.