-
Notifications
You must be signed in to change notification settings - Fork 18
CodeStyle
Ilya Azin edited this page Nov 26, 2020
·
2 revisions
Please, don't ignore theese recommendations
-
Use semantic commits
commits:
feature(scope): details
fix(scope): details
refactor(scope): details
- and etc..
-
Use gitflow
branches:
-
feature/{name}
=>dev
-
bugfix/{name}
=>dev
- and etc..
-
- Don't be blinded by
DRY
principleTODO: add comments
- Add comments - only if it's required
- Describe props/types
type TreeItem = {
/** 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
*/
const Tooltip = (props: Props) => {
- Use
css
vars- 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