Skip to content

[from-map] Does not work with TS files #49

Closed
@doniyor2109

Description

@doniyor2109

Repo

Config

{
  "parserOptions": {
    "sourceType": "module"
  },
  "parser": "@typescript-eslint/parser",
  "plugins": ["array-func"],
  "rules": {
    "array-func/from-map": "error"
  }
}

Code

Array.from({length: 5 }).map((x) => x);

Expected behavior

Should fix correctly as following:

Array.from({length: 5 }, (x) => x);

Actual behavior

Fixes incorrect:

, Array.from({length: 5 }).map((x) => x);

Here is repo: https://github.com/doniyor2109/demo-error-for-array-func-from-map

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions