eslint-plugin-no-relative-import-paths icon indicating copy to clipboard operation
eslint-plugin-no-relative-import-paths copied to clipboard

Feature Request: allowParentFolder option

Open vittorius opened this issue 1 year ago • 1 comments

Hey, first of all, thanks for the great plugin!

What do you think about having an allowParentFolder option to allow '../Component' imports? It could be particularly useful in tests (e.g. Jest) when you have

Component/
|
|_ __tests__/
       |_ test1.js
       |_ test2.js
|_ index.js
|_ ...

and you want to conveniently import your component from test modules.

Thanks.

vittorius avatar Nov 15 '23 08:11 vittorius

I'd generalise this to something like allowedDepth, which defaults to some value denoting none. This could cover both this feature request and the preexisting allowSameFolder.

samhh avatar Dec 13 '23 11:12 samhh