[no-shadow] false positive for generics, callback argument names and more - considered as shadowing since v4.0.0 #2480
Labels
package: eslint-plugin
Issues related to @typescript-eslint/eslint-plugin
working as intended
Issues that are closed as they are working as intended
Repro
Two issues regarding the same rule
no-shadow
arose after upgrading to v4.0.2 (and reproduces onnv4.0.2-alpha.2
for the following configuration. v3.10.1 was fine for the same code.I opened 1 issue since it's all on the same rule, but LMK if I should open separate issue for the separate cases:
1. Callback arguments and parameters:
This reports the following error:
2. Generics in static methods
In reality this is a React component, and the static method is
getDerivedStateFromProps
, but it's the same idea.This reports the following error:
3. Mapped types
This reports the following error:
Also related:
reports:
Expected Result
No ESLint errors for these examples.
Actual Result
Errors are reported, as shown above.
Additional Info
Versions
@typescript-eslint/eslint-plugin
4.0.1
@typescript-eslint/parser
4.0.1
TypeScript
4.0.2
ESLint
7.8.1
node
12.18.3
The text was updated successfully, but these errors were encountered: