Code Quality Help

File and Folder Names

Angular / TypeScript

  • General:

    • File names must clearly indicate the primary artifact they contain.

    • Avoid redundant words when the type is clear from the extension (e.g., order.service.ts, not order-service.service.ts).

  • Angular-specific:

    • Use kebab-case for all file and directory names.

    • Component: *.component.ts|html|scss (e.g., user-profile.component.ts).

    • Service: *.service.ts.

    • Directive: *.directive.ts.

    • Pipe: *.pipe.ts.

    • Module: *.module.ts.

    • Test files: *.spec.ts (co-located with the source file).

    • Messages: *.executor.ts, '*.event.ts', *.command.ts, *.query.ts

  • C#:

    • Use PascalCase for all file and directory names.

    • One class per file (except small related entities like enums nested inside a class under certain conditions—but generally avoid).

    • File name matches the main class/interface name, PascalCase (e.g., OrderService.cs, IOrderRepository.cs).

  • Folders:

    • Reflect feature or layer names;

    • In Angular, use the kebab-case;

    • in C# use the PascalCase folders.

Acceptable examples:

  • user-profile.component.html

  • auth.service.ts

  • OrderService.cs

  • Core/Interfaces/ILogger.cs

06 мая 2026