Add README.md #29

Open
opened 2026-02-14 13:02:28 +00:00 by aniram · 2 comments
Owner

It should include:

  • requirement for each file to contain a license header - Google's addlicense package
  • requirement for proper indentation of Go, 1 tab, JS, 4 spaces, HTML/CSS, 2 spaces - .editorconfig for IDEs and init.lua files
  • requirement to trim trailing whitespace - init.lua file
  • requirement to abide to coding conventions - English text only, package-level functions should be documented etc
  • requirement to abide to coding guide for JS - Airbnb
  • requirement to write proper commit messages - Angular contribution guide
  • recommendation not to vibe-code contributions
  • recommendation to use Go's goimports and gofmt
  • recommendation to use Git hook that prevents pushing commit with typos - commit-msg file
  • recommendation to read the manifesto
  • instruction on building with Docker/Podman
  • link to domain
  • project description, goals and undesirable outcomes
It should include: - requirement for each file to contain a license header - Google's [addlicense](https://github.com/google/addlicense) package - requirement for proper indentation of Go, 1 tab, JS, 4 spaces, HTML/CSS, 2 spaces - **.editorconfig** for IDEs and **init.lua** files - requirement to trim trailing whitespace - **init.lua** file - requirement to abide to coding conventions - English text only, package-level functions should be documented etc - requirement to abide to coding guide for JS - [Airbnb](https://github.com/airbnb/javascript?tab=readme-ov-file) - requirement to write proper commit messages - [Angular contribution guide](https://github.com/angular/angular/blob/main/contributing-docs/commit-message-guidelines.md) - recommendation not to vibe-code contributions - recommendation to use Go's [goimports](https://pkg.go.dev/golang.org/x/tools/cmd/goimports) and [gofmt](https://pkg.go.dev/cmd/gofmt) - recommendation to use Git hook that prevents pushing commit with typos - **commit-msg** file - recommendation to read the manifesto - instruction on building with Docker/Podman - link to domain - project description, goals and undesirable outcomes
aniram added this to the 2026.1 milestone 2026-02-14 13:02:28 +00:00
aniram self-assigned this 2026-02-14 13:02:28 +00:00
Author
Owner

Go template rule

Go template data i.e. everything that goes inside "{{ }}" should be indented in such a way that if it were removed the HTML inside of it would still be indented properly. So, do not indent the template data extra, treat it like normal HTML, and if it has as children more template data do not indent them either. Who sets the indentation level is always the HTML. HTML is king. In doubt look at the HTML.

E.g.:

<div class="inline-flex items-center gap-x-2">
    {{ if eq .CurrentState.Description "" }}
    <i>Situação atual indefinida</i>
    {{ else }}
    <i>{{.CurrentState.Description}}</i>
    {{ end }}
</div> 

<div class="inline-flex items-center gap-x-2">
    {{ if eq .CurrentState.Description "" }}
        <i>Situação atual indefinida</i>
    {{ else }}
        <i>{{.CurrentState.Description}}</i>
    {{ end }}
</div>

Rationale: Later on the HTML will become hard to read.

**Go template rule** Go template data i.e. everything that goes inside "{{ }}" should be indented in such a way that if it were removed the HTML inside of it would still be indented properly. So, do not indent the template data extra, treat it like normal HTML, and if it has as children more template data do not indent them either. Who sets the indentation level is always the HTML. HTML is king. In doubt look at the HTML. E.g.: ✅ ```html <div class="inline-flex items-center gap-x-2"> {{ if eq .CurrentState.Description "" }} <i>Situação atual indefinida</i> {{ else }} <i>{{.CurrentState.Description}}</i> {{ end }} </div> ``` ❌ ```html <div class="inline-flex items-center gap-x-2"> {{ if eq .CurrentState.Description "" }} <i>Situação atual indefinida</i> {{ else }} <i>{{.CurrentState.Description}}</i> {{ end }} </div> ``` Rationale: Later on the HTML will become hard to read.
Author
Owner

HTML with more than 3 CSS classes rule

Put the class attribute in its own line if the tag has more than 3 CSS classes.

<div class="pl-2 mb-2">
    ...
</div>

<div
    class="text-sm tracking-widest inline-flex items-center gap-x-2"
>
    {{.CurrentState.DateTime | formatDateTime}}
</div>

<div class="bg-cid-card p-5 border-transparent rounded-xl">
 ...
</div>
**HTML with more than 3 CSS classes rule** Put the class attribute in its own line if the tag has more than 3 CSS classes. ✅ ```html <div class="pl-2 mb-2"> ... </div> ``` ✅ ```html <div class="text-sm tracking-widest inline-flex items-center gap-x-2" > {{.CurrentState.DateTime | formatDateTime}} </div> ``` ❌ ```html <div class="bg-cid-card p-5 border-transparent rounded-xl"> ... </div> ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
aniram/cidadon#29
No description provided.