Skip to content

Commit

Permalink
Issue #1632 - jsx-sort-props: reservedFirst conflicts with callbacksLast
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Daniel Kolpak committed Feb 12, 2018
1 parent fb2fefd commit 5665ced
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/lib/rules/jsx-sort-props.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ const ignoreCaseAndCallbackLastArgs = [{
callbacksLast: true,
ignoreCase: true
}];
const reservedFirstAndCallbacksLastArgs = [{
callbacksLast: true,
reservedFirst: true
}];
const shorthandFirstArgs = [{
shorthandFirst: true
}];
Expand Down Expand Up @@ -307,6 +311,11 @@ ruleTester.run('jsx-sort-props', rule, {
code: '<App key={5} />',
options: reservedFirstAsInvalidArrayArgs,
errors: [expectedInvalidReservedFirstError]
},
{
code: '<App onBar z />;',
options: reservedFirstAndCallbacksLastArgs,
errors: [expectedCallbackError]
}
]
});

0 comments on commit 5665ced

Please sign in to comment.