stale-eslint-disable-reporting: Stale ESLint Disable Reporting #1

Open
std-bot wants to merge 2 commits from task/stale-eslint-disable-reporting into main
First-time contributor

Assigned idea

Benchmark authoring specification.

Summary: Add strict unused eslint-disable reporting to Easy-Code-Lab's existing flat ESLint config while preserving the current Next.js Core Web Vitals, TypeScript, and generated-output ignore behavior.

Task intent: Improve the repository's upstream lint configuration so stale inline eslint-disable comments are treated as errors, without changing the app code or replacing the existing Next.js flat-config setup.

Benchmark plan: Construct the task package from the pinned repo state and present the solver with a normal maintenance request to update eslint.config.mjs. The requested change is to add a flat-config linterOptions entry setting reportUnusedDisableDirectives to "error", while preserving the imported Next Core Web Vitals config, TypeScript config, and existing globalIgnores entries.

Environment plan: The environment/repo is the materialized Easy-Code-Lab checkout at the fixed commit. The environment/task should add only verifier files, such as tests/test_outputs.py, and should not modify repository source before solving. Verification can run with Python and Node available; dependency installation is not required for the static verifier, but node --check eslint.config.mjs should be available.

Verifier plan: tests/test_outputs.py should read eslint.config.mjs, run node --check eslint.config.mjs, assert that reportUnusedDisableDirectives: "error" appears inside a linterOptions object, assert the existing ...nextVitals, ...nextTs, and globalIgnores usage remains, assert the default ignored paths .next/**, out/**, build/**, and next-env.d.ts remain, and assert no legacy .eslintignore file was introduced.

Oracle plan: The oracle solution edits only eslint.config.mjs by adding a flat config object in the defineConfig([ ... ]) array, for example after ...nextTs, with linterOptions: { reportUnusedDisableDirectives: "error" }. It leaves all existing imports, Next config spreads, and ignore entries intact.

Difficulty plan: This is easy to understand but prone to subtle mistakes: solvers may use obsolete .eslintrc or .eslintignore patterns, set the option to boolean true instead of error severity, overwrite the existing Next config array, or accidentally remove the default ignores that the current file explicitly preserves.

Repo patch scope: Expected upstream edits are limited to eslint.config.mjs; no application files, package metadata, lockfiles, or generated directories should be changed.

Anti-leakage notes: Solver-facing materials must not mention benchmark, harness, Snorkel, Harbor, std-ts, agent, stage, attempt, retry, generated task, or evaluation context. Present it only as an ordinary repository lint-maintenance request.

Approach: Use the existing ESLint flat config style already present in the repository. Add the linter option as a config object rather than introducing a legacy config file or changing the imported Next.js presets.

Verification: Run python -m pytest tests/test_outputs.py; the verifier should also execute node --check eslint.config.mjs and perform deterministic text assertions against eslint.config.mjs.

Risk: Low risk if scoped to the config file. The main risk is over-constraining formatting in the verifier, so checks should allow harmless whitespace and object-order differences while still requiring the exact lint behavior and preservation of existing config pieces.

Path rules: task package is tasks/; mutable upstream checkout is tasks//task/environment/repo; benchmark package files are under tasks//task; verifier/container environment belongs under tasks//task/environment; regular and UI verifier logic belongs in task/tests/test_outputs.py and test.sh only runs that file through pytest.

Agent context

Task slug: stale-eslint-disable-reporting
Branch: task/stale-eslint-disable-reporting

## Assigned idea Benchmark authoring specification. Summary: Add strict unused eslint-disable reporting to Easy-Code-Lab's existing flat ESLint config while preserving the current Next.js Core Web Vitals, TypeScript, and generated-output ignore behavior. Task intent: Improve the repository's upstream lint configuration so stale inline eslint-disable comments are treated as errors, without changing the app code or replacing the existing Next.js flat-config setup. Benchmark plan: Construct the task package from the pinned repo state and present the solver with a normal maintenance request to update `eslint.config.mjs`. The requested change is to add a flat-config `linterOptions` entry setting `reportUnusedDisableDirectives` to `"error"`, while preserving the imported Next Core Web Vitals config, TypeScript config, and existing `globalIgnores` entries. Environment plan: The environment/repo is the materialized Easy-Code-Lab checkout at the fixed commit. The environment/task should add only verifier files, such as `tests/test_outputs.py`, and should not modify repository source before solving. Verification can run with Python and Node available; dependency installation is not required for the static verifier, but `node --check eslint.config.mjs` should be available. Verifier plan: `tests/test_outputs.py` should read `eslint.config.mjs`, run `node --check eslint.config.mjs`, assert that `reportUnusedDisableDirectives: "error"` appears inside a `linterOptions` object, assert the existing `...nextVitals`, `...nextTs`, and `globalIgnores` usage remains, assert the default ignored paths `.next/**`, `out/**`, `build/**`, and `next-env.d.ts` remain, and assert no legacy `.eslintignore` file was introduced. Oracle plan: The oracle solution edits only `eslint.config.mjs` by adding a flat config object in the `defineConfig([ ... ])` array, for example after `...nextTs`, with `linterOptions: { reportUnusedDisableDirectives: "error" }`. It leaves all existing imports, Next config spreads, and ignore entries intact. Difficulty plan: This is easy to understand but prone to subtle mistakes: solvers may use obsolete `.eslintrc` or `.eslintignore` patterns, set the option to boolean `true` instead of error severity, overwrite the existing Next config array, or accidentally remove the default ignores that the current file explicitly preserves. Repo patch scope: Expected upstream edits are limited to `eslint.config.mjs`; no application files, package metadata, lockfiles, or generated directories should be changed. Anti-leakage notes: Solver-facing materials must not mention benchmark, harness, Snorkel, Harbor, std-ts, agent, stage, attempt, retry, generated task, or evaluation context. Present it only as an ordinary repository lint-maintenance request. Approach: Use the existing ESLint flat config style already present in the repository. Add the linter option as a config object rather than introducing a legacy config file or changing the imported Next.js presets. Verification: Run `python -m pytest tests/test_outputs.py`; the verifier should also execute `node --check eslint.config.mjs` and perform deterministic text assertions against `eslint.config.mjs`. Risk: Low risk if scoped to the config file. The main risk is over-constraining formatting in the verifier, so checks should allow harmless whitespace and object-order differences while still requiring the exact lint behavior and preservation of existing config pieces. Path rules: task package is tasks/<slug>; mutable upstream checkout is tasks/<slug>/task/environment/repo; benchmark package files are under tasks/<slug>/task; verifier/container environment belongs under tasks/<slug>/task/environment; regular and UI verifier logic belongs in task/tests/test_outputs.py and test.sh only runs that file through pytest. ## Agent context Task slug: stale-eslint-disable-reporting Branch: task/stale-eslint-disable-reporting <!-- std-ts:idea-pr-body -->
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin task/stale-eslint-disable-reporting:task/stale-eslint-disable-reporting
git switch task/stale-eslint-disable-reporting

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff task/stale-eslint-disable-reporting
git switch task/stale-eslint-disable-reporting
git rebase main
git switch main
git merge --ff-only task/stale-eslint-disable-reporting
git switch task/stale-eslint-disable-reporting
git rebase main
git switch main
git merge --no-ff task/stale-eslint-disable-reporting
git switch main
git merge --squash task/stale-eslint-disable-reporting
git switch main
git merge --ff-only task/stale-eslint-disable-reporting
git switch main
git merge task/stale-eslint-disable-reporting
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
snorkel/root-repository-maintenance-99f07e1c783943!1
No description provided.