|
7 | 7 | ## Code Quality Rules |
8 | 8 |
|
9 | 9 | - NEVER fail silently - always log errors and make failures visible to users when appropriate. |
| 10 | +- If a composable is used within only one Vue component, keep it in that component file - do NOT create a separate composable file. |
| 11 | + |
| 12 | +## WebR Documentation References |
| 13 | + |
| 14 | +Always reference the official WebR documentation when working with WebR features. Be eager to check and link to relevant sections: |
| 15 | + |
| 16 | +**Official WebR Documentation**: https://docs.r-wasm.org/webr/latest/ |
| 17 | + |
| 18 | +### Table of Contents with Links: |
| 19 | +- [Getting Started](https://docs.r-wasm.org/webr/latest/getting-started.html) |
| 20 | +- [Downloading WebR](https://docs.r-wasm.org/webr/latest/downloading.html) |
| 21 | +- [Serving Pages with WebR](https://docs.r-wasm.org/webr/latest/serving.html) |
| 22 | +- [Examples using WebR](https://docs.r-wasm.org/webr/latest/examples.html) |
| 23 | +- [Worker Communication](https://docs.r-wasm.org/webr/latest/communication.html) |
| 24 | +- [Evaluating R Code](https://docs.r-wasm.org/webr/latest/evaluating.html) ⭐ *Key for our composables* |
| 25 | +- [Plotting](https://docs.r-wasm.org/webr/latest/plotting.html) ⭐ *Used in our ggplot2 demos* |
| 26 | +- [Networking](https://docs.r-wasm.org/webr/latest/networking.html) |
| 27 | +- [Working with R Objects](https://docs.r-wasm.org/webr/latest/objects.html) ⭐ *Critical for data handling* |
| 28 | +- [Managing R Objects](https://docs.r-wasm.org/webr/latest/objects.html#managing-r-objects) |
| 29 | +- [Converting to JavaScript](https://docs.r-wasm.org/webr/latest/convert-js.html) ⭐ *Used extensively* |
| 30 | +- [Creating New R Objects](https://docs.r-wasm.org/webr/latest/objects.html#creating-new-r-objects) |
| 31 | +- [Installing R Packages](https://docs.r-wasm.org/webr/latest/packages.html) ⭐ *For our library management* |
| 32 | +- [Building R Packages](https://docs.r-wasm.org/webr/latest/building.html) |
| 33 | +- [Mounting Filesystem Data](https://docs.r-wasm.org/webr/latest/mounting.html) ⭐ *For CSV uploads* |
| 34 | +- [WebR API](https://docs.r-wasm.org/webr/latest/api.html) |
| 35 | +- [R API](https://docs.r-wasm.org/webr/latest/api/r.html) |
| 36 | +- [JavaScript API](https://docs.r-wasm.org/webr/latest/api/js.html) ⭐ *Main reference* |
| 37 | + |
| 38 | +### Key Principles: |
| 39 | +- Always link to relevant WebR docs when implementing features |
| 40 | +- Use WebR best practices as documented |
| 41 | +- Reference specific API methods and their documentation |
| 42 | +- Show developers this is a proper WebR showcase, not just a demo |
| 43 | + |
| 44 | +## Testing Philosophy |
| 45 | + |
| 46 | +- DON'T test implementation details like "finding messages with specific text" - these are non-tests |
| 47 | +- DON'T test trivial functionality that just confirms code does what it was written to do |
| 48 | +- DO test actual business logic and user-facing behavior that could realistically break |
10 | 49 |
|
11 | 50 | ## Type Safety Requirements |
12 | 51 |
|
|
0 commit comments