Skip to content

Commit aa7c31b

Browse files
committed
revert unrelated change
1 parent 4af435e commit aa7c31b

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

packages/eslint-plugin/src/rules/syntax-preference.ts

+6-10
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,9 @@ const checkExpressionPreferringObject = (
7878
) => {
7979
switch (node.type) {
8080
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+
)
8684
return
8785
case AST_NODE_TYPES.TemplateLiteral:
8886
context.report({
@@ -156,11 +154,9 @@ const checkExpressionPreferringString = (
156154
) => {
157155
switch (node.type) {
158156
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+
)
164160
return
165161
case 'ObjectExpression':
166162
context.report({

0 commit comments

Comments
 (0)