-
Notifications
You must be signed in to change notification settings - Fork 14.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
ESLint: Re-enable rule default-props-match-prop-types #10868
ESLint: Re-enable rule default-props-match-prop-types #10868
Conversation
@@ -30,7 +30,6 @@ const propTypes = { | |||
|
|||
const defaultProps = { | |||
colorScheme: undefined, | |||
onChange: () => {}, |
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.
this one is making me nervous, can we remove the .isRequired
instead?
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.
👍
@@ -64,7 +64,6 @@ const propTypes = { | |||
}; | |||
|
|||
const defaultProps = { | |||
showBuilderPane: 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.
seems less risky to remove the .isRequired
here too (unless you can confirm you checked all the calls)
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 did, but you're right, let's keep the default and remove isRequired
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 was confused about the type here and tracked it into the child component, and it looks unused there. Can you double check and remove all references to it here if that's the case?
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 seems that not only showBuilderPane
was unused, but also colorScheme
and setColorSchemeAndUnsavedChanges
. I removed references from this file, containers/DashboardBuilder and the spec file.
@@ -45,7 +45,6 @@ const propTypes = { | |||
}; | |||
|
|||
const defaultProps = { | |||
selectedSliceIds: [], |
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.
let's remove .isRequired
here to (unless you can confirm you checked all the calls)
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 did, but you're right, let's keep the default and remove isRequired
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, but will leave merging to @mistercrunch to make sure he's happy with the changes made :)
@mistercrunch Can we merge it now? I made the changes that you asked for |
@kgabryje we just found this PR broke Dashboard tab switch: i can't find exactly which line of change is wrong. But since dashboard tab switch is very critical function, i will have to revert this PR. |
@graceguo-supercat I'm sorry to hear that! I'll try to look into it |
This reverts commit 9f01a7f.
…boards_permissions * upstream/master: (46 commits) fix: surface connection error messages on the client (apache#11077) fix(jest): using UTC mock date (apache#11079) removing unused component (apache#11072) changing to the correct hex color (apache#11073) style: remove unecessary padding (apache#11071) fix: database list checkboxes (apache#11068) feat: adding all icons from the design system to the codebase (apache#11033) fix: sql lab autocomplete width (apache#11063) clickable labels have outlines, storybook shows them (apache#11034) fixed routes for customer in docs (apache#11052) Revert "style: fix checkbox color (apache#10970)" (apache#11051) feat: add "created by" to dashboard CRUD view (apache#11030) Changed `tags.py` and `helpers.py` in `models` module: removed disabled pylint rule `unused_import`, changed unused arguments to private and removed disabled rule `unused-argument. Removed redundant rules.` (apache#11037) chore: updated lint rules in models module (apache#11036) Removed disable global pytlint rule `standarderror-builtin` which isn't appearing for Python3 (apache#11038) Enabled argument-differ for bulk_delete (apache#11039) Enabled no-self-use pylint rule in security. Formatter (apache#11041) Changed variable name from capitals to lowercase and changed lint rule (apache#11044) Revert "ESLint: Re-enable rule default-props-match-prop-types (apache#10868)" (apache#11050) feat(saved_queries): add custom api filter for all string & text fields (apache#11031) ... # Conflicts: # superset/config.py # tests/dashboards/api_tests.py
…boards_permissions * upstream/master: (46 commits) fix: surface connection error messages on the client (apache#11077) fix(jest): using UTC mock date (apache#11079) removing unused component (apache#11072) changing to the correct hex color (apache#11073) style: remove unecessary padding (apache#11071) fix: database list checkboxes (apache#11068) feat: adding all icons from the design system to the codebase (apache#11033) fix: sql lab autocomplete width (apache#11063) clickable labels have outlines, storybook shows them (apache#11034) fixed routes for customer in docs (apache#11052) Revert "style: fix checkbox color (apache#10970)" (apache#11051) feat: add "created by" to dashboard CRUD view (apache#11030) Changed `tags.py` and `helpers.py` in `models` module: removed disabled pylint rule `unused_import`, changed unused arguments to private and removed disabled rule `unused-argument. Removed redundant rules.` (apache#11037) chore: updated lint rules in models module (apache#11036) Removed disable global pytlint rule `standarderror-builtin` which isn't appearing for Python3 (apache#11038) Enabled argument-differ for bulk_delete (apache#11039) Enabled no-self-use pylint rule in security. Formatter (apache#11041) Changed variable name from capitals to lowercase and changed lint rule (apache#11044) Revert "ESLint: Re-enable rule default-props-match-prop-types (apache#10868)" (apache#11050) feat(saved_queries): add custom api filter for all string & text fields (apache#11031) ... # Conflicts: # superset/config.py # tests/dashboards/api_tests.py
…_additions * commit 'c14a06db4185b9b043116708b649b0be2ad17a1f': Revert "style: fix checkbox color (#10970)" feat: add "created by" to dashboard CRUD view (#11030) Changed `tags.py` and `helpers.py` in `models` module: removed disabled pylint rule `unused_import`, changed unused arguments to private and removed disabled rule `unused-argument. Removed redundant rules.` (#11037) chore: updated lint rules in models module (#11036) Removed disable global pytlint rule `standarderror-builtin` which isn't appearing for Python3 (#11038) Enabled argument-differ for bulk_delete (#11039) Enabled no-self-use pylint rule in security. Formatter (#11041) Changed variable name from capitals to lowercase and changed lint rule (#11044) Revert "ESLint: Re-enable rule default-props-match-prop-types (#10868)" (#11050) feat(saved_queries): add custom api filter for all string & text fields (#11031) Support jinja templates (#11008)
* Re-enable rule default-props-match-prop-types * Restore default props and remove isRequired * Remove unused props
…#10868)" (apache#11050) This reverts commit 9f01a7f.
SUMMARY
Re-enable ESLint rule
default-props-match-prop-types
, which was disabled in PR #10839. Code was refactored to fix the errors raised by the rule.TEST PLAN
Run
npm run lint
, verify that there are no new Javascript/Typescript errors.ADDITIONAL INFORMATION