Skip to content

Code Style

Morgan Touverey Quilling edited this page Jul 13, 2024 · 3 revisions

TypeScript

TypeScript code is formatted and linted by Biome. Run bun check to check for linting errors, format files and autofix simple issues.

You can also use Biome directly with bun biome.

The formatter and linter should run as a pre-commit hook if you have it installed, which should be done automatically when running bun i (otherwise run bun lefthook install).

I'd suggest to use a Biome plugin for your editor to ease development.

If a rule seems out of place for this project, you can either disable/reconfigure it in the biome.json file or disable it with an annotation comment, but these should be justified and concerted.

C#

For C#, prefer using Rider, as code style and linting settings are saved in the project. Reformat your code before committing (CTRL+ALT+L with Rider).

At the very least, please ensure your IDE has .editorconfig support enabled.

Commit messages

Commits must follow the Conventional Commits specification and more specifically the Angular one.

Scope can be one or more of the following:

  • deps: for changes in the dependencies consumed by the SDKs;
  • jsdk: for changes in UrbanDevKit's UI libraries;
  • netdk: for changes in UrbanDevKit's .NET libraries;
  • utils: specific scope for changes in the libraries;
  • testmod: for changes in the test mods (don't forget there is also the test() commit type);
  • cooperative-preloading: for changes in Cooperative Preloading feature;
  • Propose new scopes if needed!

Features & Helpers

.NET-only Features

  • Shared State Share state between assemblies without linking
  • Coroutine Runner Helper to start coroutines from anywhere or wrap them into Tasks.

UI-only Features

.NET+UI Features

Contributing

Clone this wiki locally