-
Notifications
You must be signed in to change notification settings - Fork 199
Option request: allow same folder imports (no-relative-import) #493
Comments
May I take on this? If I understand correctly - new option should be created.
|
Absolutely @IllusionMH, thanks for taking this on! I like Edit: yes, what karol-majewski commented! |
"only-arrow-functions": [true, "allow-declarations", "allow-named-functions"] |
@karol-majewski thanks for suggestions. I will use kebab-case. @JoshuaKGoldberg I will implement with |
Sorry for pinging all in this thread, but in the process of implementation I had another question: Should rule allow import { MyComponent } from './subcomponents/sub.component'; when Or it might be another option to the rule? P.S. Its really late here, so I'll hope to submit first WIP PR tomorrow. |
That seems reasonable to allow by default, especially for projects that store assets inline with components: import { closeIcon } from "./my.component/assets"; |
Angular generates specs with same folder imports, like:
So it would be really convenient if rule
no-relative-import
had an option to ignore imports that point to the same folder as the current file, with./
.With this option enabled, the
no-relative-import
rule would still have to report unnecessarily complex same folder imports like./../my/my.component
.The text was updated successfully, but these errors were encountered: