Skip to content

bug(linter): bug in fixer for prefer-to-have-length #5132

@camc314

Description

@camc314

split from #5103

bunx oxlint@latest --jest-plugin --jsdoc-plugin --jsx-a11y-plugin --nextjs-plugin --react-perf-plugin -D prefer-to-have-length --fix <path name>

input

expect((meta.get('pages') as YArray<unknown>).length).toBe(
  (originalMeta.get('pages') as YArray<unknown>).length
);

output:

 (originalMeta.get('pages') as YArray<unknown>).length
);

expected output

expect((meta.get('pages') as YArray<unknown>)).toHaveLength(
  (originalMeta.get('pages') as YArray<unknown>).length
);

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-linterArea - LinterC-bugCategory - Buggood first issueExperience Level - Good for newcomers

    Type

    No type

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions