โ๏ธ Repo Configuration & Validation
To keep our codebase pristine and our developers sane, the boilerplate is loaded with automated configuration files and validation scripts. This guide breaks down what they do and where to find them!
๐ค Dependabotโ
Dependabot tirelessly scans our repository for outdated packages and automatically opens PRs to bump them!
- ๐ Location:
.github/dependabot.yml - ๐ Docs: Dependabot Configuration
โก GitHub Workflows (CI/CD)โ
Our automated CI/CD pipelines live in .github/workflows. Out-of-the-box, you get:
- ๐๏ธ
build-and-push.yaml: Builds and pushes the Docker image when a new version is tagged. - โ
pull_request.yaml: Runs tests and linters the moment a PR is opened. - ๐
release-please.yaml: Automates semantic versioning and changelog generation using release-please.
๐ถ Husky (Git Hooks)โ
Husky intercepts your Git commands to enforce quality before code ever hits the server!
pre-commit: Triggerspretty-quickto instantly format your staged files.commit-msg: Triggerscommitlintto ensure your commit message matches our strict MapColonies semantic format.
๐ป VSCode Settingsโ
We commit our .vscode folder to ensure every developer has the exact same editor experience:
- โ๏ธ
settings.json: Enforces LF (\n) line endings, points to the local TypeScript SDK, and forces Prettier as the default formatter. - ๐
launch.json: Pre-configured debugger setups for instant troubleshooting. - ๐งฉ
extensions.json: A curated list of required extensions (like ESLint, Prettier, Docker, and OpenAPI support) that VSCode will prompt you to install.
๐ EditorConfigโ
The .editorconfig file enforces universal formatting rules (like indentation and charset) across any IDE, not just VSCode!
๐ Git Ignore & Attributesโ
.gitignore: Keeps node_modules, build artifacts, and secrets out of version control..gitattributes: Forces Git to strictly handle text files with LF line endings, preventing cross-platform checkout chaos.
๐ฆ NPM & Node Managementโ
.npmrc: Enforces strict package dependency rules and engine versions..nvmrc: Locks down the exact Node.js version required for the project. Just runnvm usein your terminal to instantly switch to the correct version!
โจ Prettier (Formatting)โ
Prettier handles all our code formatting, ensuring the entire codebase looks like it was written by one person.
- ๐ Config:
.prettierrc(Inherits from our shared MapColonies package). - ๐ Run:
npm run format:fix
๐งน ESLint (Linting)โ
ESLint catches bugs and enforces structural best practices in TypeScript.
- ๐ Config:
eslint.config.mjs(Inherits from our shared MapColonies package). - ๐ Run:
npm run lintornpm run lint:fixto auto-resolve issues.
๐ Redocly (OpenAPI Linting)โ
Your API design must be flawless! We use @redocly/cli to strictly lint the OpenAPI specification.
- ๐ Config:
.redocly.yaml - ๐ Run:
npm run lint:openapi
๐ฌ Commitlintโ
Forces your commit messages to follow the Conventional Commits specification, allowing release-please to auto-generate changelogs!
- ๐ Config:
commitlint.config.js
๐๏ธ TSConfigโ
Controls the TypeScript compiler behavior.
tsconfig.json: The base config used heavily by your IDE, linter, and testing suite.tsconfig.build.json: The stricter config used exclusively for compiling production builds.