File tree 1 file changed +6
-10
lines changed
packages/eslint-plugin/src/rules
1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -78,11 +78,9 @@ const checkExpressionPreferringObject = (
78
78
) => {
79
79
switch ( node . type ) {
80
80
case AST_NODE_TYPES . ArrayExpression :
81
- node . elements . forEach ( element => {
82
- if ( element ) {
83
- checkExpressionPreferringObject ( context , element )
84
- }
85
- } )
81
+ node . elements . forEach ( element =>
82
+ checkExpressionPreferringObject ( context , element )
83
+ )
86
84
return
87
85
case AST_NODE_TYPES . TemplateLiteral :
88
86
context . report ( {
@@ -156,11 +154,9 @@ const checkExpressionPreferringString = (
156
154
) => {
157
155
switch ( node . type ) {
158
156
case 'ArrayExpression' :
159
- node . elements . forEach ( element => {
160
- if ( element ) {
161
- checkExpressionPreferringString ( context , element )
162
- }
163
- } )
157
+ node . elements . forEach ( element =>
158
+ checkExpressionPreferringString ( context , element )
159
+ )
164
160
return
165
161
case 'ObjectExpression' :
166
162
context . report ( {
You can’t perform that action at this time.
0 commit comments