Skip to content

Commit 5665ced

Browse files
author
Martin Daniel Kolpak
committed
Issue jsx-eslint#1632 - jsx-sort-props: reservedFirst conflicts with callbacksLast
1 parent fb2fefd commit 5665ced

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/lib/rules/jsx-sort-props.js

+9
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ const ignoreCaseAndCallbackLastArgs = [{
6060
callbacksLast: true,
6161
ignoreCase: true
6262
}];
63+
const reservedFirstAndCallbacksLastArgs = [{
64+
callbacksLast: true,
65+
reservedFirst: true
66+
}];
6367
const shorthandFirstArgs = [{
6468
shorthandFirst: true
6569
}];
@@ -307,6 +311,11 @@ ruleTester.run('jsx-sort-props', rule, {
307311
code: '<App key={5} />',
308312
options: reservedFirstAsInvalidArrayArgs,
309313
errors: [expectedInvalidReservedFirstError]
314+
},
315+
{
316+
code: '<App onBar z />;',
317+
options: reservedFirstAndCallbacksLastArgs,
318+
errors: [expectedCallbackError]
310319
}
311320
]
312321
});

0 commit comments

Comments
 (0)