sindresorhus/eslint-plugin-unicorn

prevent-abbreviations renames parameter, but not reference to parameter in type guard signature

Open

#765 创建于 2020年6月2日

在 GitHub 查看
 (3 评论) (1 反应) (0 负责人)JavaScript (5,022 star) (468 fork)user submission
bughelp wanted

描述

Repro:

const isString = (val: unknown): val is string => typeof val === 'string'

gets autofixed to

const isString = (value: unknown): val is string => typeof value === 'string'

which no longer compiles because the signature still mentions val.

贡献者指南