Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[refactor]: Update the way to push element in analyze-component-files.spec.ts #4

Open
kittisakLS opened this issue Sep 15, 2023 · 0 comments
Assignees
Labels
good first issue Issues that we believe are relatively straightforward to tackle. Good for newcomers. hacktoberfest-accepted

Comments

@kittisakLS
Copy link
Contributor

Overview

The purpose of this issue is to refactor the code in the file mentioned in the title to improve code quality and maintainability. At the moment, the analyzed-component-files.spec.ts has push repeated twice.

componentProfiles.push({
name: "Button",
type: "internal",
total: 0,
source: {
path: "C:/projects/berryjam-cli/public/Components/Header.js",
property: {
dataLastModified: "Fri Apr 28 2023",
lastModified: "Fri Apr 28 2023",
created: "2023-04-17T04:04:04.000Z",
createdBy: "system",
updatedBy: "system",
},
},
properties: [],
usageLocations: [],
groups: [],
children: { total: 1, tags: ["Button"], source: "" },
});
// Push 2nd object
componentProfiles.push({
name: "Button",

As you can see, It might not need to use push twice to push 2 objects

Expected Behavior

  • Using one push with 2 objects instead.
@kittisakLS kittisakLS added the good first issue Issues that we believe are relatively straightforward to tackle. Good for newcomers. label Sep 15, 2023
@vlsck vlsck self-assigned this Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Issues that we believe are relatively straightforward to tackle. Good for newcomers. hacktoberfest-accepted
Projects
None yet
Development

No branches or pull requests

3 participants