-
Notifications
You must be signed in to change notification settings - Fork 1
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
FEUIUX-407 feat: add no-deprecated-components
rule
#21
Conversation
"eslint-comments/no-unused-disable": "error", | ||
"plentific/debug": "error", | ||
"plentific/no-concurrent-async": "error", | ||
"plentific/no-deprecated-components": [ |
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.
note: the only change in this file, everything else is prettified
569e6d7
to
1d9477e
Compare
"error", | ||
{ | ||
"examples/app/components/ComponentDeprecated": | ||
"examples/app/components/Component", |
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.
Leaving it as suggestion here, potentially this can be extended to an array, where as a second optional value we can provide a link to storybook where detailed examples can help developers with migrations.
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 thinking about that as well but the value is quite universal you can even do
{
"examples/app/components/ComponentDeprecated":
"examples/app/components/Component (see documentation on https://bla.com)",
}
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.
but probably i'd won't do exact matching because if deprecated component will be moved, and somebody forget to adjust the rule, it will stop matching, maybe so if we do matching like import ends with, you can still do exact match or just sub matching components/ComponentDeprecated
or just ComponentDeprecated
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.
yeah, as @rostislav-simonik-plc mentioned - i did similar in the dashboard
PR already: https://github.com/plentific/dashboard/pull/25141/files#diff-e2954b558f2aa82baff0e30964490d12942e0e251c1aa56c3294de6ec67b7cf5R32
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 wouldn't lock it into Storybook, because not every substitution is UX/UI/Storybook/Blueprint-related
Jira
https://plentific.atlassian.net/browse/FEUIUX-315
https://plentific.atlassian.net/browse/FEUIUX-407
Description
This is a new rule that will detect imports from paths that were configured as restricted and output a message with a suitable replacement.
Example configuration:
Screenshots