Skip to content
Merged
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
10 changes: 10 additions & 0 deletions .coderabbit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ reviews:
path_filters:
- "!sdk/**"
path_instructions:
# Studio web sources
- path: "web/**/*.{ts,tsx,js,jsx}"
instructions: |
Do not comment on import ordering or grouping. It is generated by
`pnpm lint:fix` under an `import/order` rule that runs as an error, and
CI enforces it with `--max-warnings 0`. The `@nemo` / `@nvidia` / `@studio`
path aliases resolve as *external*, so they sort alphabetically alongside
`react` and other packages rather than forming a separate "internal"
group. Ordering that looks like "internal before external" is the rule's
output, not a mistake.
# Documentation files
- path: "documentation/docs/**/*"
instructions: |
Expand Down
9 changes: 8 additions & 1 deletion web/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,15 @@ If a package defines these scripts, CI will pick them up automatically. No addit
### Imports and Exports

- Use named exports over default exports
- Group imports: external libraries, internal modules, relative imports
- Use absolute imports via tsconfig path mapping (never relative)
- **Never hand-sort imports — run `pnpm lint:fix` from `web/` and leave the result alone.**
`import/order` runs as an _error_ (`eslint.config.js`) with
`groups: [['builtin', 'external'], 'internal', ['parent', 'sibling', 'index']]`
and `alphabetize: { order: 'asc' }`. The `@nemo` / `@nvidia` / `@studio` aliases
resolve as **external**, so they share a single alphabetized group with `react`,
`lucide-react` and friends — which sorts `react` near the end. That reads
backwards if you expect "third-party first, ours second", but it is the rule's
output, and reordering fails CI's `--max-warnings 0`.

### React Patterns

Expand Down
Loading