Skip to content

Conversation

sheikhlimon
Copy link
Contributor

@sheikhlimon sheikhlimon commented Oct 7, 2025

Description

This PR adds a GitHub Actions workflow to automatically run linting on pushes and pull requests.

Fixes #838

Note:

  • This workflow uses npm ci to ensure consistent dependency versions.
  • The project’s package-lock.json must be committed for CI to work correctly.
  • If the lock file is missing or ignored, npm install can be used temporarily, but it may install different versions than intended, leading to inconsistent builds.

Additional Note:

  • This PR adds the GitHub Actions workflow for linting (.github/workflows/lint.yml).
  • The workflow currently fails in CI because the lint script and ESLint/Prettier configuration are not yet merged.
  • The ESLint/Prettier/VSCode PR chore: apply ESLint and Prettier formatting across codebase #837 must be merged first.
  • After that, this workflow PR can be rebased onto main and CI will run successfully.
  • This ensures PRs remain independent while preserving proper CI execution.

Type of Change

  • New feature (e.g., new page, component, or functionality)
  • Bug fix (non-breaking change that fixes an issue)
  • UI/UX improvement (design, layout, or styling updates)
  • Performance optimization (e.g., code splitting, caching)
  • Documentation update (README, contribution guidelines, etc.)
  • Other (please specify):

Changes Made

Workflow Details

  • Runs on ubuntu-latest.
  • Uses Node.js 20.
  • Installs dependencies with npm ci.
  • Runs the lint script (npm run lint).

Benefits

  • Ensures consistent code quality across all contributions.
  • Automatically checks for linting errors on every push and PR.
  • Helps prevent styling and formatting issues from being merged.

Dependencies

  • Node.js >=18 is required, as specified in package.json.
  • npm packages: no new dependencies are introduced; the workflow installs all existing dependencies and devDependencies using npm ci.
  • GitHub Actions is the tool used to run the workflow automatically on push and pull request.
  • Configuration: Ensure your package.json includes a lint script (e.g., "lint": "eslint ."). The Node.js version in the workflow (node-version: 20) should be compatible with local development.

Explanation for Reviewers

  • You’re not adding any new npm packages; the workflow just uses what’s already in the project.
  • Node.js version is set in the workflow for CI consistency.
  • Contributors don’t need to do anything manually — CI handles dependency installation.

Note on Dependencies:

  • As a standard practice, both package.json and package-lock.json should be committed, and only node_modules/ should be ignored.
  • This ensures CI can reliably use npm ci to install exact dependency versions. Exceptions can be made if there’s a specific reason for not committing the lock file.

Checklist

  • My code follows the style guidelines of this project.
  • I have tested my changes across major browsers and devices
  • My changes do not generate new console warnings or errors .
  • I ran npm run build and attached screenshot(s) in this PR.
  • This is already assigned Issue to me, not an unassigned issue.

Copy link

vercel bot commented Oct 7, 2025

@sheikhlimon is attempting to deploy a commit to the recode Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

github-actions bot commented Oct 7, 2025

Thank you for submitting your pull request! 🙌 We'll review it as soon as possible. The estimated time for response is 5–8 hrs.

In the meantime, please provide all necessary screenshots and make sure you run - npm build run , command and provide a screenshot, a video recording, or an image of the update you made below, which helps speed up the review and assignment. If you have questions, reach out to LinkedIn. Your contributions are highly appreciated!😊

Note: I maintain the repo issue every day twice at 8:00 AM IST and 9:00 PM IST. If your PR goes stale for more than one day, you can tag and comment on this same issue by tagging @sanjay-kv.

We are here to help you on this journey of open source. Consistent 20 contributions are eligible for sponsorship 💰

🎁 check our list of amazing people we sponsored so far: GitHub Sponsorship. ✨

📚Your perks for contribution to this community 👇🏻

  1. Get free Consultation use code recode50 to get free: Mentorship for free.

  2. Get the Ebook for free use code recode at checkout: Data Science cheatsheet for Beginners.

  3. Check out this weekly Newsletter: Sanjay's Newsletter.

If there are any specific instructions or feedback regarding your PR, we'll provide them here. Thanks again for your contribution! 😊

Copy link

github-actions bot commented Oct 7, 2025

Synced data from Linked Issues

Labels:

  • enhancement
  • level 1
  • recode
  • hacktoberfest-accepted
  • under review

Assignees:

  • sheikhlimon

Milestones:

  • recode:launch 3.0

@github-actions github-actions bot added hacktoberfest-accepted level 1 10 points recode this is label for leaderboard labels Oct 7, 2025
@sheikhlimon sheikhlimon force-pushed the feat/ci-lint-workflow branch from 9679149 to cb52811 Compare October 7, 2025 08:59
@sheikhlimon
Copy link
Contributor Author

@iitzIrFan any reason for lockfile to be ignored in git

@sanjay-kv sanjay-kv moved this to In Progress in @recode-web Oct 8, 2025
@sanjay-kv sanjay-kv added this to the recode:launch 3.0 milestone Oct 8, 2025
Copy link

vercel bot commented Oct 8, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
recode-website Ready Ready Preview Comment Oct 8, 2025 10:43am

@sanjay-kv
Copy link
Member

@sheikhlimon is this linting automatic, or user has to make code lint

@sanjay-kv sanjay-kv added the under review Review under the maintainers or the admins label Oct 8, 2025
@sheikhlimon
Copy link
Contributor Author

sheikhlimon commented Oct 8, 2025

@sheikhlimon is this linting automatic, or user has to make code lint

No this only runs npm run lint and CI check will fail if there is lint errors. For automatic lint fix we have to add husky i already opened an issue. To add husky we have to merge #837 cause the scripts which fixes lint is in package.json. This PR also needs the same to run. So it depends on the mentioned PR merging to work.

@sheikhlimon sheikhlimon force-pushed the feat/ci-lint-workflow branch from 5c47a70 to d070234 Compare October 8, 2025 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest-accepted level 1 10 points recode this is label for leaderboard under review Review under the maintainers or the admins
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

💡[Feature]: Add GitHub Actions workflow to run ESLint on PRs and pushes
2 participants