From f2d8729e6ddc414d061988b8760d22729feec4fe Mon Sep 17 00:00:00 2001 From: Yannick Croissant Date: Tue, 29 May 2018 00:54:37 +0200 Subject: [PATCH] Add SpreadElement support to sort-prop-types --- lib/rules/sort-prop-types.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rules/sort-prop-types.js b/lib/rules/sort-prop-types.js index a56cf4b786..174ee43c50 100644 --- a/lib/rules/sort-prop-types.js +++ b/lib/rules/sort-prop-types.js @@ -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]; }