-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[core] Fixes for upcoming eslint upgrade #6667
Conversation
These are the results for the performance tests:
|
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.
👍
return new Promise((resolve) => setTimeout(resolve, ms)); | ||
return new Promise((resolve) => { | ||
setTimeout(resolve, ms); | ||
}); |
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.
Nice, I have always hated these implicit unclear returns.
@@ -258,7 +260,7 @@ export const useGridRowGrouping = ( | |||
>(() => { | |||
const sanitizedRowGroupingModel = gridRowGroupingSanitizedModelSelector(apiRef); | |||
const rulesOnLastRowTreeCreation = | |||
apiRef.current.unstable_caches.rowGrouping.rulesOnLastRowTreeCreation; | |||
apiRef.current.unstable_caches.rowGrouping.rulesOnLastRowTreeCreation || []; |
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.
Should we have behavior changes in this PR?
apiRef.current.unstable_caches.rowGrouping.rulesOnLastRowTreeCreation || []; | |
apiRef.current.unstable_caches.rowGrouping.rulesOnLastRowTreeCreation; |
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.
It replaces https://github.com/mui/mui-x/pull/6667/files#diff-1250ff9bde7c6785848b32e7acde51bdce6c5e7d4d82a884a287d33e0e4d8350L267 which eslint complains in https://eslint.org/docs/latest/rules/default-param-last
.
I can ignore it as well
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.
As far as I can tell it's functionally equivalent, but I removed it. We can bring it back in a separate PR.
@@ -159,7 +159,7 @@ export const ClockPicker = React.forwardRef(function ClockPicker<TDate extends u | |||
components, | |||
componentsProps, | |||
value, | |||
disableIgnoringDatePartForTimeValidation, | |||
disableIgnoringDatePartForTimeValidation = false, |
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.
Same question
disableIgnoringDatePartForTimeValidation = false, | |
disableIgnoringDatePartForTimeValidation, |
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.
Same as above but for https://github.com/mui/mui-x/pull/6667/files#diff-e2061e7eec043ba1ab45746803975267576725a37d32733b469fc7f8b2079a00L40.
Happy to revert and ignore, but this felt quite safe as it didn't seem to be publicly exposed.
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.
If eslint
rules call for it, IMHO, it was a perfectly fine change.
We already default it as false
in the function down the line.
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'll make a separate PR. That way we have an easy to bissect git history should it run into an unforeseen edge case
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Bringing in most of the fixes necessary to pass the eslint upgrade in mui/material-ui#34642
Nothing should be breaking. Just pointing out changes to the following: https://github.com/mui/mui-x/pull/6667/files#diff-8a3d1997d458bbb8861a31ed9b2db9137c1389883964b6d546c68b42645f5c96