mediamonks / frontend-coding-standards

Media.Monks - Frontend Coding Standards
60 stars 23 forks source link

Strictness of the rule "@typescript-eslint/naming-convention" #59

Closed jesse-mm closed 3 years ago

jesse-mm commented 3 years ago

Can we loosen up this rule a bit ? Especially with TypeScript where most developers prepare a type with a T. Currently this rule will trip over for example TFoo as it not compliance with the naming convention.

ThaNarie commented 3 years ago

where most developers prepare a type with a T Define "most" ? :) In the projects I've been in (some big ones), we haven't used the T prefix once.

So i'd rather change the developers minds, than changing this rule :)

Same discussion was had over the I prefix for interfaces, which we also concluded we shouldn't do that.

Where is TFoo mentioned in our convention? Are you specifically talking about Generic Types btw?

jesse-mm commented 3 years ago

Same discussion was had over the I prefix for interfaces, which we also concluded we shouldn't do that.

Hmm yes you are right, excluding T would make no sense then. I would opt then for documenting that we shouldn't prefix types and interfaces in our coding standards documentation. (although @typescript-eslint/naming-convention will not allow it anyways ;)).

ThijsTyZ commented 3 years ago

You shouldn't use prefixes.

Our Coding Standards does not explicit mention that you shouldn't, so we could add that.

ThijsTyZ commented 3 years ago

Is this still an issue? Or can we close it?

jesse-mm commented 3 years ago

It's not an issue (anymore), we've solved it using updating the documentation. Lets close it whenever the docs PR is merged.