Imported from gencau/test-practices-agent-configurations (
dataset/repos/visgl§deck.gl-community/AGENTS.md). Install upstream withnpx skills add gencau/test-practices-agent-configurations --skill visgl§deck.gl-community. Copyright stays with the author.
Repository-wide instructions for agents
This file applies to the entire deck.gl-community repository. Directories may add more specific guidance in their own AGENTS.md files.
Tooling
- Use the Yarn 4 workspace that ships with the repo. Install dependencies with
yarnand run scripts viayarn <script>from the repo root. Seepackage.jsonfor the canonical script list. - Prefer TypeScript and ES module syntax when authoring source files. Most packages ship dual ESM/CJS bundles via build tooling defined per workspace package.
- if any dependencies are changed, the yarn.lock file must be rebuilt by running
yarnin the root before committing.
Quality gates
- Run
yarn lintoryarn lint-fixbefore committing JavaScript/TypeScript changes. - Run the relevant Vitest project:
yarn test(Node),yarn test-browser, oryarn test-headlessas appropriate for your change.
Documentation and release process
- Follow the contribution flow in
docs/CONTRIBUTING.mdbefore landing breaking changes. - When adding or removing packages or examples, update any related documentation, sidebars, or release notes under
docs/. - Publishing: Use
yarn publish-prod(production) oryarn publish-beta(pre-release) to version packages. These runocular-publish version-only-prod/version-only-betawhich bump versions and create git tags. The actual NPM publish is handled by thereleaseCI workflow, which triggers onv*tags pushed tomasteror*-releasebranches.
Code style
Formatting is enforced by Prettier and ESLint via ocular-lint.
Prettier rules (.prettierrc):
- Print width: 100
- Semicolons: yes
- Single quotes: yes
- Trailing commas: none
- Bracket spacing: no (
{a}not{ a })
Guidelines:
- Run
yarn lint-fixbefore committing - Do NOT reformat files you are not otherwise changing
- Keep formatting changes in separate commits from logic changes
Naming conventions
- Typescript functions use verb-noun, in camelCase.
- Typescript variables use camelCase
- Typescript types use PascalCase
- Typescript constants use UPPER_CASE
- File names use kebab case. Typically corresponding to the name of the main export in that file. Example:
export class StyleEngine=>style-engine.ts
Dependencies
- Generally we want to be restrictive with external dependencies, unless they provide a major capability and not just some minor utilitiy.
- vis.gl ecosystem dependencies are acceptable, as long as they respect the layering of those frameworks (a math library should not include luma.gl or deck.gl for instance).
- For math use math.gl modules. Do not introduce d3-extents or similar to save just a few lines
- Try to avoid lodash dependencies.