@@ -3115,7 +3115,6 @@ context('TypeScript', function () {
3115
3115
} ) ,
3116
3116
// Option alphabetize: {order: 'asc'} with type group & path group
3117
3117
test ( {
3118
- // only: true,
3119
3118
code : `
3120
3119
import c from 'Bar';
3121
3120
import a from 'foo';
@@ -3145,7 +3144,6 @@ context('TypeScript', function () {
3145
3144
} ) ,
3146
3145
// Option alphabetize: {order: 'asc'} with path group
3147
3146
test ( {
3148
- // only: true,
3149
3147
code : `
3150
3148
import c from 'Bar';
3151
3149
import type { A } from 'foo';
@@ -3739,6 +3737,36 @@ context('TypeScript', function () {
3739
3737
} ,
3740
3738
] ,
3741
3739
} ) ,
3740
+ // Ensure the rule doesn't choke and die on absolute paths trying to pass NaN around
3741
+ test ( {
3742
+ code : `
3743
+ import fs from 'node:fs';
3744
+
3745
+ import '@scoped/package';
3746
+ import type { B } from 'node:fs';
3747
+
3748
+ import type { A1 } from '/bad/bad/bad/bad';
3749
+ import './a/b/c';
3750
+ import type { A2 } from '/bad/bad/bad/bad';
3751
+ import type { A3 } from '/bad/bad/bad/bad';
3752
+ import type { D1 } from '/bad/bad/not/good';
3753
+ import type { D2 } from '/bad/bad/not/good';
3754
+ import type { D3 } from '/bad/bad/not/good';
3755
+
3756
+ import type { C } from '@something/else';
3757
+
3758
+ import type { E } from './index.js';
3759
+ ` ,
3760
+ ...parserConfig ,
3761
+ options : [
3762
+ {
3763
+ alphabetize : { order : 'asc' } ,
3764
+ groups : [ 'builtin' , 'type' , 'unknown' , 'external' ] ,
3765
+ sortTypesGroup : true ,
3766
+ 'newlines-between' : 'always' ,
3767
+ } ,
3768
+ ] ,
3769
+ } ) ,
3742
3770
) ,
3743
3771
invalid : [ ] . concat (
3744
3772
// Option alphabetize: {order: 'asc'}
0 commit comments