Skip to content
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: fix unchanged files with check annotations #390

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

mpreyskurantov
Copy link
Contributor

No description provided.

@mpreyskurantov mpreyskurantov self-assigned this Mar 3, 2025

const props = withDefaults(
defineProps<{
icon: string,
tone?: 'warning' | 'info',
title? : string,
tone?: 'warning' | 'info', // eslint-disable-line vue/require-default-prop
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may be better to add default value?

Copy link
Contributor Author

@mpreyskurantov mpreyskurantov Mar 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about this... The tone prop is optional in all frameworks, but gha / eslint check complains against vue only. There is code (again, for all frameworks) that checks against truthy value:
https://github.com/DevExpress/devextreme-ui-template-gallery/blob/master/packages/vue/src/components/library/ticker-card.vue#L53
Specifying a default value may affect the prop non specified behavior.
At the same time. adding smth like | undefined (see a prev commit), does not suppress a warn.
https://github.com/search?q=repo%3ADevExpress%2Fdevextreme-ui-template-gallery+%3Cticker-card+path%3A*.vue&type=code
What to choose then?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants