Skip to main content
Consistent file naming removes ambiguity when navigating a large monorepo. When every contributor follows the same conventions, you can predict a file’s location and purpose before you open it, and tooling such as linters, bundlers, and test runners can apply rules uniformly across the codebase.

General Rules

All files in a Figentra project use kebab-case. The specific suffix you append identifies what role a file plays:
  • TypeScript source files use the plain .ts extension: my-module.ts
  • Unit test files append .test.ts: my-module.test.ts
  • Integration and end-to-end test files append .spec.ts: my-module.spec.ts
  • Index / barrel export files are always named index.ts and form the public API of a package
  • Type definition files append .types.ts: my-module.types.ts
  • Configuration files append .config.ts: my-config.config.ts

File Type Reference

Use the table below as a quick reference when creating new files:

What to Avoid

The following patterns are not permitted in Figentra projects. Avoid them even when working inside a package that predates these standards.

Class and Interface Files

When a file exports a single class or interface, derive the filename from the exported identifier by converting it to kebab-case. The mapping is always one-to-one, so readers can locate the definition without searching.
user-service.ts
Additional examples:

Enforcing Naming in Your Editor

Configure your editor to flag naming violations automatically. If you use ESLint or Oxlint alongside a file-naming plugin (for example, eslint-plugin-filenames-simple), add a rule that enforces kebab-case on all .ts files. Catching violations at save time is faster than reviewing them in CI.