2024-10-20 21:20:19 +03:00
|
|
|
{
|
|
|
|
"$schema": "../../node_modules/eslint-plugin-project-structure/folderStructure.schema.json",
|
2024-10-28 14:06:58 +03:00
|
|
|
"projectRoot": "packages/twenty-front",
|
|
|
|
"structureRoot": "src",
|
2024-10-20 21:20:19 +03:00
|
|
|
"regexParameters": {
|
2024-10-28 14:06:58 +03:00
|
|
|
"camelCase": "^[a-z]+([A-Za-z0-9]+)+",
|
|
|
|
"kebab-case": "[a-z][a-z0-9]*(?:-[a-z0-9]+)*"
|
2024-10-20 21:20:19 +03:00
|
|
|
},
|
|
|
|
"structure": [
|
2024-10-28 14:06:58 +03:00
|
|
|
{ "name": "*" },
|
|
|
|
{ "name": "*", "children": [] },
|
|
|
|
{ "name": "modules", "ruleId": "modulesFolderRule" }
|
2024-10-20 21:20:19 +03:00
|
|
|
],
|
|
|
|
"rules": {
|
2024-10-28 14:06:58 +03:00
|
|
|
"modulesFolderRule": {
|
|
|
|
"children": [
|
|
|
|
{ "ruleId": "moduleFolderRule" },
|
|
|
|
{ "name": "types", "children": [] }
|
|
|
|
]
|
|
|
|
},
|
|
|
|
|
2024-10-20 21:20:19 +03:00
|
|
|
"moduleFolderRule": {
|
2024-10-28 14:06:58 +03:00
|
|
|
"name": "{kebab-case}",
|
2024-10-20 21:20:19 +03:00
|
|
|
"folderRecursionLimit": 6,
|
|
|
|
"children": [
|
|
|
|
{ "ruleId": "moduleFolderRule" },
|
|
|
|
{ "name": "hooks", "ruleId": "hooksLeafFolderRule" },
|
|
|
|
{ "name": "utils", "ruleId": "utilsLeafFolderRule" },
|
2024-10-28 14:06:58 +03:00
|
|
|
{ "name": "states", "children": [] },
|
|
|
|
{ "name": "types", "children": [] },
|
|
|
|
{ "name": "graphql", "children": [] },
|
|
|
|
{ "name": "components", "children": [] },
|
|
|
|
{ "name": "effect-components", "children": [] },
|
|
|
|
{ "name": "constants", "children": [] },
|
|
|
|
{ "name": "validation-schemas", "children": [] },
|
|
|
|
{ "name": "contexts", "children": [] },
|
|
|
|
{ "name": "scopes", "children": [] },
|
|
|
|
{ "name": "services", "children": [] },
|
|
|
|
{ "name": "errors", "children": [] }
|
2024-10-20 21:20:19 +03:00
|
|
|
]
|
|
|
|
},
|
2024-10-28 14:06:58 +03:00
|
|
|
|
2024-10-20 21:20:19 +03:00
|
|
|
"hooksLeafFolderRule": {
|
|
|
|
"folderRecursionLimit": 2,
|
|
|
|
"children": [
|
|
|
|
{ "name": "use{PascalCase}.(ts|tsx)" },
|
|
|
|
{
|
|
|
|
"name": "__tests__",
|
|
|
|
"children": [{ "name": "use{PascalCase}.test.(ts|tsx)" }]
|
|
|
|
},
|
|
|
|
{ "name": "internal", "ruleId": "hooksLeafFolderRule" }
|
|
|
|
]
|
|
|
|
},
|
2024-10-28 14:06:58 +03:00
|
|
|
|
2024-10-20 21:20:19 +03:00
|
|
|
"utilsLeafFolderRule": {
|
|
|
|
"children": [
|
|
|
|
{ "name": "{camelCase}.ts" },
|
|
|
|
{
|
|
|
|
"name": "__tests__",
|
|
|
|
"children": [{ "name": "{camelCase}.test.ts" }]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|