Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 19
CodeStyle
Ilya Azin edited this page Nov 26, 2020
·
2 revisions
Please, don't ignore theese recommendations
Use semantic commits
commits:
feature(scope): detailsfix(scope): detailsrefactor(scope): details- and etc..
Use gitflow
branches:
feature/{name}=>devbugfix/{name}=>dev- and etc..
- Don't be blinded by
DRYprincipleTODO: add comments
- Add comments - only if it's required
- Describe props/types
typeTreeItem={/** Unique identifier */id: TreeNodeId;/** Name */name: string;/** Amount of related items */count: number;/** Parent identifier */parentId?: TreeNodeId;}- Use
tsdoc-like style
/** * Tooltip * @remark If you should not specify `title` props - tooltip'll be invisible */constTooltip=(props: Props)=>{- Use
cssvars- specially - with work with colors
- not only on app level, also at component's level
.app {
--clr-base:#4d97fd;
--clr-base-hover:#4d97fd1f;
...
}ANI Team, 2020