Skip to content

[array-type] Support fixing readonly modifier (TS 3.4) #428

Closed
@bradzacher

Description

@bradzacher

Repro

// "typescript/array-type": ["error", "generic"]
const x : readonly number[] = [1];
// fixes to
const x : ReadonlyArray<number> = [1];


// "typescript/array-type": ["error", "array"]
const x : ReadonlyArray<number> = [1]; // should error, but doesn't
// fixes to
const x : readonly number[] = [1];

Versions

package version
@typescript-eslint/eslint-plugin 1.6.0
@typescript-eslint/parser 1.6.0
TypeScript 3.4.3
ESLint 5.16.0
node 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpackage: 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