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
Copy file name to clipboardexpand all lines: tests/src/rules/order.js
+68-50
Original file line number
Diff line number
Diff line change
@@ -5894,53 +5894,56 @@ context('TypeScript', function () {
5894
5894
},
5895
5895
],
5896
5896
}),
5897
-
// Documentation failing example #1 for alphabetize
5898
-
test({
5899
-
code: `
5900
-
import React, { PureComponent } from 'react';
5901
-
import aTypes from 'prop-types';
5902
-
import { compose, apply } from 'xcompose';
5903
-
import * as classnames from 'classnames';
5904
-
import blist2 from 'blist';
5905
-
import blist from 'BList';
5906
-
`,
5907
-
// The reason why this output does not match the success example after being fixed is because eslint will leave overlapping errors alone, so only one import gets reordered when fixes are applied
// Documentation failing example #1 for alphabetize
5900
+
test({
5901
+
code: `
5902
+
import React, { PureComponent } from 'react';
5903
+
import aTypes from 'prop-types';
5904
+
import { compose, apply } from 'xcompose';
5905
+
import * as classnames from 'classnames';
5906
+
import blist2 from 'blist';
5907
+
import blist from 'BList';
5908
+
`,
5909
+
// The reason why this output does not match the success example after being fixed is because eslint will leave overlapping errors alone, so only one import gets reordered when fixes are applied
5910
+
output: `
5911
+
import aTypes from 'prop-types';
5912
+
import React, { PureComponent } from 'react';
5913
+
import { compose, apply } from 'xcompose';
5914
+
import * as classnames from 'classnames';
5915
+
import blist2 from 'blist';
5916
+
import blist from 'BList';
5917
+
`,
5918
+
...parserConfig,
5919
+
options: [
5920
+
{
5921
+
alphabetize: {
5922
+
order: 'asc',
5923
+
caseInsensitive: true,
5924
+
},
5922
5925
},
5923
-
},
5924
-
],
5925
-
errors: [
5926
-
{
5927
-
message: '`prop-types` import should occur before import of `react`',
5928
-
line: 3,
5929
-
},
5930
-
{
5931
-
message: '`classnames` import should occur before import of `react`',
5932
-
line: 5,
5933
-
},
5934
-
{
5935
-
message: '`blist` import should occur before import of `react`',
5936
-
line: 6,
5937
-
},
5938
-
{
5939
-
message: '`BList` import should occur before import of `react`',
5940
-
line: 7,
5941
-
},
5942
-
],
5943
-
}),
5926
+
],
5927
+
errors: [
5928
+
{
5929
+
message: '`prop-types` import should occur before import of `react`',
5930
+
line: 3,
5931
+
},
5932
+
{
5933
+
message: '`classnames` import should occur before import of `react`',
5934
+
line: 5,
5935
+
},
5936
+
{
5937
+
message: '`blist` import should occur before import of `react`',
5938
+
line: 6,
5939
+
},
5940
+
{
5941
+
message: '`BList` import should occur before import of `react`',
5942
+
line: 7,
5943
+
},
5944
+
],
5945
+
}),
5946
+
],
5944
5947
// Documentation failing example #1 for named
5945
5948
test({
5946
5949
code: `
@@ -5972,12 +5975,12 @@ context('TypeScript', function () {
0 commit comments