sindresorhus/eslint-plugin-unicorn

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

Open

#765 geöffnet am 2. Juni 2020

Auf GitHub ansehen
 (3 Kommentare) (1 Reaktion) (0 zugewiesene Personen)JavaScript (5.022 Stars) (468 Forks)user submission
bughelp wanted

Beschreibung

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.

Contributor Guide