dear-digital / linter

3 stars 14 forks source link

πŸ” [DISCOVERY] - Linting the linter #85

Closed mihir-bombay-studio closed 1 year ago

mihir-bombay-studio commented 1 year ago

Is there an existing Discovery issue on this topic?

Objective

We want to setup automated linting and Continuous Integration/Continuous Deployment (CI/CD) on pull requests for this repository. As you are well aware of how this process works from last week's task and how we can benefit from that you can now dive deeper and research on setting up Continuous Integration/Continuous Deployment (CI/CD) and automation testing using github actions.

Reference Materials

No response

Expected Outcome

Complete this assignment by 2nd October, 9 AM, and submit the outcomes as comments below. Each successful submission will be awarded 250 points.

Have you provided comprehensive details for this discovery task?

kmalap05 commented 1 year ago

So, like after creating the CI/CD pipline with GitHub Actions for this repo do we have to give pull request?

mihir-bombay-studio commented 1 year ago

No, you can just add a link to the forked repository that you worked on. No need to create a pull request just yet.

On Fri, 29 Sept, 2023, 11:23 pm Kedar Malap, @.***> wrote:

So, like after creating the CI/CD pipline with GitHub Actions for this repo do we have to give pull request?

β€” Reply to this email directly, view it on GitHub https://github.com/dear-digital/linter/issues/85#issuecomment-1741282993, or unsubscribe https://github.com/notifications/unsubscribe-auth/AS2PK3TM6HP75KCOD3XKINDX44DJTANCNFSM6AAAAAA5MYODTE . You are receiving this because you authored the thread.Message ID: @.***>

kmalap05 commented 1 year ago

ok, thanks.

kmalap05 commented 1 year ago

What I have understood from the task assigned is

I have doubt in third point that that do we have to give demo of the the test.yaml on the local machine on the github repo or we have to just add the file and push that branch to linter repo and explain what it is going to do? So, like for me third point is not cleared yet... Can you plz explain it....

mihir-bombay-studio commented 1 year ago

You have to run it on the repo and show the demo of which GitHub actions you added and why it will help maintain the code consistency and best practices in the repository. Make sure you add your reasons why you added those GitHub actions and how it will help automate the process of checking if the code submitted in pull request is good in your readme.

On Sun, 1 Oct, 2023, 1:48 pm Kedar Malap, @.***> wrote:

What I have understood from the task assigned is

  • A README.md file with comprehensive explaination of GitHub CI/CD
  • A Link for markdown file about Research on GitHub Actions and suggestions
  • A .gtihub/workflow/test.yaml file we have to create for running lint with various rules

I have doubt in third point that that do we have to give demo of the the test.yaml on the local machine on the github repo or we have to just add the file and push that branch to linter repo and explain what it is going to do? So, like for me third point is not cleared yet... Can you plz explain it....

β€” Reply to this email directly, view it on GitHub https://github.com/dear-digital/linter/issues/85#issuecomment-1742001639, or unsubscribe https://github.com/notifications/unsubscribe-auth/AS2PK3QL5NVTTTJRSGC7UO3X5ERNLANCNFSM6AAAAAA5MYODTE . You are receiving this because you authored the thread.Message ID: @.***>

abhishekjani08 commented 1 year ago

Linting the Linter

GitHub Actions for CI/CD

GitHub Actions for CI/CD is an automation tool within GitHub that streamlines software development by automatically building, testing, and deploying code. It triggers workflows in response to events like code pushes or pull requests. It's customizable, supports parallel or sequential jobs, integrates with GitHub features, and is highly adaptable to different project needs. GitHub Actions enhances development efficiency, code quality, and deployment processes.

I've implemented GitHub Actions to automate Continuous Integration (CI) and Continuous Deployment (CD) processes in this repository. GitHub Actions streamline our development workflow, ensuring code quality and automated deployment.

Benefits of CI/CD

In our Linter project, we've implemented a comprehensive CI/CD (Continuous Integration and Continuous Deployment) setup tailored to our unique needs. Here's why our CI/CD setup is crucial for our linter:

  1. Streamlined Development: CI/CD automates the testing and deployment of our linter, making it easier for developers to contribute and integrate new features or improvements.

  2. Enhanced Code Quality: Our CI/CD pipeline includes automated code linting and testing using ESLint. This ensures that our linter adheres to best practices and maintains high code quality.

  3. Faster Releases: With automated testing and deployment, we can release new versions of our linter more quickly and confidently. This reduces the time between bug fixes and feature additions.

  4. Consistency: CI/CD enforces consistent development practices. Every change to our linter codebase goes through the same automated pipeline, ensuring uniformity and reliability.

  5. Error Reduction: Automated deployments minimize the risk of human error during the release process. This means fewer deployment-related issues and quicker issue resolution.

To set up our CI/CD pipeline effectively, we rely on the following tools:

Envisioning the Linter Project

Our Linter project is committed to building a reliable and efficient code linting tool that helps developers maintain clean and error-free code.

While our primary focus is on building a powerful linter, we see several areas where we can expand the project's scope:

ESLint Rules

In this project, we've configured ESLint with specific rules to help maintain code quality and consistency. Here's why we've chosen these rules:

Video Submission

This is a 16 minute video which provides a detailed explaination about the task. πŸš€Linting the Linter

Conclusion

By integrating GitHub Actions for CI/CD, implementing ESLint with well-defined rules, and automating testing processes, we aim to enhance code quality, streamline development, and maintain a clean and consistent codebase in our repository. These practices ensure that our code is reliable, maintainable, and ready for deployment.

Thankyou!

Mri1662 commented 1 year ago

Linting the linter

CI/CD Setup with GitHub Actions

We've implemented GitHub Actions for Continuous Integration (CI) in this project. This setup has several advantages:

How It Works

Whenever a pull request is submitted to the main branch, GitHub Actions automatically kicks in. It runs ESLint, a JavaScript linter, to analyze our code for errors or style violations. If any issues are found, the workflow provides feedback on how to resolve them.

Benefits

We encourage all contributors to follow our linting rules and appreciate the automated support provided by GitHub Actions.

ESLint:

Benefits:

  1. 'indent': ['error', 2] - Specifies the number of spaces for indentation (adjust the value to your preferred style).
  2. 'semi': ['error', 'always'] - Enforce the use of semicolons.
  3. 'quotes': ['error', 'single'] - Enforce the use of single quotes for strings.
  4. 'no-unused-vars': 'error' - Detect unused variables.
  5. 'const' or 'let' - Prefer using const for variables that do not reassign, and let for variables that do.
  6. 'arrow-spacing': 'error' - Enforce consistent spacing around arrow function parameters.
  7. 'no-unused-vars': ['error', { 'args': 'none' }] - Disallow unused function parameters. 8.'react/jsx-closing-bracket-location': ['error', 'line-aligned'] - Enforce JSX closing bracket location to be aligned with the opening tag or on a new line.
  8. Enforce PropTypes: If you're not using TypeScript, you can use the 'react/prop-types' rule to enforce PropTypes for your components.
  9. 'max-len': ['error', { 'code': 120 }] - Enforce a maximum line length to improve code readability.

Video Submission

This is a 16 minute video which provides a detailed explaination about the task.

πŸš€ Linting the linter πŸš€ github repo

Conclusion

By integrating GitHub Actions for CI/CD, implementing ESLint with well-defined rules, and automating testing processes, we aim to enhance code quality, streamline development, and maintain a clean and consistent codebase in our repository. These practices ensure that our code is reliable, maintainable, and ready for deployment.

kmalap05 commented 1 year ago

Linting the Linter

Video Submission

17 minutes video providing detailed explaination of the task. πŸš€ Google Drive - Linting the Linter

πŸš€ GitHub Repo - Repo on which task was performed

GitHub Actions for CI/CD: Research Findings and Suggestions

GitHub Actions is a robust CI/CD platform that offers automation capabilities for various software development and deployment tasks. In this document, we'll explore key findings and provide suggestions for effectively using GitHub Actions in your development workflows.

Research Findings πŸ“Š

1. Continuous Integration (CI) Capabilities πŸ”„

GitHub Actions excels in CI workflows:

2. Flexibility in Workflow Triggering ⏰

GitHub Actions allows for diverse event triggers:

3. Customizable Workflows πŸ› οΈ

Workflows in GitHub Actions are defined using YAML:

4. Integration and Deployment 🚚

CI/CD pipelines can be created easily:

5. Workflow Visualization πŸ“ˆ

GitHub provides a visual representation of workflow runs:

Suggestions πŸ“

Conclusion πŸŽ‰

GitHub Actions is a powerful CI/CD tool that can significantly enhance your software development and deployment processes. By starting with simple workflows, leveraging available actions, following security best practices, and monitoring and optimizing your workflows, you can maximize the benefits of GitHub Actions in your development workflows.

Remember that continuous improvement is key, and staying updated with GitHub Actions' evolving features and best practices will help you maintain an efficient CI/CD pipeline.

anishdalvi commented 1 year ago

Linting the Linter πŸ‘¨πŸ»β€πŸ’»

Since this task is related to the #84 Automated Code Quality Checks Task. I've also performed that task for my practice. So, here's the Video Link and the Github Repo for the previous task.

Video Explanation:

For the current task below are the links:

CI/CD setup explanation for our repository:

Benefits:

Envisioned Project Scope:

Feature I think that should be added:

Conclusion:

In summary, I've have implemented a robust CI/CD setup for our repository, ensuring automated linting and testing of code contributions. The setup enforces coding standards, provides immediate feedback to developers, and enhances code consistency. One feature request is to specify errors in JSON code, improving our tool's usability and aligning it with industry standards.


mihir-bombay-studio commented 1 year ago

@anishdalvi Good suggestion let's implement it in next iterations btw I don't see the github actions setup and demo pull request on this repository https://github.com/anishdalvi/linter. Did you push the code?

anishdalvi commented 1 year ago

@anishdalvi Good suggestion let's implement it in next iterations btw I don't see the github actions setup and demo pull request on this repository https://github.com/anishdalvi/linter. Did you push the code?

No Sir, I forgot to commit and push changes from the local repository. πŸ˜… I updated the repository with the PR. Apologize for the missing stuff πŸ™ŒπŸ»