Skip to content

linter: Oxlint typescript/array-type lacks support for ESLInt equivilent array-simple option #11661

@KieranP

Description

@KieranP

What version of Oxlint are you using?

1.1.0

What command did you run?

oxlint

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

N/A

What happened?

I'm trying to migrate from eslint. In ESLint, one of the TypeScript rules, array-type lets you specify what style, and oxlint has this too. They support either array (e.g. number[]), generic (e.g. Array<number>), or a third option which oxlint (at least according to the docs) does not support, array-simple. This supports number[] because it is simple, but Array<number | null> because it is not simple. This is a pattern we've used quite a bit in our application. It would be good if oxlint supported the same third option.

array

Good: number[], (number | null)[]
Bad: Array<number>, Array<number | null>

generic

Good:Array<number>, Array<number | null>
Bad: number[], (number | null)[]

array-simple

Good: number[], Array<number | null>
Bad: Array<number>, (number | null)[]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions