Skip to content

Introduction

Linting for your entire repository. Not just code.

ESLint checks your code. Prettier formats it. But what checks your repository structure?

Repotype is a repo-level linter that enforces:

  • 📁 Folder structure — required directories, allowlists, path patterns
  • 📋 File standards — naming conventions, required files, JSON/YAML schemas
  • 📝 Documentation quality — frontmatter schemas, required sections, template detection

Prevent Drift

Stop files from ending up in random places. Enforce where things belong.

Consistent Standards

Every markdown file has proper frontmatter. Every config file matches the schema.

CI-Ready

Validate in pre-commit hooks and CI pipelines. Catch issues before merge.

Auto-Fix

Many violations can be automatically fixed. Rename files, add missing sections.

  1. Define your repository contract in repotype.yaml
  2. Validate with repotype validate . — locally or in CI
  3. Fix violations with repotype fix .
  4. Report compliance with repotype report .
Terminal window
$ npx repotype validate .
docs/guide.md missing required frontmatter
src/Utils.ts should be kebab-case
config/ missing required README.md
$ npx repotype fix .
Fixed 3 issues
$ npx repotype validate .
All 142 files valid. Repository standards enforced.
repotype.yaml
version: "1"
folders:
- id: src-root
path: src
requiredFolders: [components, utils, hooks]
pathCase: kebab
files:
- id: typescript-files
glob: "src/**/*.ts"
pathCase: kebab
- id: markdown-docs
glob: "docs/**/*.md"
frontmatter:
required: [title, description]
- id: package-json
glob: "package.json"
schema:
kind: json
schema: schemas/package.schema.json