Skip to main content

โš™๏ธ 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!

โšก 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: Triggers pretty-quick to instantly format your staged files.
  • commit-msg: Triggers commitlint to 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 run nvm use in 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 lint or npm run lint:fix to 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.