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

Implement format and linting ci/cd #148

Conversation

MartinBenediktBusch
Copy link
Collaborator

@MartinBenediktBusch MartinBenediktBusch commented Feb 7, 2024

Description:

This pull request addresses the issue titled "Replicate the backend linter and format requirements in the frontend to ensure a minimum level of code consistency. Furthermore, implement .github/workflows for formatting and linting to have it checked at each commit."

Changes Made:

  1. Linting and Formatting Setup:

    • Integrated ESLint and Prettier to enforce consistent code style and formatting in the frontend codebase.
    • Added .eslintrc.cjs configuration file to define linting rules using the @typescript-eslint plugin.
    • Configured rules to allow exceptions like @typescript-eslint/no-explicit-any and @typescript-eslint/no-var-requires as required.
  2. GitHub Workflow Setup:

    • Implemented a GitHub Actions workflow check-formatting.yaml and lint.yaml to check code formatting and linting on each commit.
    • Workflow runs pnpm format (pnpm lint) command to ensure code adheres to formatting standards defined by Prettier.
    • Configured the workflow to run on pull requests targeting the develop and main branches to catch formatting issues before merging.
  3. Fixed Linting and Formatting:

    • verified that the github actions catch the errors and solved them afterwards so that the tests pass.

@MartinBenediktBusch MartinBenediktBusch self-assigned this Feb 7, 2024
Copy link

vercel bot commented Feb 7, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
forum-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 8, 2024 8:35am

@MartinBenediktBusch MartinBenediktBusch changed the title implement format and linting ci/cd Implement format and linting ci/cd Feb 7, 2024
@MartinBenediktBusch MartinBenediktBusch marked this pull request as draft February 7, 2024 15:03
@MartinBenediktBusch MartinBenediktBusch linked an issue Feb 7, 2024 that may be closed by this pull request
.eslintrc.cjs Outdated Show resolved Hide resolved
.eslintrc.cjs Show resolved Hide resolved
.eslintrc.cjs Show resolved Hide resolved
.eslintrc.cjs Show resolved Hide resolved
@MartinBenediktBusch MartinBenediktBusch merged commit 369e5a0 into develop Feb 8, 2024
4 checks passed
@MartinBenediktBusch MartinBenediktBusch deleted the 120-replicate-backend-linter-and-format-requirements branch February 8, 2024 15:10
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.

Replicate backend linter and format requirements
2 participants