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

refactor: migrate to Composition API with SFC Setup and new defaults #716

Merged
merged 5 commits into from
Jul 16, 2024

Conversation

ShGKme
Copy link
Contributor

@ShGKme ShGKme commented Jul 16, 2024

Follow 2022+ Vue recommendations and defaults:

  • Migrate to Composition API
    • Using SFC Setup as a new default recommendation and a place with better TS support with new features in Vue 3
  • Change block order to script, template
    • Places template close to styles

Add corresponding ESLint rules

ShGKme added 5 commits July 16, 2024 15:45
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
@ShGKme ShGKme added 3. to review technical debt Maintenance and refactoring labels Jul 16, 2024
@ShGKme ShGKme requested review from DorraJaouad and Antreesy July 16, 2024 13:59
@ShGKme ShGKme self-assigned this Jul 16, 2024
Copy link
Contributor

@Antreesy Antreesy left a comment

Choose a reason for hiding this comment

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

Apart from it, migrated 1:1

NcTextArea,
},

inheritAttrs: false,
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was here by mistake. Added a "long" time ago, then Help was implemented as a NcModal wrapper.

In SFC Setup it's easy to add it via

defineOptions({
  inheritAttrs: false,
})

But in Vue 2 it is not available and requires an additional block:

<script>
export default {
  inheritAttrs: false, 
}
</script>

@ShGKme ShGKme merged commit 0d5512d into main Jul 16, 2024
6 checks passed
@ShGKme ShGKme deleted the refactor/composition-api branch August 3, 2024 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review technical debt Maintenance and refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants