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

feat: add eslint and prettier #752

Merged
merged 15 commits into from
Feb 27, 2024

Conversation

setchy
Copy link
Contributor

@setchy setchy commented Feb 26, 2024

Description

Add eslint and prettier to help enforce consistent coding practices and formating

Addressed Issue

Additional Details

Based on feedback, I can commit the formatting changes within this PR, or a separate PR (assuming this is approved/merged).

There are 161 files with formatting updates, and 633 errors detected by eslint

Checklist

Signed-off-by: Adam Setch <adam.setch@outlook.com>
Signed-off-by: Adam Setch <adam.setch@outlook.com>
@nscuro
Copy link
Member

nscuro commented Feb 26, 2024

Great idea!

Based on feedback, I can commit the formatting changes within this PR, or a separate PR (assuming this is approved/merged).

I am OK with doing it in this PR.

N00b question: Is there a possibility to fail the build when files are not properly formatted?

@setchy
Copy link
Contributor Author

setchy commented Feb 27, 2024

I am OK with doing it in this PR.

Perfect. I'll push the formatting updates to this PR in the morning.

N00b question: Is there a possibility to fail the build when files are not properly formatted?

Absolutely. I'll add a GitHub Action workflow to validate the formatting. Linting will need to come much later if/when the hundreds of errors are resolved.

Signed-off-by: Adam Setch <adam.setch@outlook.com>
Signed-off-by: Adam Setch <adam.setch@outlook.com>
Signed-off-by: Adam Setch <adam.setch@outlook.com>
Signed-off-by: Adam Setch <adam.setch@outlook.com>
Signed-off-by: Adam Setch <adam.setch@outlook.com>
Signed-off-by: Adam Setch <adam.setch@outlook.com>
Signed-off-by: Adam Setch <adam.setch@outlook.com>
Signed-off-by: Adam Setch <adam.setch@outlook.com>
Signed-off-by: Adam Setch <adam.setch@outlook.com>
@setchy
Copy link
Contributor Author

setchy commented Feb 27, 2024

@nscuro @msymons - I have added a GitHub workflow, which for now i've set to continue-on-error.

Some stats before running the automated linting fixes

ES-Lint: 15380 problems (15380 errors, 0 warnings)
Prettier: Code style issues in 175 files

After running prettier for code formatting

640 problems (640 errors, 0 warnings)

@setchy setchy marked this pull request as draft February 27, 2024 15:04
Signed-off-by: Adam Setch <adam.setch@outlook.com>
Signed-off-by: Adam Setch <adam.setch@outlook.com>
Signed-off-by: Adam Setch <adam.setch@outlook.com>
@nscuro
Copy link
Member

nscuro commented Feb 27, 2024

@setchy With the Codacy issue resolved, do you feel this is now ready for review?

@setchy setchy marked this pull request as ready for review February 27, 2024 17:44
@setchy
Copy link
Contributor Author

setchy commented Feb 27, 2024

@nscuro - READY!

Copy link
Member

@nscuro nscuro left a comment

Choose a reason for hiding this comment

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

Thanks so much for this! 🙌

@nscuro nscuro added this to the 4.11 milestone Feb 27, 2024
@nscuro nscuro added the enhancement New feature or request label Feb 27, 2024
@nscuro nscuro merged commit 6718b8b into DependencyTrack:master Feb 27, 2024
10 checks passed
@setchy setchy deleted the feature/prettier-eslint branch February 27, 2024 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants