@@ -58,6 +58,15 @@ function contextCompare(a, b, options) {
58
58
let aProp = propName ( a ) ;
59
59
let bProp = propName ( b ) ;
60
60
61
+ const aSortToEnd = shouldSortToEnd ( a ) ;
62
+ const bSortToEnd = shouldSortToEnd ( b ) ;
63
+ if ( aSortToEnd && ! bSortToEnd ) {
64
+ return 1 ;
65
+ }
66
+ if ( ! aSortToEnd && bSortToEnd ) {
67
+ return - 1 ;
68
+ }
69
+
61
70
if ( options . reservedFirst ) {
62
71
const aIsReserved = isReservedPropName ( aProp , options . reservedList ) ;
63
72
const bIsReserved = isReservedPropName ( bProp , options . reservedList ) ;
@@ -106,17 +115,6 @@ function contextCompare(a, b, options) {
106
115
return 0 ;
107
116
}
108
117
109
- if ( options . commentbetween ) {
110
- const aSortToEnd = shouldSortToEnd ( a ) ;
111
- const bSortToEnd = shouldSortToEnd ( b ) ;
112
- if ( aSortToEnd && ! bSortToEnd ) {
113
- return 1 ;
114
- }
115
- if ( ! aSortToEnd && bSortToEnd ) {
116
- return - 1 ;
117
- }
118
- }
119
-
120
118
const actualLocale = options . locale === 'auto' ? undefined : options . locale ;
121
119
122
120
if ( options . ignoreCase ) {
@@ -223,7 +221,6 @@ function generateFixerFunction(node, context, reservedList) {
223
221
const noSortAlphabetically = configuration . noSortAlphabetically || false ;
224
222
const reservedFirst = configuration . reservedFirst || false ;
225
223
const locale = configuration . locale || 'auto' ;
226
- const commentbetween = configuration . commentbetween || true ;
227
224
228
225
// Sort props according to the context. Only supports ignoreCase.
229
226
// Since we cannot safely move JSXSpreadAttribute (due to potential variable overrides),
@@ -238,7 +235,6 @@ function generateFixerFunction(node, context, reservedList) {
238
235
reservedFirst,
239
236
reservedList,
240
237
locale,
241
- commentbetween,
242
238
} ;
243
239
const sortableAttributeGroups = getGroupsOfSortableAttributes ( attributes , context ) ;
244
240
const sortedAttributeGroups = sortableAttributeGroups
0 commit comments