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

Add lint workflow @comet/create-app #583

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

johnnyomair
Copy link
Collaborator

@johnnyomair johnnyomair commented Dec 3, 2024

This adds a lint workflow for @comet/create-app. It lints, builds, and runs the script.

@johnnyomair johnnyomair self-assigned this Dec 3, 2024
@johnnyomair johnnyomair force-pushed the lint-create-app branch 5 times, most recently from d9db1bd to 13259ad Compare December 4, 2024 09:01
@johnnyomair johnnyomair changed the title Lint @comet/create-app Add lint workflow @comet/create-app Dec 4, 2024
@@ -17,6 +17,7 @@ The following arguments can be passed to customize the project setup:

- `project-name` (required): Specifies the name of the project. It will be used as the directory name for the project.
- `-ni` or `--no-install`: Disables the automatic installation of dependencies.
- `-nc` or `--no-commit`: Disables the initial commit.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I figured that committing in the pipeline doesn't make sense. However, now the repository initialization isn't tested. What do you think? Should I try if committing in the pipeline even works?

Comment on lines +97 to +98
- name: Remove the site
run: cd create-app/test && node ../bin/index.js remove-site
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After this, I'd like to check if the script worked. I can think of two ways:

  1. Start the application and see if it still runs
  2. Check for occurrences of certain terms, e.g., site and site config.

I believe 2. would be enough, what do you think?

@@ -10,8 +10,10 @@ export function runEslintFix(verbose: boolean) {
for (const microservice of microservices) {
if (!fs.existsSync(microservice)) {
continue;
} else if (!hasDependenciesInstalled(microservice) && verbose) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The if didn't work as expected, because verbose was false or undefined. Split into two ifs to get it to work again.

@johnnyomair johnnyomair marked this pull request as ready for review December 4, 2024 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant