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 linting to the CI pipelines #271

Merged
merged 27 commits into from
Jan 3, 2025

Conversation

diofeher
Copy link
Contributor

@diofeher diofeher commented Dec 31, 2024

There are multiple steps to this PR:

1 - Adding ESLint and Prettier checks to the frontend pipeline
2 - Trigger verify.yml only if backend files are changed.
3 - Trigger frontend.yml only if frontend files are changed.
4 - Add linted files on the frontend (changed with prettier --write)

For linting frontend locally, use npm run lint.

This PR is meant to close #93 .

Checklist

  • I have read the contribution guide.
  • I have not used an AI coding assistant to create this PR.
  • My contribution is compatible with the MPL-2.0 license and I have provided a DCO sign-off on all my commits.
  • I have written all code in this PR myself OR I have marked all code I have not written myself (including modified code, e.g. copied from other places and then modified) with a comment indicating where it came from.

Signed-off-by: Diogenes Fernandes <[email protected]>
@diofeher diofeher force-pushed the feat/frontend-linting branch from f25c525 to eb009ab Compare December 31, 2024 22:53
Signed-off-by: Diogenes Fernandes <[email protected]>
Signed-off-by: Diogenes Fernandes <[email protected]>
Signed-off-by: Diogenes Fernandes <[email protected]>
Signed-off-by: Diogenes Fernandes <[email protected]>
Signed-off-by: Diogenes Fernandes <[email protected]>
Signed-off-by: Diogenes Fernandes <[email protected]>
Signed-off-by: Diogenes Fernandes <[email protected]>
Signed-off-by: Diogenes Fernandes <[email protected]>
Signed-off-by: Diogenes Fernandes <[email protected]>
Signed-off-by: Diogenes Fernandes <[email protected]>
Signed-off-by: Diogenes Fernandes <[email protected]>
@diofeher diofeher marked this pull request as ready for review December 31, 2024 23:14
@diofeher
Copy link
Contributor Author

Signed-off-by: Diogenes Fernandes <[email protected]>
Signed-off-by: Diogenes Fernandes <[email protected]>
@diofeher diofeher mentioned this pull request Dec 31, 2024
Copy link
Collaborator

@abstractionfactory abstractionfactory left a comment

Choose a reason for hiding this comment

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

Thank you @diofeher added a few comments.

.github/workflows/frontend-linting.yml Outdated Show resolved Hide resolved
frontend/package.json Outdated Show resolved Hide resolved
@diofeher diofeher force-pushed the feat/frontend-linting branch from 3e989fb to c466763 Compare January 2, 2025 11:43
@diofeher
Copy link
Contributor Author

diofeher commented Jan 2, 2025

@abstractionfactory Do you prefer to have the fixes together with the linting on this PR or in a separate PR? I'm planning to open another PR after this one with the fixes, but asking first before doing any work.

@abstractionfactory
Copy link
Collaborator

@diofeher whichever is easier for you :)

@diofeher diofeher force-pushed the feat/frontend-linting branch from 91d54b7 to bd5bcc1 Compare January 2, 2025 14:03
Signed-off-by: Diogenes Fernandes <[email protected]>
Signed-off-by: Diogenes Fernandes <[email protected]>
@diofeher diofeher changed the title feat: adding frontend linting Add lint Jan 2, 2025
@diofeher diofeher changed the title Add lint Add linting to the CI pipelines Jan 2, 2025
Signed-off-by: Diogenes Fernandes <[email protected]>
Signed-off-by: Diogenes Fernandes <[email protected]>
Signed-off-by: Diogenes Fernandes <[email protected]>
Signed-off-by: Diogenes Fernandes <[email protected]>
@diofeher
Copy link
Contributor Author

diofeher commented Jan 2, 2025

@abstractionfactory thanks again for the support and comments! I just cleaned up the PR, should be good to go

@abstractionfactory
Copy link
Collaborator

@diofeher thank you for your work. One question: did you verify that the changed markdown files render correctly?

@diofeher
Copy link
Contributor Author

diofeher commented Jan 3, 2025

@abstractionfactory Yep, I didn't know _ and * were the same on markdown, so I went to check if the generated pdf was the same.

Screenshot 2025-01-03 at 08 43 15

Copy link
Collaborator

@abstractionfactory abstractionfactory left a comment

Choose a reason for hiding this comment

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

Thank you @diofeher !

@abstractionfactory abstractionfactory merged commit 2e7c15e into opentofu:main Jan 3, 2025
1 check passed
@diofeher diofeher deleted the feat/frontend-linting branch January 3, 2025 12:26
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.

Set up linting
2 participants