eslint-plugin-no-relative-import-paths
eslint-plugin-no-relative-import-paths copied to clipboard
Feature Request: allowParentFolder option
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.
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
.