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.
1 parent c1b6da0 commit 8215be3Copy full SHA for 8215be3
lib/rules/jsx-child-element-spacing.js
@@ -56,6 +56,9 @@ module.exports = {
56
]
57
},
58
create: function (context) {
59
+ const TEXT_FOLLOWING_ELEMENT_PATTERN = /^\s*\n\s*\S/;
60
+ const TEXT_PRECEDING_ELEMENT_PATTERN = /\S\s*\n\s*$/;
61
+
62
const elementName = node => (
63
node.openingElement &&
64
node.openingElement.name &&
@@ -98,9 +101,6 @@ module.exports = {
98
101
});
99
102
};
100
103
- const TEXT_FOLLOWING_ELEMENT_PATTERN = /^\s*\n\s*\S/;
- const TEXT_PRECEDING_ELEMENT_PATTERN = /\S\s*\n\s*$/;
-
104
return {
105
JSXElement: handleJSX,
106
JSXFragment: handleJSX
0 commit comments