chore: tighten eslint rule overrides#46
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR tightens the project’s ESLint configuration (notably enabling @typescript-eslint/no-require-imports broadly with a narrow .cjs escape hatch) and removes now-unnecessary test/type rule overrides by updating configs and test utilities to avoid require()/any.
Changes:
- Convert
tsdownconfig to ESM and removerequire()usage while still injecting__REPORTER_VERSION__frompackage.json. - Tighten ESLint overrides by enabling
@typescript-eslint/no-require-importsglobally and removing stale test/vendor exemptions. - Improve reporter test harness typing so tests no longer need broad
any-related rule disables.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tsdown.config.mjs | Migrates config to ESM and replaces require('./package.json') with an ESM-safe version read. |
| eslint.config.mjs | Enables @typescript-eslint/no-require-imports globally and narrows the disable to **/*.cjs; removes stale test/vendor overrides. |
| tests/reporters/base.test.ts | Replaces createRequire() JSON loading with a direct package.json import for the reporter User-Agent/version assertions. |
| tests/helpers/reporter-test-harness.ts | Replaces broad any typings with tighter unknown/helper types and improves reporter constructor typing for tests. |
| src/types/vendor.d.ts | Tightens the electron module declaration from any to unknown. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
No findings to report. The changes are internally consistent and all CI checks pass. The PR tightens types across the test harness ( |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
After thorough analysis of all 16 changed files, I have no high-confidence findings to report. The changes are internally consistent and well-scoped:
All CI checks pass per the PR description. No correctness, security, performance, or maintenance risks identified. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 23 out of 24 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
src/reporters/create-item.ts:33
- GameApiPostBody now allows numeric values, but isCreateItemPostBody only accepts strings. If postBody values are numbers, this reporter will log "Invalid create item report data" and skip reporting even though parseInt/Number conversion would work.
export default class CreateItemReporter extends BaseReporter implements Reporter {
handle(
method: GameApiMethod,
path: GameApiPath,
body: GameApiResponseBody,
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
I've performed an adversarial review of all 25 changed files in this PR. Here's my assessment: No high-confidence findings to report. The changes are internally consistent and well-scoped:
The suppressed Copilot comments (claiming guards reject numeric values) do not match the final code — both |



Summary
@typescript-eslint/no-require-importsglobally, with a narrow.cjsoverrideany, unsafe rules, and import extensionsrequire()calls with imports and move tsdown config to ESM.mjsno-explicit-anyexemptionValidation