website cleanup
This commit is contained in:
@@ -271,6 +271,83 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": ["apps/website/**/*.tsx", "apps/website/**/*.ts"],
|
||||
"rules": {
|
||||
"no-restricted-syntax": [
|
||||
"error",
|
||||
{
|
||||
"selector": "TSInterfaceDeclaration[id.name=/ViewModel$/], TSTypeAliasDeclaration[id.name=/ViewModel$/], TSClassDeclaration[id.name=/ViewModel$/]",
|
||||
"message": "ViewModel types must be defined in apps/website/lib/view-models, not in components."
|
||||
},
|
||||
{
|
||||
"selector": "TSInterfaceDeclaration[id.name=/DTO$/], TSTypeAliasDeclaration[id.name=/DTO$/], TSClassDeclaration[id.name=/DTO$/]",
|
||||
"message": "DTO types are forbidden in website components. Use ViewModels instead."
|
||||
}
|
||||
],
|
||||
"no-restricted-imports": [
|
||||
"error",
|
||||
{
|
||||
"paths": [
|
||||
{
|
||||
"name": "@core/racing",
|
||||
"message": "Imports from @core are forbidden in website components"
|
||||
},
|
||||
{
|
||||
"name": "@core/analytics",
|
||||
"message": "Imports from @core are forbidden in website components"
|
||||
},
|
||||
{
|
||||
"name": "@core/identity",
|
||||
"message": "Imports from @core are forbidden in website components"
|
||||
},
|
||||
{
|
||||
"name": "@core/media",
|
||||
"message": "Imports from @core are forbidden in website components"
|
||||
},
|
||||
{
|
||||
"name": "@core/notifications",
|
||||
"message": "Imports from @core are forbidden in website components"
|
||||
},
|
||||
{
|
||||
"name": "@core/payments",
|
||||
"message": "Imports from @core are forbidden in website components"
|
||||
},
|
||||
{
|
||||
"name": "@core/shared",
|
||||
"message": "Imports from @core are forbidden in website components"
|
||||
},
|
||||
{
|
||||
"name": "@core/social",
|
||||
"message": "Imports from @core are forbidden in website components"
|
||||
},
|
||||
{
|
||||
"name": "@adapters",
|
||||
"message": "Imports from @adapters are forbidden in website components"
|
||||
},
|
||||
{
|
||||
"name": "@api",
|
||||
"message": "Imports from @api are forbidden in website components"
|
||||
}
|
||||
],
|
||||
"patterns": [
|
||||
{
|
||||
"group": ["@core/*"],
|
||||
"message": "Imports from @core are forbidden in website components"
|
||||
},
|
||||
{
|
||||
"group": ["@adapters/*"],
|
||||
"message": "Imports from @adapters are forbidden in website components"
|
||||
},
|
||||
{
|
||||
"group": ["@api/*"],
|
||||
"message": "Imports from @api are forbidden in website components"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user