mirror of
https://github.com/lucasrcsantana/story-generator.git
synced 2025-12-17 05:47:52 +00:00
158 lines
4.1 KiB
Plaintext
158 lines
4.1 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": "absolute-imports",
|
|
"pattern": "from '[./]",
|
|
"message": "Use absolute imports (@/...) instead of 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"
|
|
}
|
|
}
|
|
},
|
|
"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"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
} |