Skip to content

fix: convert require() to ES import for pretty-error#310

Merged
EndBug merged 2 commits intodependabot/npm_and_yarn/multi-9ddd7eeb1cfrom
copilot/sub-pr-309
Feb 28, 2026
Merged

fix: convert require() to ES import for pretty-error#310
EndBug merged 2 commits intodependabot/npm_and_yarn/multi-9ddd7eeb1cfrom
copilot/sub-pr-309

Conversation

Copy link
Contributor

Copilot AI commented Feb 28, 2026

The @typescript-eslint/eslint-plugin upgrade from v6 to v8 introduced the @typescript-eslint/no-require-imports rule, which flags require() calls that the old no-var-requires disable comment did not cover.

Changes

  • src/index.ts: Replace require('pretty-error').start() with an ES-style import:
- // eslint-disable-next-line @typescript-eslint/no-var-requires
- require('pretty-error').start();
+ import * as PrettyError from 'pretty-error';
+ PrettyError.start();

Uses import * as since the package uses a export = declaration (CommonJS default export) without esModuleInterop enabled in tsconfig.


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: EndBug <26386270+EndBug@users.noreply.github.com>
Copilot AI changed the title [WIP] Update dependencies for minimatch and @typescript-eslint/eslint-plugin fix: convert require() to ES import for pretty-error Feb 28, 2026
@EndBug EndBug marked this pull request as ready for review February 28, 2026 11:36
@EndBug EndBug merged commit 5d54988 into dependabot/npm_and_yarn/multi-9ddd7eeb1c Feb 28, 2026
4 checks passed
@EndBug EndBug deleted the copilot/sub-pr-309 branch February 28, 2026 11:36
EndBug added a commit that referenced this pull request Feb 28, 2026
* chore(deps): bump minimatch and @typescript-eslint/eslint-plugin

Bumps [minimatch](https://github.com/isaacs/minimatch) to 3.1.5 and updates ancestor dependency [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin). These dependencies need to be updated together.


Updates `minimatch` from 3.1.2 to 3.1.5
- [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md)
- [Commits](isaacs/minimatch@v3.1.2...v3.1.5)

Updates `@typescript-eslint/eslint-plugin` from 6.21.0 to 8.56.1
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.56.1/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: minimatch
  dependency-version: 3.1.5
  dependency-type: indirect
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-version: 8.56.1
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix: convert `require()` to ES import for `pretty-error` (#310)

* Initial plan

* fix: convert require() import to ES import for pretty-error

Co-authored-by: EndBug <26386270+EndBug@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: EndBug <26386270+EndBug@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: EndBug <26386270+EndBug@users.noreply.github.com>
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.

2 participants