Style Guide

We use some tools to keep our teamwork style the same:

Commitlint

Our commit rules extend @commitlint/config-conventional rules, defined scope enum in tools/commitlint/.commitlintrc.json.

ESLint

Our ESLint rules are defined in .eslintrc.js, to check and find problems in JavaScript, TypeScript and React code. We will run eslint in pre-commit hook to find problem early.

Oxlint

We use oxlint to speedup lint in CI, to find problem as soon as possible.

Prettier

Our prettier rules are defined in .prettierrc, and assigned to rules parsed from .editorconfig. We will run prettier in pre-commit hook to format code automatically.

EditorConfig

We defined editor config in .editorconfig, to help maintain consistent coding styles for multiple developers working on the same project across various editors and IDEs.