refactor: привести проект к стайлгайду

- Убран FC из всех шаблонов и компонентов
- Заменён interface на type, .interface.ts на .type.ts
- Добавлен паттерн Params/Props/RootAttrs в типы
- Деструктуризация пропсов перенесена в тело компонента
- Добавлены styles/ и types/ для feature, entity, widget, screen
- Добавлен расширенный JSDoc-шаблон с назначением и сценариями
- Исправлен баг в index.ts шаблона component
- Добавлены .editorconfig, .env.example
- Добавлен organizeImports.biome в .vscode/settings.json
- Исправлен .gitignore для .env.example
- Переписан README под проект-шаблон
- Удалён CLAUDE.md
This commit is contained in:
2026-04-02 17:01:22 +03:00
parent 9e2167b34d
commit 7382499886
24 changed files with 212 additions and 71 deletions

View File

@@ -1,13 +1,19 @@
import type { FC } from 'react'
import type { {{name.pascalCase}}LayoutProps } from './types/{{name.kebabCase}}.interface'
import cl from 'clsx'
import type { {{name.pascalCase}}LayoutProps } from './types/{{name.kebabCase}}.type'
import styles from './styles/{{name.kebabCase}}.module.css'
/**
* Layout {{name.pascalCase}}.
* <Назначение layout {{name.pascalCase}} в 1 строке>.
*
* Используется для:
* - <сценарий 1>
* - <сценарий 2>
*/
export const {{name.pascalCase}}Layout: FC<{{name.pascalCase}}LayoutProps> = ({ children }) => {
export const {{name.pascalCase}}Layout = (props: {{name.pascalCase}}LayoutProps) => {
const { children, className, ...htmlAttr } = props
return (
<div className={styles.root}>
<div {...htmlAttr} className={cl(styles.root, className)}>
{children}
</div>
)