Skip to content

Commit

Permalink
Add SpreadElement support to sort-prop-types
Browse files Browse the repository at this point in the history
  • Loading branch information
yannickcr committed May 28, 2018
1 parent 29c248d commit f2d8729
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rules/sort-prop-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ module.exports = {
}

declarations.reduce((prev, curr, idx, decls) => {
if (/SpreadProperty$/.test(curr.type)) {
if (curr.type === 'ExperimentalSpreadProperty' || curr.type === 'SpreadElement') {
return decls[idx + 1];
}

Expand Down

0 comments on commit f2d8729

Please sign in to comment.