sindresorhus/eslint-plugin-unicorn

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

已关闭

#765 创建于 2020年6月2日

 (3 条评论) (1 个反应) (0 位负责人)JavaScript (468 个派生)user submission
bughelp wanted

仓库指标

星标
 (5,022 个星标)
PR 合并指标
 (平均合并 1天 16小时) (30 天内合并 399 个 PR)

描述

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.

贡献者指南