agiledigital-labs / agiledigital-labs/eslint-plugin-total-functions
prefer-immutable-types causes ESLint to crash on matrices
- Ngôn ngữ chính
- TypeScript
- Star
- 92
- Fork
- 5
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
```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;
};
```
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.