Closed
Description
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