-
Notifications
You must be signed in to change notification settings - Fork 5.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: update dlint to v0.37.0 for GitHub Actions #17295
Conversation
2d08127
to
1d18655
Compare
It appears that |
1d18655
to
f2acd96
Compare
That's not possible, somehow |
I did not seem to be able to solve the |
@@ -139,7 +139,7 @@ | |||
|
|||
#pollControl = async () => { | |||
while (this.#status === "RUNNING") { | |||
const [type, data] = await hostRecvCtrl(this.#id); | |||
const { 0: type, 1: data } = await hostRecvCtrl(this.#id); |
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.
I don't really get these changes, @petamoriken could you explain what's the advantage of using this syntax over array destructuring?
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.
please see denoland/deno_lint#1106
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.
Okay, I'm asking because I see changes in test files that are a bit surprising - these tests should ideally be checked with exactly same rules as user code since they are testing public API that users would use. Do you think we should revert changes to test code?
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.
IMO, modern for-of
should be used in test files, not for-in
, which has traps. I believe it is worthwhile to apply the guard-for-in
rule to test files.
@@ -351,8 +350,8 @@ async function update() { | |||
|
|||
const currentExpectation = getExpectation(); | |||
|
|||
for (const path in resultTests) { | |||
const { passed, failed, testSucceeded } = resultTests[path]; | |||
for (const result of Object.values(resultTests)) { |
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.
Does that mean that deno lint
will now warn on all usage of for ... in ...
in user code?
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.
No. The guard-for-in
rule is not tagged recommended and should have no effect unless explicitly enabled.
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.
LGTM
Updated third_party dlint to v0.37.0 for GitHub Actions. This PR includes following changes: * fix(prefer-primordials): Stop using array pattern assignments * fix(prefer-primordials): Stop using global intrinsics except for `SharedArrayBuffer` * feat(guard-for-in): Apply new guard-for-in rule
Updated third_party dlint to v0.37.0 for GitHub Actions. This PR includes following changes:
SharedArrayBuffer