-
-
Notifications
You must be signed in to change notification settings - Fork 47.2k
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
chore: 🆙 upgrade typescript-eslint #26600
Conversation
/rebase |
4c48930
to
f84df00
Compare
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 9d676eb:
|
Size Change: -2 B (0%) Total Size: 876 kB
ℹ️ View Unchanged
|
Need help to fix new eslint errors. |
I would recommend not upgrading to typescript-eslint 4 until these annoying false positives are fixed, see https://github.com/typescript-eslint/typescript-eslint/milestone/7 |
/rebase |
2d3f4a1
to
53d34c7
Compare
For information, https://github.com/typescript-eslint/typescript-eslint/releases/tag/v4.1.0 has been released and fixes 90% of v4 false positives, but I still see a few remaining false positives in our own codebase at @Arhia. |
Need to continue to wait for version 4.1.1 or higher... |
e76337a
to
4fdef30
Compare
Actually, community feedbacks show there more and more false positives detected, 4.X is definitely not currently usable. |
/rebase |
/rebase |
65ce1c0
to
6a22ca3
Compare
/rebase |
/rebase |
/rebase |
@@ -33,7 +33,7 @@ export interface ModalStaticFunctions { | |||
export default function confirm(config: ModalFuncProps) { | |||
const div = document.createElement('div'); | |||
document.body.appendChild(div); | |||
// eslint-disable-next-line no-use-before-define | |||
// eslint-disable-next-line @typescript-eslint/no-use-before-define | |||
let currentConfig = { ...config, close, visible: true } as any; |
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.
我也想知道 close 是从什么地方 来的 没看懂
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.
window.close?
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.
window.close?
不是,就是一个close的props
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.
可以提到前面来:
ant-design/components/modal/confirm.tsx
Lines 78 to 85 in 9d676eb
function close(...args: any[]) { | |
currentConfig = { | |
...currentConfig, | |
visible: false, | |
afterClose: destroy.bind(this, ...args), | |
}; | |
render(currentConfig); | |
} |
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.
window.close?
不是,就是一个close的props
根本 没有 定义。。。
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.
看我的回复。
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.
提不了吧 互相 引用了
lint 终于 过了🥳 |
Codecov Report
@@ Coverage Diff @@
## master #26600 +/- ##
=======================================
Coverage 99.82% 99.82%
=======================================
Files 384 384
Lines 7371 7371
Branches 2009 2050 +41
=======================================
Hits 7358 7358
Misses 13 13
Continue to review full report at Codecov.
|
@@ -1,4 +1,4 @@ | |||
/* eslint no-use-before-define: "off" */ | |||
/* eslint @typescript-eslint/no-use-before-define: "off" */ |
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.
这个还需要么
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.
需要
@@ -121,6 +121,14 @@ module.exports = { | |||
'unicorn/prefer-trim-start-end': 2, | |||
'unicorn/expiring-todo-comments': 2, | |||
'unicorn/no-abusive-eslint-disable': 2, | |||
|
|||
// https://github.com/typescript-eslint/typescript-eslint/issues/2540#issuecomment-692866111 | |||
'no-use-before-define': 0, |
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.
为什么他们不通过覆盖config的方式来关闭,要用户自己配置呢?
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.
我也不知道 也没 找到 其它 好的 方案了 ,只能 这样先 干掉,看了下 ts 的确 是正确的 引用
[中文版模板 / Chinese template]
🤔 This is a ...
🔗 Related issue link
💡 Background and solution
📝 Changelog
☑️ Self Check before Merge