Skip to content

Bug: [no-unused-expressions, no-empty-functions, possibly others...] extension rules crash with eslint v9.15.0 #10338

Closed
ministryofjustice/hmpps-typescript-lib
#28
@ext4cats

Description

@ext4cats

Before You File a Bug Report Please Confirm You Have Done The Following...

  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.
  • I have searched for related issues and found none that matched my issue.
  • I have read the FAQ and my problem is not listed.

Issue Description

eslint crashes when using the latest version of node 22 and the latest version of typescript-eslint.

Oops! Something went wrong! :(

ESLint: 9.15.0

TypeError: Error while loading rule '@typescript-eslint/no-unused-expressions': Cannot read properties of undefined (reading 'allowShortCircuit')
Occurred while linting /home/ext4cats/Projects/tseslint-8.14.0-bug/index.js
    at Object.create (/home/ext4cats/Projects/tseslint-8.14.0-bug/node_modules/.pnpm/eslint@9.15.0/node_modules/eslint/lib/rules/no-unused-expressions.js:75:13)
    at create (/home/ext4cats/Projects/tseslint-8.14.0-bug/node_modules/.pnpm/@typescript-eslint+eslint-plugin@8.14.0_@typescript-eslint+parser@8.14.0_eslint@9.15.0_typesc_u2crwq53uno6k5fweinf7nowby/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-expressions.js:28:32)
    at Object.create (/home/ext4cats/Projects/tseslint-8.14.0-bug/node_modules/.pnpm/@typescript-eslint+utils@8.14.0_eslint@9.15.0_typescript@5.6.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.js:31:20)
    at createRuleListeners (/home/ext4cats/Projects/tseslint-8.14.0-bug/node_modules/.pnpm/eslint@9.15.0/node_modules/eslint/lib/linter/linter.js:944:21)
    at /home/ext4cats/Projects/tseslint-8.14.0-bug/node_modules/.pnpm/eslint@9.15.0/node_modules/eslint/lib/linter/linter.js:1082:84
    at Array.forEach (<anonymous>)
    at runRules (/home/ext4cats/Projects/tseslint-8.14.0-bug/node_modules/.pnpm/eslint@9.15.0/node_modules/eslint/lib/linter/linter.js:1013:34)
    at #flatVerifyWithoutProcessors (/home/ext4cats/Projects/tseslint-8.14.0-bug/node_modules/.pnpm/eslint@9.15.0/node_modules/eslint/lib/linter/linter.js:1911:31)
    at Linter._verifyWithFlatConfigArrayAndWithoutProcessors (/home/ext4cats/Projects/tseslint-8.14.0-bug/node_modules/.pnpm/eslint@9.15.0/node_modules/eslint/lib/linter/linter.js:1993:49)
    at Linter._verifyWithFlatConfigArray (/home/ext4cats/Projects/tseslint-8.14.0-bug/node_modules/.pnpm/eslint@9.15.0/node_modules/eslint/lib/linter/linter.js:2082:21)

Reproduction Repository Link

https://github.com/ext4cats/tseslint-8.14.0-bug

Repro Steps

  1. clone the repo
  2. follow steps in readme

Versions

package version
typescript-eslint 8.14.0
TypeScript 5.6.3
ESLint 9.15.0
node 22.11.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issuebugSomething isn't workinglocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy