Bug: [array-type] --fix
removes neccesary brackets leading to a type with a different meaning
#5941
Closed
4 tasks done
Labels
accepting prs
Go ahead, send a pull request that resolves this issue
bug
Something isn't working
package: eslint-plugin
Issues related to @typescript-eslint/eslint-plugin
Before You File a Bug Report Please Confirm You Have Done The Following...
Playground Link
https://typescript-eslint.io/play/#ts=4.8.4&jsx=true&sourceType=module&code=C4TwDgpgBA6g9gJwNYEsB2BzAgghBDEKAXigG8AoKKOAV2AgQAUE5IFQAuKHfEAHkpUyUdGgbNWDUAHkxXAM7AE6DFAC+UAGTDR4lm1AAVAO5wFSlesEA+ANzk198qEhQAQiyQQ0PAsTKCtPRM+lIgXL78glQAFKQiaGIhkuwgshDmypjqWjqJeilGppmWagCUNvaO5EA&eslintrc=N4KABGBEAOA2CuBzAlgOwM6QFxgNrgigAEAXAT2gFN0BjAJ2WhIFprY0TICBdAGgMiUAHiUqoAJphz5CUOEjRZSFavUYs2HAPToSDGpx78IMAIZ10lOtmLkqtBk1bp2qElujnL141DrxYahtQWUhlezUnTTctczpTMmY7ShtBOjoAe2sCAF8QHKA&tsconfig=N4KABGBEDGD2C2AHAlgGwKYCcDyiAuysAdgM6QBcYoEEkJemy0eAcgK6qoDCAFutAGsylBm3TgwAXxCSgA
Repro Code
ESLint Config
tsconfig
Expected Result
Actual Result
The meaning of the
BrokenArray
type should not be changed.Additional Info
No response
Versions
@typescript-eslint/eslint-plugin
5.42.1
@typescript-eslint/parser
5.42.1
TypeScript
4.8.4
ESLint
8.27.0
node
18.7.0
The text was updated successfully, but these errors were encountered: