Radhi-Hudijan / Feedback-Collector-React-Aws

0 stars 0 forks source link

Set Up GitHub Actions for Linting, Prettier Formatting, and Testing #13

Closed Radhi-Hudijan closed 1 week ago

Radhi-Hudijan commented 2 weeks ago

Description To maintain high code quality and formatting consistency across the project, we need to set up automated GitHub Actions for:

Linting: Ensures the code follows best practices and the style guide. Prettier: Enforces consistent code formatting across the codebase. Testing: Runs automated tests on each push and pull request. This setup will ensure that any code merged into the main branch adheres to our code quality standards.

Tasks Configure ESLint and Prettier in the project:

Add ESLint configuration (.eslintrc.json) with appropriate rules. Add Prettier configuration (.prettierrc) for code formatting. Add scripts in package.json for linting and formatting.

Set Up GitHub Action for Linting:

Create a workflow file (.github/workflows/lint.yml) to run ESLint. Ensure this action runs on each push and pull_request.

Set Up GitHub Action for Prettier: Create a workflow file (.github/workflows/prettier.yml) to check formatting. Ensure this action also runs on push and pull_request.

Acceptance Criteria

GitHub Actions workflows for linting, formatting, are set up and running. All actions trigger on push and pull_request events.

The main branch is protected to ensure only code passing all checks can be merged. Example Workflow File Structure

Here’s an example of the file structure for the workflows:

.github/workflows/lint.yml .github/workflows/prettier.yml