Skip to content

Coding Standarts 🕹️

Sensinki edited this page May 24, 2023 · 5 revisions

Why to have coding standarts?

Having a coding standart is helpful for everyone who wants to use a project. The code has to be clean and understandable. I used Robert C. Martin's book, Clean Code as a guide. It's a guide to producing readable, reusable, and refactorable software in JavaScript.

Maybe not everything is as in the book, but I tried to do my best.

Files and folders

I made a screenshot of the layout of the files, so that can be understood. You can check it from here:

files order

Comments

I made sections with comments. So everyone can understand what I did and where. Also my css is always in order. I usually start from the "display" and continue with "position", "color", "sizes" ... and so on.

comment example 1 comment example 1

Variables names

I wanted to have meaningful names as file names and as variable/property names. That represents more readable code.

const names

CSS resetting

I apply some standart things like padding, margin and fonts...

reset

Root CSS

I also used root for easier and structured work. That made my work more consistent.

custom properties

Sources