-
Notifications
You must be signed in to change notification settings - Fork 164
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
Usage of directive shorthand syntax #1955
Comments
For the While the directive shorthands can make the code less verbose, their purpose may still be unclear to new contributors. So, I think we should discuss the pros and cons before anyone takes up this issue. |
Good catch! Let me update this issue to make it more general to update all notations to use shorthand. I definitely agree that it might make it less clear to people who are new to Vue, but I feel that the learning curve for the shorthands should be quite manageable. The main motivation behind this change was as I saw that the Vue guide stated that they would use shorthand syntax in code examples, as that's the most common usage for Vue developers, so it might be a good idea to follow the common standard. |
Use directive shorthands in .vue files This refactor removes explicit Vue directives and replaces them with shorthand syntax, following Vue's Style Guide practices to improve readability and reduce verbosity. Changes include: - Using `:` instead of `v-bind:` - Using `@` instead of `v-on:` - Using `#` instead of `v-slot`
What feature(s) would you like to see in RepoSense
Removal of explicit directives will help to make the code less verbose and will follow Vue's Style Guide strongly recommended rules for directive shorthands. For the
.vue
files, let's adopt the following rules of using directive shorthands::
forv-bind:
@
forv-on:
#
forv-slot
Example: Removal of explicit v-bind directive, such as replacing
<div v-bind:id="dynamicId"></div>
with<div :id="dynamicId"></div>
syntax instead.The text was updated successfully, but these errors were encountered: