We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm not sure if there is a term for this, and describing it is a bit awkward, but I'll give it a shot.
Let's say you have a directory structure like:
/foo/bar/baz.js /foo/bar/boop.js
In baz.js you want to import boop.js. Normally you would write it like this:
import boop from './boop';
However, if you aren't paying attention, especially when moving code around, you might end up doing something like this instead:
import boop from '../bar/boop';
Or in a more deeply nested structure, you might end up with something like this that overshoots its target:
import boop from '../../../bar/boop';
It would be really great to have a rule that warns against these.
The text was updated successfully, but these errors were encountered:
Perhaps if a relative import path does not match path.normalize() of that path, it warns?
path.normalize()
Sorry, something went wrong.
@ljharb Dupe of #471?
Indeed, this is a duplicate of #471.
No branches or pull requests
I'm not sure if there is a term for this, and describing it is a bit awkward, but I'll give it a shot.
Let's say you have a directory structure like:
In baz.js you want to import boop.js. Normally you would write it like this:
However, if you aren't paying attention, especially when moving code around, you might end up doing something like this instead:
Or in a more deeply nested structure, you might end up with something like this that overshoots its target:
It would be really great to have a rule that warns against these.
The text was updated successfully, but these errors were encountered: