-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: false positive of no-shadow rule for TypeScript #666
fix: false positive of no-shadow rule for TypeScript #666
Conversation
@a-takamin
|
@koba04 I should change the content of the pull request. May I change this commit and use force push? |
@koba04 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@a-takamin Thank you! I left a comment.
lib/react-typescript.js
Outdated
"no-shadow": "off", | ||
"@typescript-eslint/no-shadow": "error", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you remove this change in this file?
This file should only include rules for React & TypeScript and the no-shadow
rule is related to TypeScript.
We expect lib/react-typescript
is used with lib/typescript
, so we don't have to have this setting besides in lib/typescript
.
We expect that lib/*
is an internal library and presets/*
is a public interface, so we don't intend lib/*
is used directly in ESLint configs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@koba04
Thanks for the review!
I am sorry for the lack of understanding. I understand the difference between lib/*
and presets/*
. I removed the changes in the file, and could you review it again please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Great work! Thank you!
I have added code that avoids the
"false positive"
problem of the eslint/no-shadow rule for TypeScript code discussed in"typescript-eslint"
issue below.Please see this issue for more detailed information.
typescript-eslint/typescript-eslint#2483