@@ -1643,63 +1643,6 @@ ruleTester.run('order', rule, {
16431643 message : '`async` import should occur before import of `path`' ,
16441644 } ] ,
16451645 } ) ,
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- } ) ,
17031646 // Mixing require and import should have import up top
17041647 test ( {
17051648 code : `
@@ -2511,7 +2454,7 @@ ruleTester.run('order', rule, {
25112454 { pattern : '@namespace' , group : 'external' , position : 'after' } ,
25122455 { pattern : '@namespace/**' , group : 'external' , position : 'after' } ,
25132456 ] ,
2514- pathGroupsExcludedImportTypes : [ '@namespace' ] ,
2457+ pathGroupsExcludedImportTypes : [ ] ,
25152458 } ,
25162459 ] ,
25172460 errors : [
@@ -3554,38 +3497,6 @@ context('TypeScript', function () {
35543497 } ,
35553498 ] ,
35563499 } ) ,
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- } ) ,
35893500 test ( {
35903501 code : `
35913502 import c from 'Bar';
@@ -6889,7 +6800,7 @@ flowRuleTester.run('order', rule, {
68896800 } ,
68906801 } ,
68916802 ] ,
6892- pathGroupsExcludedImportTypes : [ 'react' ] ,
6803+ pathGroupsExcludedImportTypes : [ ] ,
68936804 alphabetize : {
68946805 order : 'asc' ,
68956806 } ,
0 commit comments