Code
For both frontend/backend:
- we prefer using:
- our own util functions (if available)
- battle-tested good libraries (with decisions)
- compiler and linter should be without any warnings or errors
- keep code stupid (debugging is twice as hard as coding)
- names should describe well what they are for and adhere to our glossary
- avoid magic numbers (unexplained numeric literals); prefer named constants instead
(enforced partially by ESLint:no-magic-numbers, see eslint configuration) - avoid obviously inefficient code if more efficient solutions are available
(please benchmark or ask in case of doubt)
For frontend:
- don't overuse
useEffect(see You Might Not Need an Effect) - for longer strings such as
classNames, template literals are preferred - keep lines readable
(enforced partially by ESLint:max-len, see eslint configuration)