mirror of
https://github.com/lucasrcsantana/story-generator.git
synced 2025-12-16 13:27:52 +00:00
- Remove pasta /pages/story obsoleta - Consolida componentes de história em /pages/student-dashboard - Mantém consistência na organização de arquivos - Simplifica estrutura de diretórios
199 lines
5.5 KiB
Plaintext
199 lines
5.5 KiB
Plaintext
{
|
|
"name": "Educational Platform Guidelines",
|
|
"version": "1.0.0",
|
|
"rules": {
|
|
"naming": {
|
|
"directories": {
|
|
"pattern": "^[a-z-]+$",
|
|
"message": "Use lowercase with dashes for directories (e.g., components/form-wizard)"
|
|
},
|
|
"components": {
|
|
"pattern": "^[A-Z][a-zA-Z0-9]*\\.tsx?$",
|
|
"message": "Use PascalCase for component files (e.g., VisaForm.tsx)"
|
|
},
|
|
"utilities": {
|
|
"pattern": "^[a-z][a-zA-Z0-9]*\\.ts$",
|
|
"message": "Use camelCase for utility files (e.g., formValidator.ts)"
|
|
},
|
|
"variables": {
|
|
"pattern": "^[a-z][a-zA-Z0-9]*$",
|
|
"message": "Use camelCase for variables and functions"
|
|
}
|
|
},
|
|
"typescript": {
|
|
"rules": [
|
|
{
|
|
"id": "use-interfaces",
|
|
"message": "Prefer interfaces over types"
|
|
},
|
|
{
|
|
"id": "avoid-enums",
|
|
"message": "Use const objects with 'as const' assertion instead of enums"
|
|
},
|
|
{
|
|
"id": "explicit-returns",
|
|
"message": "Use explicit return types for all functions"
|
|
},
|
|
{
|
|
"id": "relative-imports",
|
|
"message": "Use relative imports"
|
|
}
|
|
]
|
|
},
|
|
"security": {
|
|
"patterns": [
|
|
{
|
|
"id": "sensitive-data",
|
|
"pattern": "(password|senha|token|key|secret)",
|
|
"message": "Não exponha dados sensíveis no código"
|
|
},
|
|
{
|
|
"id": "child-safety",
|
|
"pattern": "(idade|age).*(>12|<6)",
|
|
"message": "Verifique restrições de idade (6-12 anos)"
|
|
}
|
|
]
|
|
},
|
|
"accessibility": {
|
|
"patterns": [
|
|
{
|
|
"id": "alt-text",
|
|
"pattern": "<img(?!.*alt=)[^>]*>",
|
|
"message": "Imagens devem ter texto alternativo (alt)"
|
|
},
|
|
{
|
|
"id": "aria-labels",
|
|
"pattern": "<button(?!.*aria-label)[^>]*>",
|
|
"message": "Botões devem ter aria-label quando não têm texto"
|
|
}
|
|
]
|
|
},
|
|
"performance": {
|
|
"patterns": [
|
|
{
|
|
"id": "large-images",
|
|
"pattern": "unsplash.com/.*w=(\\d{4,})",
|
|
"message": "Evite imagens muito grandes (max 1200px)"
|
|
},
|
|
{
|
|
"id": "memo-usage",
|
|
"pattern": "React.memo\\(",
|
|
"message": "Verifique se o uso de memo é necessário"
|
|
}
|
|
]
|
|
},
|
|
"styling": {
|
|
"patterns": [
|
|
{
|
|
"id": "tailwind-classes",
|
|
"pattern": "className=\"[^\"]{150,}\"",
|
|
"message": "Considere extrair classes Tailwind longas para componentes"
|
|
},
|
|
{
|
|
"id": "color-consistency",
|
|
"pattern": "text-(purple|green|orange|blue|yellow)",
|
|
"message": "Use cores consistentes com a paleta definida"
|
|
}
|
|
]
|
|
},
|
|
"content": {
|
|
"patterns": [
|
|
{
|
|
"id": "child-friendly",
|
|
"pattern": "(violência|morte|guerra|violento)",
|
|
"message": "Evite conteúdo inadequado para crianças"
|
|
},
|
|
{
|
|
"id": "educational-focus",
|
|
"pattern": "(educativo|educacional|aprendizado|ensino)",
|
|
"message": "Priorize conteúdo educacional e construtivo"
|
|
}
|
|
]
|
|
},
|
|
"git": {
|
|
"commit_prefixes": [
|
|
"fix:",
|
|
"feat:",
|
|
"perf:",
|
|
"docs:",
|
|
"style:",
|
|
"refactor:",
|
|
"test:",
|
|
"chore:"
|
|
],
|
|
"commit_rules": {
|
|
"pattern": "^(fix|feat|perf|docs|style|refactor|test|chore): [a-z].*$",
|
|
"message": "Use proper commit message format with prefix"
|
|
},
|
|
"changelog_rules": {
|
|
"required": true,
|
|
"message": "Atualize o CHANGELOG.md antes de fazer commit",
|
|
"format": {
|
|
"header": [
|
|
"# Changelog",
|
|
"",
|
|
"Todas as mudanças notáveis neste projeto serão documentadas neste arquivo.",
|
|
"",
|
|
"O formato é baseado em [Keep a Changelog](https://keepachangelog.com/pt-BR/1.0.0/),",
|
|
"e este projeto adere ao [Semantic Versioning](https://semver.org/lang/pt-BR/).",
|
|
""
|
|
],
|
|
"version_pattern": "^## \\[(\\d+\\.\\d+\\.\\d+)\\] - \\d{4}-\\d{2}-\\d{2}$",
|
|
"version_message": "Use o formato '## [X.Y.Z] - YYYY-MM-DD' para versões"
|
|
},
|
|
"patterns": [
|
|
{
|
|
"id": "added",
|
|
"pattern": "### Adicionado",
|
|
"message": "Use '### Adicionado' para novos recursos"
|
|
},
|
|
{
|
|
"id": "modified",
|
|
"pattern": "### Modificado",
|
|
"message": "Use '### Modificado' para mudanças em funcionalidades existentes"
|
|
},
|
|
{
|
|
"id": "technical",
|
|
"pattern": "### Técnico",
|
|
"message": "Use '### Técnico' para mudanças técnicas/internas"
|
|
},
|
|
{
|
|
"id": "semantic_version",
|
|
"pattern": "^(major|minor|patch):",
|
|
"message": "Indique o tipo de mudança: major (quebra compatibilidade), minor (novo recurso) ou patch (correção)"
|
|
}
|
|
],
|
|
"verify_files": [
|
|
"CHANGELOG.md"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"ignoreFiles": [
|
|
"node_modules/**",
|
|
"dist/**",
|
|
"build/**",
|
|
".git/**",
|
|
"*.test.*",
|
|
"*.spec.*"
|
|
],
|
|
"documentation": {
|
|
"required": [
|
|
"README.md",
|
|
"API.md",
|
|
"CHANGELOG.md"
|
|
],
|
|
"rules": [
|
|
{
|
|
"id": "readme-sections",
|
|
"required": [
|
|
"Setup Instructions",
|
|
"Development Workflow",
|
|
"Testing",
|
|
"Security",
|
|
"Contributing"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
} |