Skip to content

feat: add eslint and prettier - #752

Merged
nscuro merged 15 commits into
DependencyTrack:masterfrom
setchy:feature/prettier-eslint
Feb 27, 2024
Merged

feat: add eslint and prettier#752
nscuro merged 15 commits into
DependencyTrack:masterfrom
setchy:feature/prettier-eslint

Conversation

@setchy

@setchy setchy commented Feb 26, 2024

Copy link
Copy Markdown
Contributor

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

nscuro commented Feb 26, 2024

Copy link
Copy Markdown
Member

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

setchy commented Feb 27, 2024

Copy link
Copy Markdown
Contributor Author

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

setchy commented Feb 27, 2024

Copy link
Copy Markdown
Contributor Author

@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

nscuro commented Feb 27, 2024

Copy link
Copy Markdown
Member

@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

setchy commented Feb 27, 2024

Copy link
Copy Markdown
Contributor Author

@nscuro - READY!

@nscuro nscuro left a comment

Copy link
Copy Markdown
Member

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
@setchy
setchy deleted the feature/prettier-eslint branch February 27, 2024 18:40
heyiamwahab236 pushed a commit to tecan/frontend_custom that referenced this pull request Jun 17, 2026
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.

2 participants