Open alko89 opened 1 year ago
it should be configurable to use camelCase or dash or underscore
This is a fairly complex rule that I wouldn't really enforce in my projects. Unlikely to implement this myself.
Happy to accept PR for it though.
Can you give us a hint what the necessary steps would be to implement this?
There is a naming convention rule in the main eslint ruleset you could use for inspiration.
There are a couple of examples in this project of how to detect a nestjs controller and the nestjs api method decorators.
you would have to combine these in some way
Would it be possible to expand the module to use it to enforce rest naming conventions for endpoints?
https://restfulapi.net/resource-naming/
Essentially to check the
Controller
,Get
,Post
,Put
,Delete
.. decorators if a proper naming was used for the endpoint:This PASSES
This FAILS, because the resource is not plural
This PASSES
This FAILS, because camel case was used to name the resource