File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "name" : " @eduzz/eslint-config" ,
33 "private" : false ,
4- "version" : " 2.5.3 " ,
4+ "version" : " 2.5.4 " ,
55 "keywords" : [
66 " eduzz" ,
77 " eslint"
Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ const isDefaultImportSourceSupported = source =>
2121 'antd/lib/checkbox/Checkbox'
2222 ] . includes ( source ) ;
2323
24+ const excludeNestedComponentsNameList = [ [ 'Checkbox' , 'Group' ] ] ;
25+
2426module . exports = {
2527 meta : {
2628 type : 'suggestion' ,
@@ -85,6 +87,13 @@ module.exports = {
8587 return ;
8688 }
8789
90+ if (
91+ node . name . type === 'JSXMemberExpression' &&
92+ excludeNestedComponentsNameList . includes ( [ node . name . object . name , node . name . property . name ] )
93+ ) {
94+ return ;
95+ }
96+
8897 const [ id ] = node . attributes . filter ( ( { name } ) => {
8998 if ( ! name ) {
9099 return false ;
Original file line number Diff line number Diff line change @@ -46,7 +46,10 @@ module.exports = {
4646
4747 const isJsxExpressionValueVariable =
4848 node . value . type === 'JSXExpressionContainer' &&
49- ( node . value . expression . type === 'Identifier' || node . value . expression . type === 'MemberExpression' ) ;
49+ ( node . value . expression . type === 'Identifier' ||
50+ node . value . expression . type === 'MemberExpression' ||
51+ node . value . expression . type === 'ObjectExpression' ||
52+ node . value . expression . type === 'ArrayExpression' ) ;
5053
5154 if ( isJsxExpressionValueVariable ) {
5255 return ;
You can’t perform that action at this time.
0 commit comments