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: @typescript-eslint/keyword-spacing crashes #6060

Closed
Labels
accepting prsGo ahead, send a pull request that resolves this issuebugSomething isn't workinggood first issueGood for newcomerspackage: eslint-pluginIssues related to @typescript-eslint/eslint-plugin
@andreashuber69

Description

@andreashuber69

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

When running eslint on the repo as is, everything works as expected. However,when upgrading to v5.44 first, the lint crashes with the message below.See Repro Steps for more info.

Oops! Something went wrong! :(ESLint: 8.28.0TypeError: Cannot read properties of undefined (reading 'after')Occurred while linting /home/a/git/async-css-plugin/src/AsyncCssPlugin.ts:2Rule: "@typescript-eslint/keyword-spacing"    at ImportDeclaration[importKind=type] (/home/a/git/async-css-plugin/node_modules/@typescript-eslint/eslint-plugin/dist/rules/keyword-spacing.js:65:40)    at ruleErrorHandler (/home/a/git/async-css-plugin/node_modules/eslint/lib/linter/linter.js:1115:28)    at /home/a/git/async-css-plugin/node_modules/eslint/lib/linter/safe-emitter.js:45:58    at Array.forEach (<anonymous>)    at Object.emit (/home/a/git/async-css-plugin/node_modules/eslint/lib/linter/safe-emitter.js:45:38)    at NodeEventGenerator.applySelector (/home/a/git/async-css-plugin/node_modules/eslint/lib/linter/node-event-generator.js:297:26)    at NodeEventGenerator.applySelectors (/home/a/git/async-css-plugin/node_modules/eslint/lib/linter/node-event-generator.js:326:22)    at NodeEventGenerator.enterNode (/home/a/git/async-css-plugin/node_modules/eslint/lib/linter/node-event-generator.js:340:14)    at CodePathAnalyzer.enterNode (/home/a/git/async-css-plugin/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:795:23)    at /home/a/git/async-css-plugin/node_modules/eslint/lib/linter/linter.js:1150:32

Reproduction Repository Link

https://github.com/andreashuber69/async-css-plugin

Repro Steps

git clone https://github.com/andreashuber69/async-css-plugincd async-css-pluginnpm installnpx eslint src --ext .js,.ts

The lint should complete without error. If you then continue with:

npm install @typescript-eslint/eslint-plugin @typescript-eslint/parsernpx eslint src --ext .js,.ts

(the above installs v5.44 of both packages, v5.43 was installed before)
The lint crashes, see output above.

Versions

packageversion
@typescript-eslint/eslint-plugin5.44.0
@typescript-eslint/parser5.44.0
TypeScript4.9.3
ESLint8.28.0
node18.12.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issuebugSomething isn't workinggood first issueGood for newcomerspackage: eslint-pluginIssues related to @typescript-eslint/eslint-plugin

    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