We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
jsx-indent
1 parent d9ccfe4 commit a13593dCopy full SHA for a13593d
tests/lib/rules/jsx-indent.js
@@ -2738,5 +2738,38 @@ const Component = () => (
2738
},
2739
],
2740
2741
+ {
2742
+ code: `
2743
+ const StatelessComponent = () => {
2744
+ if (new Date() % 2) {
2745
+ return (
2746
+ <div>Hello</div>
2747
+ );
2748
+ }
2749
+ return null;
2750
+ };
2751
+ `,
2752
+ output: `
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
+ errors: [
2763
2764
+ messageId: 'wrongIndent',
2765
+ data: {
2766
+ needed: 18,
2767
+ gotten: 8,
2768
+ type: 'space',
2769
+ characters: 'characters',
2770
+ },
2771
2772
+ ],
2773
2774
]),
2775
});
0 commit comments