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: RuleTester doesn't fix properly when there are multiple fixes on the same line #8251

Closed as not planned
Labels
bugSomething isn't workingpackage: rule-testerIssues related to the @typescript-eslint/rule-tester packageworking as intendedIssues that are closed as they are working as intended
@StyleShit

Description

@StyleShit

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.

Relevant Package

rule-tester

Repro Code

See:https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/tests/rules/space-infix-ops.test.ts#L1021-L1049

{invalid:[{code:`        type Test=|string|(((() => void)))|string;      `,output:`        type Test = |string | (((() => void))) | string;      `,errors:[{messageId:'missingSpace',column:18,line:2,},{messageId:'missingSpace',column:19,line:2,},{messageId:'missingSpace',column:26,line:2,},{messageId:'missingSpace',column:43,line:2,},],},],}

Description

Splits from this thread:
#8065 (comment)

The code should be fixed properly when there are multiple fixes on the same line.
In the repro code, the fix should actually be

typeTest=|string|(((()=>void)))|string;

And in the thread, it should've been fixed regardless of me adding space as a workaround
(you can see that I've changed it from${'a'}${'b'} to${'a'} ${'b'})

Opened adraft PR to start an investigation.
Seems like there are some actual wrong fixes in the tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpackage: rule-testerIssues related to the @typescript-eslint/rule-tester packageworking as intendedIssues that are closed as they are working as intended

    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