Clean Code, SOLID, composition, refactoring and TDD: the principles that help while writing frontend code.