Created
March 30, 2022 14:38
-
-
Save sergeysova/c39e7425fcba303e5fcb6fa16d882eb6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
forbidden: [ | |
{ | |
name: "no-pages-on-pages", | |
severity: "warn", | |
comment: "Page MUST not depends on another page.", | |
from: { path: "^src/pages/([^/]+)/?.+", pathNot: "^src/pages/(routes|paths).ts" }, | |
to: { path: "^src/pages/(?!$1)/?.+", pathNot: "^src/pages/(routes|paths).ts" }, | |
}, | |
{ | |
name: "no-widgets-on-widgets", | |
severity: "warn", | |
comment: "One widget MUST not depends on another widget.", | |
from: { path: "^src/widgets/([^/]+)/?.+" }, | |
to: { path: "^src/widgets/(?!$1)/?.+" }, | |
}, | |
{ | |
name: "no-features-on-features", | |
severity: "warn", | |
comment: "One feature MUST not depends on another feature.", | |
from: { path: "^src/features/([^/]+)/?.+" }, | |
to: { path: "^src/features/(?!$1)/?.+" }, | |
}, | |
{ | |
name: "no-entities-on-entities", | |
severity: "warn", | |
comment: "One entity MUST not depends on another entity.", | |
from: { path: "^src/entities/([^/]+)/?.+" }, | |
to: { path: "^src/entities/(?!$1)/?.+" }, | |
}, | |
// --------------------------------------------------------------------------------------------- | |
{ | |
name: "no-processes-on-high-level", | |
severity: "warn", | |
comment: "Processes MUST not depends on high level layers.", | |
from: { path: "^src/processes/([^/]+)/?.+" }, | |
to: { path: "^src/app/([^/]+)/?.+" }, | |
}, | |
{ | |
name: "no-pages-on-high-level", | |
severity: "warn", | |
comment: "Pages MUST not depends on high level layers.", | |
from: { path: "^src/pages/([^/]+)/?.+" }, | |
to: { | |
path: "^src/(app|processes)/([^/]+)/?.+", | |
}, | |
}, | |
{ | |
name: "no-widgets-on-high-level", | |
severity: "warn", | |
comment: "Widgets MUST not depends on high level layers.", | |
from: { path: "^src/widgets/([^/]+)/?.+" }, | |
to: { | |
path: "^src/(app|processes|pages)/([^/]+)/?.+", | |
pathNot: "^src/pages/(routes|paths).ts", | |
}, | |
}, | |
{ | |
name: "no-features-on-high-level", | |
severity: "warn", | |
comment: "Features MUST not depends on high level layers.", | |
from: { path: "^src/features/([^/]+)/?.+" }, | |
to: { | |
path: "^src/(app|processes|pages|widgets)/([^/]+)/?.+", | |
pathNot: "^src/pages/(routes|paths).ts", | |
}, | |
}, | |
{ | |
name: "no-entities-on-high-level", | |
severity: "warn", | |
comment: "Entities MUST not depends on high level layers.", | |
from: { path: "^src/entities/([^/]+)/?.+" }, | |
to: { path: "^src/(app|processes|pages|widgets|features)/([^/]+)/?.+" }, | |
}, | |
{ | |
name: "no-shared-on-high-level", | |
severity: "warn", | |
comment: "Shared MUST not depends on high level layers.", | |
from: { path: "^src/shared/([^/]+)/?.+" }, | |
to: { path: "^src/(app|processes|pages|widgets|features|entities)/([^/]+)/?.+" }, | |
}, | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment