You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import {…} from '..'
import {…} from '../context'
import {…} from './types'
produces this following error:
error `..` import should occur after import of `./types` import/order
Which is suggesting that my imports look like this:
import {…} from '../context'
import {…} from './types'
import {…} from '..'
If I change the import to instead be import {…} from '../' then I get only the following error:
error Useless path segments for "../", should be ".." import/no-useless-path-segments
On one hand .. is considered part of no order grouping (or index, I can't quite tell which), on the other hand ../ is considered a parent import, except with a "useless" segment.
I'm not sure if I'm misunderstood or missed some part of the documentation but I'm rather confused. I would like .. to group with imports like ../context, since it is equivalent to ../index.
The text was updated successfully, but these errors were encountered:
.. and ../ should both be considered a parent import, for sure.
I agree that either one should be treated as the same import group as ../context, since indeed they're shorthand for ../index (or ../$packageJSONMain, etc).
The relevant rules I have configured:
This code:
produces this following error:
Which is suggesting that my imports look like this:
If I change the import to instead be
import {…} from '../'
then I get only the following error:On one hand
..
is considered part of no order grouping (orindex
, I can't quite tell which), on the other hand../
is considered a parent import, except with a "useless" segment.I'm not sure if I'm misunderstood or missed some part of the documentation but I'm rather confused. I would like
..
to group with imports like../context
, since it is equivalent to../index
.The text was updated successfully, but these errors were encountered: