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

[Rule Proposal]: Break style for class attributes #1926

Open
Satont opened this issue Jul 1, 2022 · 1 comment
Open

[Rule Proposal]: Break style for class attributes #1926

Satont opened this issue Jul 1, 2022 · 1 comment

Comments

@Satont
Copy link

Satont commented Jul 1, 2022

Please describe what the rule should do:

Break style for class attributes, or maybe even class and style attributes?

I wan't to line break multi line classes to oneline.
I'm not sure what options this rule should have other than oneline.

What category should the rule belong to?

[X] Enforces code style (layout)
[ ] Warns about a potential error (problem)
[ ] Suggests an alternate way of doing something (suggestion)
[ ] Other (please specify:)

Provide 2-3 code examples that this rule should warn about:
That's should be warned if i set rule to oneline.

 <h6
    class="
    text-gray-500
    font-semibold
    text-sm
    py-2
    px-4
    block
    w-full
    whitespace-nowrap
    bg-transparent
  "
  >
Variables
</h6>

Should be warned

Additional context

I'm using eslint for automatically fix code issues on save, so if it possible to autofix it - will be much appreciated.

@ota-meshi
Copy link
Member

Thank you for posting this issue.
The rule for making line break styles consistent sound good to me.

However, we need to consider the rule name.
Also, I think we may need some options for the line break style. We also need to consider options.

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

No branches or pull requests

2 participants