Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Bug: Crash on interaction between no-misused-spread and SystemStyleObject from Chakra UI v2 #10747

Closed
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.
@benj-dobs

Description

@benj-dobs

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 havesearched for related issues and found none that matched my issue.
  • I haveread the FAQ and my problem is not listed.

Issue Description

A strange case - when runningnpm run lint onthis sample repo, theno-misused-spread rule crashes with the following error:

Oops! Something went wrong! :(ESLint: 9.19.0TypeError: Cannot read properties of undefined (reading '0')Occurred while linting /Users/benj-dobs/Documents/tseslint-repro/index.tsx:6Rule: "@typescript-eslint/no-misused-spread"    at Object.getWellKnownSymbolPropertyOfType (/Users/benj-dobs/Documents/tseslint-repro/node_modules/ts-api-utils/lib/index.cjs:919:72)    at /Users/benj-dobs/Documents/tseslint-repro/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-spread.js:156:30    at Array.some (<anonymous>)    at isIterable (/Users/benj-dobs/Documents/tseslint-repro/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-spread.js:156:10)    at checkObjectSpread (/Users/benj-dobs/Documents/tseslint-repro/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-spread.js:122:17)    at ruleErrorHandler (/Users/benj-dobs/Documents/tseslint-repro/node_modules/eslint/lib/linter/linter.js:1160:48)    at /Users/benj-dobs/Documents/tseslint-repro/node_modules/eslint/lib/linter/safe-emitter.js:45:58    at Array.forEach (<anonymous>)    at Object.emit (/Users/benj-dobs/Documents/tseslint-repro/node_modules/eslint/lib/linter/safe-emitter.js:45:38)    at NodeEventGenerator.applySelector (/Users/benj-dobs/Documents/tseslint-repro/node_modules/eslint/lib/linter/node-event-generator.js:297:26)

There seems to be something about theStyleSystemObject type that causes the rule to crash. I haven't been able to reproduce this with simple types.

Reproduction Repository Link

https://github.com/benj-dobs/tseslint-repro

Repro Steps

  1. clone the repo
  2. npm install
  3. npm run lint

Versions

packageversion
@typescript-eslint/eslint-plugin8.22.0
@typescript-eslint/parser8.22.0
@typescript-eslint/scope-manager8.22.0
@typescript-eslint/typescript-estree8.22.0
@typescript-eslint/type-utils8.22.0
@typescript-eslint/utils8.22.0
TypeScript5.7.3
ESLint9.19.0
node22.13.1

Also reproduced with node 20.16.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


      [8]ページ先頭

      ©2009-2025 Movatter.jp