Replies: 3 comments
-
I have the same issue, I added the |
Beta Was this translation helpful? Give feedback.
-
What does the My App can still run even I remove that line. Really dislike the framework implicitly do something for me. |
Beta Was this translation helpful? Give feedback.
-
When you add a route module, typings related to it will be generated in an 'isomorphic' directory Eslint seems not be able to solve this kind of 'import' for now, or it will when you configure the 'import/resolver' properly but I haven't tried yet. Adding |
Beta Was this translation helpful? Give feedback.
-
In my project, I enforce
inline-import
for types. My eslint rules are likeWith these rules, inline type imports like this are allowed:
But top-level type imports are not:
However, when importing
Route
in React Router v7, there seems to be issues resolving paths when using inline type imports. For example:The error disappears if I use a top-level type import:
I want to maintain inline type imports across my project while resolving this issue. I could disable the rules or allow top-level imports, but I prefer to keep the rules consistent.
In the docs, it is mentioned as top level import so I was curious if anyone else faced this issue and there is a good workaround.
Beta Was this translation helpful? Give feedback.
All reactions