Skip to content

⭐️New: Add directive-interpolation-spacing rule #599

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

Closed
wants to merge 2 commits into from
Closed

⭐️New: Add directive-interpolation-spacing rule #599

wants to merge 2 commits into from

Conversation

milewski
Copy link

@milewski milewski commented Oct 7, 2018

Hi, i dont know what is the criteria used to determine which category a rule should go so let me know if it should be somewhere else than "strongly-recommended" ,

This PR gives the ability to format the expression within properties binding:

<template>
    <div>
        <!-- transform this: -->
        <div :class="{test:132}" />
        <!-- to: -->
        <div :class="{ test: 132 }" />
    </div>
</template>

This is a problem that extremely annoys me... perhaps there was already a solution for this which i'm not aware of?

🤞

Copy link
Contributor

@armano2 armano2 left a comment

Choose a reason for hiding this comment

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

@milewski You can have this formating with eslint rules:

this implementation is not giving you much flexibility

@milewski
Copy link
Author

milewski commented Oct 20, 2018

I felt that there would be a way of doing that with the existing rules.. Do you have any example of how to use existing rules to format specific section?

Because that two rules did not catch the expressions inside the directives, so maybe if I could indicate that part should be processed by rule X or Y then I could eliminate the need of adding the spacing on curly using this PR

@mysticatea
Copy link
Member

Thank you for this PR.

I prefer to re-implement of the existing rules for Vue.js template.
vue/object-curly-spacing and something like will be useful because the core rules don't work in Vue.js template.

@michalsnik michalsnik changed the title add directive-interpolation-spacing rule ⭐️New: Add directive-interpolation-spacing rule Nov 6, 2018
@armano2 armano2 dismissed their stale review November 17, 2018 05:03

no longer valid

@michalsnik
Copy link
Member

Closing in favour of #680

@michalsnik michalsnik closed this Jan 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants