Skip to content

Commit a8ab646

Browse files
Xunnamiusljharb
authored andcommitted
test: fix erroneously invalid options in "valid" tests identified by stricter schema
1 parent 9900388 commit a8ab646

File tree

2 files changed

+3
-35
lines changed

2 files changed

+3
-35
lines changed

src/rules/order.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -997,7 +997,7 @@ module.exports = {
997997
{
998998
properties: {
999999
sortTypesGroup: { enum: [false] },
1000-
}
1000+
},
10011001
},
10021002
],
10031003
},

tests/src/rules/order.js

+2-34
Original file line numberDiff line numberDiff line change
@@ -2511,7 +2511,7 @@ ruleTester.run('order', rule, {
25112511
{ pattern: '@namespace', group: 'external', position: 'after' },
25122512
{ pattern: '@namespace/**', group: 'external', position: 'after' },
25132513
],
2514-
pathGroupsExcludedImportTypes: ['@namespace'],
2514+
pathGroupsExcludedImportTypes: [],
25152515
},
25162516
],
25172517
errors: [
@@ -3554,38 +3554,6 @@ context('TypeScript', function () {
35543554
},
35553555
],
35563556
}),
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-
}),
35893557
test({
35903558
code: `
35913559
import c from 'Bar';
@@ -6877,7 +6845,7 @@ flowRuleTester.run('order', rule, {
68776845
},
68786846
},
68796847
],
6880-
pathGroupsExcludedImportTypes: ['react'],
6848+
pathGroupsExcludedImportTypes: [],
68816849
alphabetize: {
68826850
order: 'asc',
68836851
},

0 commit comments

Comments
 (0)