docs: отказаться от FC и interface в пропсах компонентов
All checks were successful
CI/CD Pipeline / docker (push) Successful in 1m41s
CI/CD Pipeline / deploy (push) Successful in 8s

- переписана типизация: type вместо interface, убран FC
- введена система типов: Params + RootAttrs + Props
- добавлены обоснования: почему type, почему не FC, почему types/
- обновлены примеры в components, page-level, templates, documentation
- убраны упоминания FC из таблиц index.md и README
- перегенерированы RULES.md
This commit is contained in:
2026-04-02 16:01:29 +03:00
parent 6ccc4a0d06
commit fbac3e1a55
10 changed files with 91 additions and 189 deletions

View File

@@ -31,7 +31,7 @@ Rules and standards for NextJS and TypeScript development: architecture, typing,
| Code Style | How to format code: indentation, quotes, imports, early return? |
| Naming | How to name files, variables, components, hooks? |
| Documentation | How to write JSDoc: what to document and what not? |
| Typing | How to type: type vs interface, any/unknown, FC? |
| Typing | How to type: type vs interface, any/unknown? |
### Applied Sections
@@ -40,7 +40,7 @@ Rules and standards for NextJS and TypeScript development: architecture, typing,
| Section | Answers the question |
|---------|---------------------|
| Project Structure | How are folders and files organized by FSD? |
| Components | How is a component structured: files, props, clsx, FC? |
| Components | How is a component structured: files, props, clsx? |
| Page-level Components | How to define layout, page, loading, error, not-found? |
| Templates & Code Generation | How do templates work: syntax, variables, modifiers? |
| Styles | How to write CSS: PostCSS Modules, nesting, media, tokens? |