Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.next/
node_modules/
public/
.next/
*.js.map
*.d.ts
Comment on lines +1 to +6

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.

25 changes: 25 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,31 @@ Examples: `feat/contribution-heatmap`, `fix/github-api-rate-limit`, `docs/supaba

---

### Lint & Code Quality

This project uses **ESLint** (flat config v9+) with `eslint-config-next` to enforce code quality.

Run linting before submitting a PR:

```bash
npm run lint # Check for issues
npm run lint:fix # Auto-fix where possible
```

The ESLint config is in `eslint.config.mjs` at the root. Key rules:
- `no-console`: Warn on `console.log` (allow `warn`/`error`)
- `prefer-const`: Error on `let` that is never reassigned
- `no-unused-vars`: Warn on unused variables (ignore `_`-prefixed)
- `no-duplicate-imports`: Error on duplicate imports

TypeScript type-checking is also run in CI:

```bash
npm run type-check # tsc --noEmit
```

---

## Commit Messages

Follow [Conventional Commits](https://www.conventionalcommits.org/):
Expand Down
13 changes: 11 additions & 2 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,16 @@ import { createRequire } from "module";

const require = createRequire(import.meta.url);

// eslint-config-next ships a native flat config array in v16+
const nextConfig = require("eslint-config-next");

export default [...nextConfig];
export default [
...nextConfig,
{
rules: {
"no-console": ["warn", { allow: ["warn", "error"] }],
"prefer-const": "error",
"no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
"no-duplicate-imports": "error",
},
},
];
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"preview:cf": "opennextjs-cloudflare build && opennextjs-cloudflare preview",
"start": "next start",
"lint": "eslint src/",
"lint:fix": "eslint src/ --fix",
"type-check": "tsc --noEmit",
"test:e2e": "playwright test",
"test:e2e:ui": "playwright test --ui"
Expand Down
Loading