File tree 1 file changed +7
-21
lines changed
1 file changed +7
-21
lines changed Original file line number Diff line number Diff line change @@ -169,33 +169,19 @@ module.exports = {
169
169
}
170
170
}
171
171
172
- /**
173
- * Gets the left curly and right curly tokens of a node.
174
- * @param {ASTNode } node The JSXExpressionContainer node.
175
- * @returns {{leftCurly: Object, rightCurly: Object} } An object contaning left and right curly tokens.
176
- */
177
- function getCurlyTokens ( node ) {
178
- return {
179
- leftCurly : sourceCode . getFirstToken ( node ) ,
180
- rightCurly : sourceCode . getLastToken ( node )
181
- } ;
182
- }
183
-
184
- /**
185
- * Validates the curlys for a JSXExpressionContainer node.
186
- * @param {ASTNode } node The JSXExpressionContainer node.
187
- * @returns {void }
188
- */
189
- function validateNode ( node ) {
190
- validateCurlys ( getCurlyTokens ( node ) , node . expression ) ;
191
- }
192
172
193
173
// ----------------------------------------------------------------------
194
174
// Public
195
175
// ----------------------------------------------------------------------
196
176
197
177
return {
198
- JSXExpressionContainer : validateNode
178
+ JSXExpressionContainer ( node ) {
179
+ const curlyTokens = {
180
+ leftCurly : sourceCode . getFirstToken ( node ) ,
181
+ rightCurly : sourceCode . getLastToken ( node )
182
+ } ;
183
+ validateCurlys ( curlyTokens , node . expression ) ;
184
+ }
199
185
} ;
200
186
}
201
187
} ;
You can’t perform that action at this time.
0 commit comments