So I thought it's a good idea either to create a rule for everyone (IMHO not the best solution) or to create a generic rule in order to cover all cases.
Would it be weird if we have an generic prefix to avoid always type MyPrefixLibName for every member (note that this could be useful if people want to enforce Interfaces or simple Classes to have a prefix)? Something like:
"class": { prefix: "MyPrefixLibName" }
Could prefix option accept an array?
Could suffix option accept an array?
If no suffix is specified it must use the defaults (according to Style guide) or no suffix at all?
Currently we have rules to enforce
component
anddirective
suffixes, but Angular style guide have more rules for the other suffixes:Service
for injectables;Module
for modules;Pipe
for pipes;RoutingModule
for routing modules; (not sure how to detect this isn't a "common" module);So I thought it's a good idea either to create a rule for everyone (IMHO not the best solution) or to create a generic rule in order to cover all cases.
A configuration schema would be:
A standard config based on Angular style guide could be:
"naming-convention": [true]
A sample of custom configuration could be:
... or
Questions:
MyPrefixLibName
for every member (note that this could be useful if people want to enforceInterface
s or simpleClass
es to have a prefix)? Something like:"class": { prefix: "MyPrefixLibName" }
array
?array
?This is based on https://github.com/ajafff/tslint-consistent-codestyle/blob/master/docs/naming-convention.md#examples