Skip to content

chore: add ESLint config, lint:fix script, and code quality docs #445

Merged
PRODHOSH merged 1 commit into
PRODHOSH:mainfrom
DebasmitaBose0:feat/417-eslint-code-quality
Jul 14, 2026
Merged

chore: add ESLint config, lint:fix script, and code quality docs #445
PRODHOSH merged 1 commit into
PRODHOSH:mainfrom
DebasmitaBose0:feat/417-eslint-code-quality

Conversation

@DebasmitaBose0

@DebasmitaBose0 DebasmitaBose0 commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Closes #417

Summary

Enhances ESLint configuration with stricter rules, adds .eslintignore, and documents the lint workflow in CONTRIBUTING.md.

Changes

  • eslint.config.mjs — added no-console, prefer-const, no-unused-vars, no-duplicate-imports, and @typescript-eslint/no-explicit-any (warn) rules
  • .eslintignore — newly created, excludes node_modules, .next, public/, e2e/, generated files
  • package.json — added lint:fix script
  • CONTRIBUTING.md — added linting section with npm run lint / npm run lint:fix instructions

Summary by CodeRabbit

  • Documentation

    • Added contributor guidance for linting, code quality checks, and TypeScript validation.
  • Chores

    • Improved linting rules and excluded generated files and build artifacts from lint checks.
    • Added an automatic lint-fix command for correcting eligible issues.

@github-actions

Copy link
Copy Markdown
Contributor

Welcome to OSSfolio, @DebasmitaBose0! 🎉

Thank you for opening this pull request and contributing to the open-source community! 🚀

To ensure a smooth review process, please make sure you have:

  • Checked that your changes work locally and compile cleanly.
  • Followed the guidelines outlined in CONTRIBUTING.md.
  • Linked your PR to an open issue (e.g. Closes #ISSUE_NUMBER).

We will review your PR as soon as possible. Happy coding! 💻✨

@github-actions github-actions Bot added the documentation Additions to docs label Jul 13, 2026
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The pull request configures ESLint exclusions and rules, adds an autofix npm script, and documents linting and TypeScript type-checking commands in the contributing guide.

Changes

Lint and Code Quality

Layer / File(s) Summary
Lint configuration and contributor workflow
.eslintignore, eslint.config.mjs, package.json, CONTRIBUTING.md
ESLint now ignores generated paths, applies selected rule overrides, supports lint:fix, and documents lint and type-check commands.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Poem

I’m a rabbit who checks every line,
With tidy lint rules all in a row.
Ignored maps hop out of sight,
Fix scripts make the code just right.
Type checks thump—now off we go!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR covers ESLint config, ignore rules, lint script, and docs, but not the required server/client configs, dependencies, or stale file removals from #417. Add the missing server/client ESLint configs, required ESLint/React dependencies, and remove the stale files called for in #417.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: ESLint setup, a lint:fix script, and code-quality docs.
Out of Scope Changes check ✅ Passed All shown changes support ESLint/code-quality setup and documentation; no unrelated edits are indicated.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed: one or more packages not found in the registry.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Warning

⚠️ This pull request shows signs of AI-generated slop (description_diff_mismatch). It has been flagged by CodeRabbit slop detection and should be reviewed carefully.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.eslintignore:
- Around line 1-6: Remove the inert .eslintignore entries and migrate the
required repository-wide ignore patterns into the ignores configuration in
eslint.config.mjs. Preserve the existing patterns, including .next,
node_modules, public, source maps, and declaration files, while ensuring they
are applied by ESLint 9’s flat configuration.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 93f85190-7a45-4c7a-9398-80d2679390ec

📥 Commits

Reviewing files that changed from the base of the PR and between 294511e and 06d3814.

📒 Files selected for processing (4)
  • .eslintignore
  • CONTRIBUTING.md
  • eslint.config.mjs
  • package.json

Comment thread .eslintignore
Comment on lines +1 to +6
.next/
node_modules/
public/
.next/
*.js.map
*.d.ts

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🔵 Trivial | 💤 Low value

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n## Files\n'
git ls-files package.json eslint.config.mjs .eslintignore .eslintrc* .eslint* || true

printf '\n## package.json\n'
if [ -f package.json ]; then
  cat -n package.json
fi

printf '\n## eslint.config.mjs\n'
if [ -f eslint.config.mjs ]; then
  cat -n eslint.config.mjs
fi

printf '\n## Search for ignore config and eslintignore references\n'
rg -n --hidden --glob '!node_modules' --glob '!.git' '\.eslintignore|globalIgnores|ignores\s*:' .

Repository: PRODHOSH/ossfolio

Length of output: 2808


Move these ignores into eslint.config.mjs if they need to apply repo-wide. Flat config doesn’t read .eslintignore, so this file is inert for ESLint 9.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.eslintignore around lines 1 - 6, Remove the inert .eslintignore entries and
migrate the required repository-wide ignore patterns into the ignores
configuration in eslint.config.mjs. Preserve the existing patterns, including
.next, node_modules, public, source maps, and declaration files, while ensuring
they are applied by ESLint 9’s flat configuration.

@PRODHOSH PRODHOSH self-requested a review July 14, 2026 03:14
@PRODHOSH PRODHOSH added ELUSOC ELUSOC project submission completed NEWBIE Beginner — 10 pts beginner Good for newcomers labels Jul 14, 2026
@PRODHOSH PRODHOSH merged commit 469f704 into PRODHOSH:main Jul 14, 2026
9 of 10 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🎉 Your PR just got merged, @DebasmitaBose0 — thank you for contributing to OSSfolio!

Your work is now part of the project. Here's what to do next:

  • ⭐ If you haven't already, consider giving the repo a star — it helps us grow.
  • 📢 Share your contribution on LinkedIn, Twitter, or wherever you hang out. You shipped open source!
  • 🔍 Browse other open issues if you want to keep contributing.

We really appreciate you taking the time. See you in the next PR! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

beginner Good for newcomers completed documentation Additions to docs ELUSOC ELUSOC project submission NEWBIE Beginner — 10 pts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ELUSOC] ESLint & Code Quality Setup

2 participants