Skip to content

linter: false positive for unicorn/prefer-array-some #7404

@pumano

Description

@pumano

What version of Oxlint are you using?

0.12.0

What command did you run?

oxlint -c oxlintrc.json --quiet

What does your .oxlint.json config file look like?

{
  "$schema": "./node_modules/oxlint/configuration_schema.json",
  "plugins": ["unicorn"],
  "rules": {
    "unicorn/prefer-array-some": "error"
  }
}

What happened?

That rule not properly handle findIndex and findLastIndex and negative one or zero comparison

Few months ago commit landed and add proper support.

I prepare PR for that support, but without fixer. I add TODO marks for it. Hope someone can add it later.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-linterArea - LinterC-bugCategory - Bug

    Type

    No type

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions