Skip to content

Commit

Permalink
feat(packages/eslint-plugin-sui): check if arrow function as a getter
Browse files Browse the repository at this point in the history
  • Loading branch information
aleixferr committed Jul 22, 2024
1 parent 6310ab2 commit c5b49a2
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ module.exports = {

// Check if all attributes are public
const publicAttributes = node.body.body.filter(node => {
return node.type === 'PropertyDefinition' && node.key.type === 'Identifier' && node.value?.type !== 'ArrowFunctionExpression'
return (
node.type === 'PropertyDefinition' &&
node.key.type === 'Identifier' &&
node.value?.type !== 'ArrowFunctionExpression'
)
})

publicAttributes.forEach(attribute => {
Expand Down

0 comments on commit c5b49a2

Please sign in to comment.