From c5b49a27daafdb7d8b8fca28b68a8b1c41df2ad4 Mon Sep 17 00:00:00 2001 From: aleix-ferrer Date: Mon, 22 Jul 2024 10:40:11 +0200 Subject: [PATCH] feat(packages/eslint-plugin-sui): check if arrow function as a getter --- .../eslint-plugin-sui/src/rules/private-attributes-model.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/eslint-plugin-sui/src/rules/private-attributes-model.js b/packages/eslint-plugin-sui/src/rules/private-attributes-model.js index 960b93b59..4d65a41e3 100644 --- a/packages/eslint-plugin-sui/src/rules/private-attributes-model.js +++ b/packages/eslint-plugin-sui/src/rules/private-attributes-model.js @@ -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 => {