chore: add ESLint config, lint:fix script, and code quality docs #445
Conversation
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:
We will review your PR as soon as possible. Happy coding! 💻✨ |
📝 WalkthroughWalkthroughThe pull request configures ESLint exclusions and rules, adds an autofix npm script, and documents linting and TypeScript type-checking commands in the contributing guide. ChangesLint and Code Quality
Estimated code review effort: 1 (Trivial) | ~5 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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
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. Comment Warning |
There was a problem hiding this comment.
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
📒 Files selected for processing (4)
.eslintignoreCONTRIBUTING.mdeslint.config.mjspackage.json
| .next/ | ||
| node_modules/ | ||
| public/ | ||
| .next/ | ||
| *.js.map | ||
| *.d.ts |
There was a problem hiding this comment.
🎯 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.
|
🎉 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:
We really appreciate you taking the time. See you in the next PR! 🚀 |
Closes #417
Summary
Enhances ESLint configuration with stricter rules, adds .eslintignore, and documents the lint workflow in CONTRIBUTING.md.
Changes
eslint.config.mjs— addedno-console,prefer-const,no-unused-vars,no-duplicate-imports, and@typescript-eslint/no-explicit-any(warn) rules.eslintignore— newly created, excludesnode_modules,.next,public/,e2e/, generated filespackage.json— addedlint:fixscriptCONTRIBUTING.md— added linting section withnpm run lint/npm run lint:fixinstructionsSummary by CodeRabbit
Documentation
Chores