-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Via Bulletproof react:
https://github.com/alan2207/bulletproof-react/blob/master/docs/project-structure.md
(Extract copied from the link above ☝️ )
Everything from a feature should be exported from the index.ts file which behaves as the public API of the feature.
You should import stuff from other features only by using:
import {AwesomeComponent} from "@/features/awesome-feature"
and not
import {AwesomeComponent} from "@/features/awesome-feature/components/AwesomeComponent
This can also be configured in the ESLint configuration to disallow the later import by the following rule:
{
rules: {
'no-restricted-imports': [
'error',
{
patterns: ['@/features/*/*'],
},
],
// ...rest of the configuration
}
Metadata
Metadata
Assignees
Labels
No labels