Counselllor / Counsellor-Web

Use shorthand property syntax for object literals JS-0240
Anti-pattern
Minor
4 days ago5 months old
Expected property shorthand
160      setLiked(!liked);
161      setBlog((prevBlog) => ({
162        ...prevBlog,
163        likeCount: likeCount164      }));
165    } catch (error) {
166      console.error('Error updating like status:', error);
Expected property shorthand
150      }
151
152      await update(ref(db, `articles/${id}`), {
153        likeCount: likeCount154      });
155
156      await update(userRef, {
Expected property shorthand
115        title: blog.title,
116        content: blog.content,
117        tags: blog.tags,
118        id: id119      }
120    });
121  };
Expected property shorthand
130      dob: dob,
131      gender: gender,
132      age: age,
133      user_type: user_type,134    });
135   
136  }
Expected property shorthand
129      email: email,
130      dob: dob,
131      gender: gender,
132      age: age,133      user_type: user_type,
134    });
135