-
Notifications
You must be signed in to change notification settings - Fork 4.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
Add margin-bottom lint rules for FocalPointPicker, TextareaControl, TreeSelect #63633
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
.eslintrc.js
Outdated
@@ -392,6 +400,7 @@ module.exports = { | |||
excludedFiles: [ | |||
'packages/components/src/utils/colors-values.js', | |||
'packages/components/src/theme/**', | |||
'**/*.@(native|ios|android).js', |
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.
Not excluding these mobile files was an oversight.
Size Change: 0 B Total Size: 1.75 MB ℹ️ View Unchanged
|
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.
🚀
- ✅ Removing
__nextHasNoMarginBottom
from linted components causes ESLint to show an error - ✅ Adding new components (like
ComboboxControl
) to the list also causes ESLint to error
…reeSelect (WordPress#63633) * Add margin-bottom lint rules for FocalPointPicker, TextareaControl, TreeSelect * Exclude stories and tests * Fixup * Fixup again Co-authored-by: mirka <0mirka00@git.wordpress.org> Co-authored-by: ciampo <mciampini@git.wordpress.org>
Part of #38730
What?
Adds eslint rules to prevent new instances of the following components to be introduced in the Gutenberg codebase without the
__nextHasNoMarginBottom
prop being added:Why?
We basically should've done this when we did the initial migration work for each component — we underestimated the time it would take to complete the entire deprecation process for the
BaseControl
-based family of components.The three components being linted here do not have new violations from the time we did the original migrations.
While I work through the list of components again to fix the new violations, these lint rules should prevent new violating usages from being added. Once all that is done, we can start logging an actual deprecation warning.
Testing Instructions
The linter should pass. It should fail if you add a still-violating component like
ComboboxControl
to the array.