@@ -1643,63 +1643,6 @@ ruleTester.run('order', rule, {
1643
1643
message : '`async` import should occur before import of `path`' ,
1644
1644
} ] ,
1645
1645
} ) ,
1646
- // Setting the order for an unknown type
1647
- // should make the rule trigger an error and do nothing else
1648
- test ( {
1649
- code : `
1650
- var async = require('async');
1651
- var index = require('./');
1652
- ` ,
1653
- options : [ { groups : [
1654
- 'index' ,
1655
- [ 'sibling' , 'parent' , 'UNKNOWN' , 'internal' ] ,
1656
- ] } ] ,
1657
- errors : [ {
1658
- message : 'Incorrect configuration of the rule: Unknown type `"UNKNOWN"`' ,
1659
- } ] ,
1660
- } ) ,
1661
- // Type in an array can't be another array, too much nesting
1662
- test ( {
1663
- code : `
1664
- var async = require('async');
1665
- var index = require('./');
1666
- ` ,
1667
- options : [ { groups : [
1668
- 'index' ,
1669
- [ 'sibling' , 'parent' , [ 'builtin' ] , 'internal' ] ,
1670
- ] } ] ,
1671
- errors : [ {
1672
- message : 'Incorrect configuration of the rule: Unknown type `["builtin"]`' ,
1673
- } ] ,
1674
- } ) ,
1675
- // No numbers
1676
- test ( {
1677
- code : `
1678
- var async = require('async');
1679
- var index = require('./');
1680
- ` ,
1681
- options : [ { groups : [
1682
- 'index' ,
1683
- [ 'sibling' , 'parent' , 2 , 'internal' ] ,
1684
- ] } ] ,
1685
- errors : [ {
1686
- message : 'Incorrect configuration of the rule: Unknown type `2`' ,
1687
- } ] ,
1688
- } ) ,
1689
- // Duplicate
1690
- test ( {
1691
- code : `
1692
- var async = require('async');
1693
- var index = require('./');
1694
- ` ,
1695
- options : [ { groups : [
1696
- 'index' ,
1697
- [ 'sibling' , 'parent' , 'parent' , 'internal' ] ,
1698
- ] } ] ,
1699
- errors : [ {
1700
- message : 'Incorrect configuration of the rule: `parent` is duplicated' ,
1701
- } ] ,
1702
- } ) ,
1703
1646
// Mixing require and import should have import up top
1704
1647
test ( {
1705
1648
code : `
@@ -2511,7 +2454,7 @@ ruleTester.run('order', rule, {
2511
2454
{ pattern : '@namespace' , group : 'external' , position : 'after' } ,
2512
2455
{ pattern : '@namespace/**' , group : 'external' , position : 'after' } ,
2513
2456
] ,
2514
- pathGroupsExcludedImportTypes : [ '@namespace' ] ,
2457
+ pathGroupsExcludedImportTypes : [ ] ,
2515
2458
} ,
2516
2459
] ,
2517
2460
errors : [
@@ -3554,38 +3497,6 @@ context('TypeScript', function () {
3554
3497
} ,
3555
3498
] ,
3556
3499
} ) ,
3557
- // Option sortTypesGroup: true and 'type' omitted from groups
3558
- test ( {
3559
- code : `
3560
- import c from 'Bar';
3561
- import type { AA } from 'abc';
3562
- import a from 'foo';
3563
- import type { A } from 'foo';
3564
-
3565
- import type { C } from 'dirA/Bar';
3566
- import b from 'dirA/bar';
3567
- import type { D } from 'dirA/bar';
3568
-
3569
- import index from './';
3570
- ` ,
3571
- ...parserConfig ,
3572
- options : [
3573
- {
3574
- alphabetize : { order : 'asc' } ,
3575
- groups : [ 'external' , 'internal' , 'index' ] ,
3576
- pathGroups : [
3577
- {
3578
- pattern : 'dirA/**' ,
3579
- group : 'internal' ,
3580
- } ,
3581
- ] ,
3582
- 'newlines-between' : 'always' ,
3583
- pathGroupsExcludedImportTypes : [ ] ,
3584
- // Becomes a no-op without "type" in groups
3585
- sortTypesGroup : true ,
3586
- } ,
3587
- ] ,
3588
- } ) ,
3589
3500
test ( {
3590
3501
code : `
3591
3502
import c from 'Bar';
@@ -6889,7 +6800,7 @@ flowRuleTester.run('order', rule, {
6889
6800
} ,
6890
6801
} ,
6891
6802
] ,
6892
- pathGroupsExcludedImportTypes : [ 'react' ] ,
6803
+ pathGroupsExcludedImportTypes : [ ] ,
6893
6804
alphabetize : {
6894
6805
order : 'asc' ,
6895
6806
} ,
0 commit comments