From 9b5f56cac9a08ec8aabfdf06707b08ddb99472ec Mon Sep 17 00:00:00 2001 From: Moong0122 Date: Sun, 4 Oct 2020 19:25:11 +0900 Subject: [PATCH] [Fix] `jsx-indent-props` : Apply indentation when used expression --- tests/lib/rules/jsx-indent-props.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tests/lib/rules/jsx-indent-props.js b/tests/lib/rules/jsx-indent-props.js index 0cd1de59ba..5e479bc7ee 100644 --- a/tests/lib/rules/jsx-indent-props.js +++ b/tests/lib/rules/jsx-indent-props.js @@ -228,6 +228,27 @@ ruleTester.run('jsx-indent-props', rule, { {message: 'Expected indentation of 6 space characters but found 4.'}, {message: 'Expected indentation of 6 space characters but found 4.'} ] + }, { + code: [ + '{this.props.test', + ' ? ', + ' : null}' + ].join('\n'), + output: [ + '{this.props.test', + ' ? ', + ' : null}' + options: [2], + errors: [ + {message: 'Expected indentation of 6 space characters but found 4.'}, + {message: 'Expected indentation of 6 space characters but found 4.'} + ] }, { code: [ '