|
7 | 7 | - When adding dependencies, use `npm install` |
8 | 8 | - Do not add it to workspace root |
9 | 9 | - If it is an existing package, must use consistent version: either use existing version for the package or consider bumping every dependents to latest |
10 | | -- Production code must avoid packages from Node.js packages or polyfills |
| 10 | +- Unless stated otherwise, avoid Node.js packages or polyfills |
11 | 11 | - Use `ReadableStream`, `WritableStream`, `TransformStream`, instead of Node.js `buffer` |
12 | 12 | - Use Web Cryptography instead of Node.js `crypto` |
13 | 13 | - Do not use `fs`-like or `net`-like packages |
14 | 14 | - Do not use any Browserify-like packages |
15 | | -- When adding pacakges to the following packages, verify: |
16 | | - - `/packages/api/` and `/packages/core/`: Newly added packages and transient packages must be platform-neutral |
17 | | - - `/packages/test/`: Open to any packages |
18 | | - - `/packages/*/`: Newly added packages and transient packages must be either platform-neutral or targetting browser |
| 15 | +- Unless stated otherwise, verify newly added packages and transient packages must be either platform-neutral, browser-specific, or React-specific |
19 | 16 | - Do not add external/publishing packages unless explicitly requested |
20 | 17 | - Always prefix internal/non-publishing packages with `@msinternal/` to prevent package squatting |
21 | 18 |
|
22 | 19 | ### General |
23 | 20 |
|
24 | | -- Unless stated otherwise, assume browser and React is available, avoid Node.js |
| 21 | +- Unless stated otherwise, avoid Node.js |
25 | 22 | - Apply our latest coding style to every file changed |
26 | 23 | - Avoid spaghetti code: on new feature with a similar existing feature, refactor existing one before writing new feature |
27 | 24 | - This does not applies to test code |
|
0 commit comments