Skip to content

Reduce disabled ESLint rules#87

Merged
kjonescertinia merged 1 commit into
apex-dev-tools:mainfrom
nawforce:agent-reduce-eslint-disables
Jul 9, 2026
Merged

Reduce disabled ESLint rules#87
kjonescertinia merged 1 commit into
apex-dev-tools:mainfrom
nawforce:agent-reduce-eslint-disables

Conversation

@nawforce

@nawforce nawforce commented Jul 9, 2026

Copy link
Copy Markdown

Summary

Closes #72.

This reduces the ESLint disabled-rule list by re-enabling four focused rules:

  • @typescript-eslint/only-throw-error
  • @typescript-eslint/no-require-imports
  • no-useless-assignment
  • preserve-caught-error

The related code changes replace a thrown plain object with Error, remove useless temporary assignments, and preserve caught errors as cause without requiring a newer TypeScript Error constructor overload.

The one remaining require('*.apex') call now has a targeted inline exception because the repo's TS transformer specifically inlines Apex source from require() calls. The broader config disable is no longer needed.

The remaining disabled-rule groups now have short rationale comments in eslint.config.js, so future cleanup work has clearer boundaries.

Verification

  • npm run lint
  • npm run build
  • npm test passed with elevated filesystem access for Salesforce CLI logs under ~/.sf

npm run lint still reports the pre-existing six @typescript-eslint/no-unused-vars warnings, but no errors.

@kjonescertinia kjonescertinia marked this pull request as ready for review July 9, 2026 11:47
@kjonescertinia kjonescertinia merged commit 6a625c3 into apex-dev-tools:main Jul 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reduce disabled ESLint rules

2 participants