Przejdź do treści
Biblioteka skilli
Programowanie · Nauka i wyjaśnianie

write-typescript

/write-typescript

Opisuje konwencje TypeScriptu w projekcie: tryb strict, importy typów, nazewnictwo, zakaz any, obietnice i formatowanie.

Repozytorium
codebase ↗
Licencja
MIT
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
7
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

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Opisuje konwencje TypeScriptu w projekcie: tryb strict, importy typów, nazewnictwo, zakaz any, obietnice i formatowanie.

Oryginalny opis (EN)

TypeScript coding conventions for this codebase. Use when writing or modifying TypeScript or TSX files, when TypeScript type errors appear, or when asked about strict mode, type imports, naming conventions, return types, the no-any rule, async functions, floating promises, exhaustive switches, readonly properties, non-null assertions, control-flow style, test typing patterns, Node fs Dirent mock typing, formatting with oxfmt, import group order, enforced alphabetical ordering, the three-parameter limit, or JSDoc on public APIs.

Jak działa

  1. When to Use This Skill
  2. References
  3. Related Skills
  4. Verification
  5. Notes
Sekcje z nagłówków SKILL.md, w oryginale · 53 linii, 309 słów
Podgląd SKILL.md
---
name: write-typescript
description: TypeScript coding conventions for this codebase. Use when writing or modifying TypeScript or TSX files, when TypeScript type errors appear, or when asked about strict mode, type imports, naming conventions, return types, the no-any rule, async functions, floating promises, exhaustive switches, readonly properties, non-null assertions, control-flow style, test typing patterns, Node fs Dirent mock typing, formatting with oxfmt, import group order, enforced alphabetical ordering, the three-parameter limit, or JSDoc on public APIs.
license: MIT
---

# Write TypeScript

All TypeScript projects in this codebase use strict settings. This skill is the entry point and links to focused reference files so guidance stays organized and maintainable.

## When to Use This Skill

Use this skill when:

- Writing or refactoring `.ts` or `.tsx` files
- Fixing TypeScript compile or lint errors
- Reviewing strict-mode type-safety issues
- Standardizing naming, import style, or control-flow patterns
- Writing strict typed tests (including `fs.readdirSync` Dirent mocks)

## References

- [Strict typing](./references/strict-typing.md)
: strict flags, explicit return types, `any` avoidance, `unknown`, promises, exhaustive switches.
- [Naming and imports](./references/naming-and-imports.md)
: identifier naming, abbreviation rules, file naming, type imports, NodeNext `.js` extensions.
- [Class and control flow](./references/class-and-control-flow.md)
: readonly properties, braces, early returns, object shorthand, template literals.
- [Error handling and tests](./references/errors-and-tests.md)
: catch typing, guard-first test narrowing, Node Dirent mock typing pattern.
- [Formatting and ordering](./references/formatting-and-ordering.md)
: `oxfmt` settings, import groups, enforced alphabetical order, the 3-parameter
limit, JSDoc on public APIs.
- [Size limits](./references/size-limits.md)
: file length, function length, block nesting depth, parameter limits, complexity, comment block sizes.

## Related Skills

- [Handle error](../handle-errors/SKILL.md)
- [Write comment](../write-comments/SKILL.md)
- [Validate code](../validate-code/SKILL.md)

## Verification

After TypeScript changes:

```bash
pnpm exec nx run <project>:lint-code --configuration=write
pnpm exec nx run <project>:lint-code --configuration=check
```

## Notes

- Keep this `SKILL.md` concise and discovery-focused.
- Add detailed examples and larger workflows to files under `references/`.
- > ✅ **Best practice:** In NestJS class files such as `*.service.ts`, `*.command.ts`, `*.resolver.ts`, `*.loader.ts`, and `*.module.ts`, keep only imports and the class at top level. Move helper types and interfaces to `*.types.ts`, constants to `*.constants.ts`, and shared initialization logic into class members or dedicated modules.
- > ⚠️ **Warning:** Do not use top-level alias exports or type re-exports from NestJS class files. Import supporting symbols from their source `*.types.ts` or `*.constants.ts` file instead of re-exporting them through the class file.
Pliki w paczce (7)
  • SKILL.md 3 KB
  • references/class-and-control-flow.md 1 KB
  • references/errors-and-tests.md 2 KB
  • references/formatting-and-ordering.md 3 KB
  • references/naming-and-imports.md 2 KB
  • references/size-limits.md 3 KB
  • references/strict-typing.md 3 KB

Wersje

W bazie nie ma innych skilli o nazwie write-typescript.

Migawka bazy z 13.11.2026 · wersja paczki 97912615c986 (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

  • 100typescript-strict
    Wprowadza konwencje ścisłego TypeScript: tryb strict, zakaz any, typy narzędziowe i obsługę błędów.
  • 90typescript-conventions
    Pilnuje konwencji TypeScript w repozytorium przy dodawaniu lub zmianie kodu: ścisłe typowanie, reguły typescript-eslint, poprawność asynchroniczna, walidacja granic zamiast rzutowania i higiena importów.
  • 90google-ts-styleguide
    Podpowiada konwencje z Google TypeScript Style Guide przy pisaniu, przeglądzie i refaktoryzacji kodu TypeScript, w tym nazewnictwo i importy.
  • 90typescript-style
    Opisuje konwencje języka TypeScript i JavaScript: typy w publicznym API, unie zamiast enum, unknown zamiast any, JSDoc i nazewnictwo.
  • 90typescript-guide
    Podpowiada przy edycji i przeglądzie TypeScript w projektach Node.js ESM: funkcje async, wnioskowanie typów, tryb strict, importy ESM i zmienne środowiskowe.
  • 100developing-with-typescript
    Wspiera pisanie kodu w TypeScript 5.x: system typów, generyki, typy pomocnicze i tryb strict.

Uwagi i zgłoszenia

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