Closed dben89x closed 2 years ago
I do not have publish permissions for the package, but it's now merged. @jakob101 could do a new version deploy if this is an important fix.
Can you describe the importance of this fix @dben89x ? 🙏
@dawsbot yes, it adds the option to omit index files from paths. The usage is explained in further detail here. I'd really like to be able to use this function, since without it I always have to manually delete the index.ts
part of the path on every component import.
For instance, my folder structure is as follows:
FooComponent
index.ts
index.scss
index.test.ts
When attempting to import FooComponent
, I need to import it as ../../../fooFolder/FooComponent
. However, without this omission option, it's always imported as ../../../fooFolder/FooComponent/index.ts
, and I always have to manually delete index.ts
. With the omission option, it omits the index file and just imports ../../../fooFolder/FooComponent
instead.
I think this is a common enough pattern to justify its importance, as is evidenced by the following eslint rule. This is also the default behavior of Atom's popular autocomplete-paths extension.
That's a great feature, thanks for the write-up @dben89x 🙏
I'll see what I can do to publish this
There's a typo in the omitParts configuration option. This fixes that.