Skip to content

Add options to allow cross imports between slices in "fsd/forbidden-imports" #182

@noveogroup-amorgunov

Description

@noveogroup-amorgunov

Hey! Sometimes I use cross-imports between widgets (any slices in a same layer) and want to describe it in the config like that:

{
  files: [
    'src/widgets/popular-products/*',
  ],
  rules: {
    // 
    'fsd/forbidden-imports': ['off', [
      'src/widgets/base-product-slider/*',
    ]],
  },
},

Could we discuss this option? I know that this violates the FSD, but sometimes is very useful, and now I have to completely turn off the rule for the slice like:

{
  files: [
    'src/widgets/popular-products/*',
  ],
  rules: {
    'fsd/forbidden-imports': 'off',
  },
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions