agiledigital-labs / agiledigital-labs/eslint-plugin-total-functions
prefer-immutable-types causes ESLint to crash on matrices
- 主要言語
- TypeScript
- スター
- 92
- フォーク
- 5
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
```ts
const myFunction = (x: number[][]): string => {
return 0;
};
```
Causes the rule to crash:
```
Oops! Something went wrong! :(
ESLint: 8.56.0
RangeError: Maximum call stack size exceeded
Occurred while linting .../src/index.ts:1
Rule: "functional/prefer-immutable-types"
at TypeObject.hasOwn ()
at Function.hasOwn ()
at isTypeNode (.../is-immutable-type/dist/index.cjs:287:19)
at .../is-immutable-type/dist/index.cjs:246:30
at Array.map ()
at typeArgumentsToString (.../is-immutable-type/dist/index.cjs:245:47)
at TypeName.getNameWithArguments (.../is-immutable-type/dist/index.cjs:171:54)
at .../is-immutable-type/dist/index.cjs:253:26
at Array.map ()
at typeArgumentsToString (.../node_modules/is-immutable-type/dist/index.cjs:245:47)
```
While it doesn't crash with a single-depth array `number[]`
```ts
const myFunction = (x: number[]): string => {
return 0;
};
```
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
評価
この issue はまだ評価されていません。