Przejdź do treści
Biblioteka skilli
Programowanie · Budowanie i kod

formatting

/formatting

Stosuje konwencje Esposter dotyczące odstępów i komentarzy w plikach: gdzie wstawiać puste linie oraz co komentarz mówi i gdzie się znajduje.

Repozytorium
Esposter ↗
Licencja
Apache-2.0
Ostatnia zmiana repozytorium
26.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
6
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 26.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

Co robi i kiedy

Stosuje konwencje Esposter dotyczące odstępów i komentarzy w plikach: gdzie wstawiać puste linie oraz co komentarz mówi i gdzie się znajduje.

Wyzwalacze z opisu

s whitespace or comments. Esposter
Oryginalny opis (EN)

Apply when writing or editing any file's whitespace or comments. Esposter's spacing and comment conventions — where blank lines go, and what a comment says and where it sits.

Jak działa

  1. Blank Lines
  2. Object Literals
  3. Comments
  4. Line Endings
  5. Deep Dives
Sekcje z nagłówków SKILL.md, w oryginale · 41 linii, 617 słów
Podgląd SKILL.md
---
name: formatting
description: Apply when writing or editing any file's whitespace or comments. Esposter's spacing and comment conventions — where blank lines go, and what a comment says and where it sits.
---

# Formatting

Cross-cutting whitespace and comment rules for all files. Language/framework-specific structure lives in `vue`, `typescript`, `file-organization`; how to write a skill doc lives in `skill-authoring`. This skill owns only spacing and comments.

## Blank Lines

- **No blank lines between consecutive `const` assignments** — group them tightly.
- **No blank line before a `return`** that immediately follows a `const` in a small function (including composables that return a function directly — `return` follows the last setup line with no gap).
- **Blank line after a closing `}`** of an `if`/`for`/block statement — unless it is the last statement in its scope or immediately followed by another opening block. (Exception: consecutive top-level `watch`/lifecycle-hook registrations in a Vue `<script setup>` each get a blank line between them — the `vue` skill, `references/lifecycle-and-ssr.md`.)
- **Blank line between an SFC's top-level blocks** — enforced and autofixed by `vue/padding-line-between-blocks`, so it survives a comment deleted from a block boundary without anyone having to remember it.
- **No blank lines within Vue templates.** A blank line inserted to visually separate template sections is a smell that the component owns more than one responsibility — extract each section into its own focused child component rather than spacing them apart. See the `vue-page-composition` skill (`references/granularity.md`).
- **Imports** — order and blank lines are autofixed by `perfectionist/sort-imports` (`packages/configuration/eslint/plugins/perfectionist.js`); `vp run lint:fix` settles it. `internalPattern: []` is what collapses every source (`external-pkg`, `#shared`, `@vueuse/*`, `@/`) into one bucket per kind, so the fixer produces a contiguous `import type` group, one blank line, then a contiguous value group. Don't hand-place import blank lines.

## Object Literals

An object literal that fits the width is on one line — `oxfmt`'s `objectWrap: "collapse"` decides it, and an inline snapshot is the one place it does not reach (`references/object-literals.md`).

## Comments

- **`comments/no-trailing-comment` enforces that a `//` comment sits on its own line _above_ the code it describes.** Own-line comments read consistently, survive the capitalization hook, and don't push lines past the width limit. The rule passes the two shapes that share a line by design: a same-line disable directive, and the comment the formatter itself hangs after a ternary's `?` or `:`.
- **No blank line before or after a `//` comment** — it attaches to its code and is the separator, at module scope too; consecutive `//` lines are one block, and deleting a leading comment puts its blank line back. Test files keep theirs (`references/comment-placement.md`).
- **Comment only _exceptional_ behaviour** — never restate a convention a skill or doc already holds (`references/comment-content.md`).
- **Comments describe the present, never the history**; git is the changelog (`references/comment-content.md`).
- **A comment explains the code, never the change that produced it** (`references/comment-content.md`).
- **`/** */` is for an exported API surface and a module-scope paragraph, `//` for everything else** (`references/doc-blocks.md`).
- **Tight and generic** — no baked-in example values; an actual error text a workaround addresses is kept (`references/comment-content.md`).
- **Don't fight `eslint(capitalized-comments)`** — after a rewrap, move an identifier off the line front and re-read the joined sentence (`comments/no-capitalized-identifier`, `references/capitalized-comments.md`).

## Line Endings

- Enforced by `.gitattributes` (`* text=auto eol=lf` — every text file checks out LF whatever "core.autocrlf" says on the machine; `.bat`/`.cmd`/`.ps1` are deliberately `crlf`) and settled by `oxfmt` (`pnpm format`). Never hand-convert line endings.

## Deep Dives

- `references/comment-placement.md` — when placing a comment against its code, a blank line, another comment, or in a test file.
- `references/comment-content.md` — when writing or reviewing what a comment says.
- `references/doc-blocks.md` — when choosing between `/** */` and `//`.
- `references/object-literals.md` — when an object literal could fit one line, or sits in an inline snapshot.
- `references/capitalized-comments.md` — when `capitalized-comments` fires, or after rewrapping a comment block.
Pliki w paczce (6)
  • SKILL.md 5 KB
  • references/capitalized-comments.md 4 KB
  • references/comment-content.md 5 KB
  • references/comment-placement.md 3 KB
  • references/doc-blocks.md 1 KB
  • references/object-literals.md 1 KB

Wersje

RepozytoriumWynikLicencja
Ta strona · Esposter/Esposter100Apache-2.0
kbluck/agent-resources100MIT

Migawka bazy z 13.11.2026 · wersja paczki c9c5f7f9d0cd (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 90typescript
    Określa konwencje TypeScript projektu Esposter, które obowiązują przy pisaniu każdego kodu w tym projekcie.
  • 90testing
    Stosuje konwencje Vitest z projektu Esposter przy pisaniu plików .test.ts i .test-d.ts oraz decyzję, co w ogóle zasługuje na test.
  • 100coding
    Podaje niezależne od języka konwencje kodowania dotyczące jakości kodu, komentarzy, obsługi błędów i formatowania; konwencje projektu mają pierwszeństwo.
  • 100debug-formatter
    Pomaga znaleźć błąd w formatterze SQL, gdy ktoś zgłasza nieprawidłowe formatowanie, na przykład złe odstępy, źle umieszczone komentarze albo puste linie.
  • 100write-comments
    Stosuje konwencje komentarzy w kodzie TypeScript, Pythonie i innych językach: kiedy komentować, jak podpisywać sekcje i czego unikać.
  • 100comments-docs
    Ocenia jakość komentarzy i praktyk dokumentacyjnych: cztery typy komentarzy, kolejność komentarze najpierw oraz psucie się komentarzy z czasem.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.