Skip to content

Add configuration option to generate files with PascalCase instead of the default naming convention #462

Closed
@bbenoist

Description

@bbenoist

I'm submitting a...

  • Feature request

Current behavior

As of now, if I generate a new file with nest g, its is named name.type.ts (e.g. my.module.ts).

I'd like the tool to create a file named NameType.ts (e.g. MyModule.ts) so that it matches the name of the class it contains.

Expected behavior

Ideally, a fileNameCase configuration option in nest-cli.json of type "dot" | "pascal" | "camel" | "snake" | "kebab" would be nice.

Minimal reproduction of the problem with instructions

nest g mo my generates a file named my.module.ts

What is the motivation / use case for changing the behavior?

All of my company source files are named with the same name as the classes that they include. It's a common convention we see in a lot of OOP projects.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions