Skip to content

Rule Proposal: vue/max-lines-per-tag #202

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
julientechdev opened this issue Oct 5, 2017 · 3 comments
Closed

Rule Proposal: vue/max-lines-per-tag #202

julientechdev opened this issue Oct 5, 2017 · 3 comments

Comments

@julientechdev
Copy link

julientechdev commented Oct 5, 2017

Please describe what the rule should do:

This rule warns about the maximum lines permitted of the script, template & style tags.

What category of rule is this? (place an "X" next to just one item)

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

Provide 2-3 code examples that this rule will warn about:

vue/max-lines-per-tag: [ "warning", { "script": 100, "template": 80, "style": 120 } ];

It's pretty straightforward in terms of examples.

@julientechdev
Copy link
Author

The use case in my team:
We have a 300 max lines rule for all files, but vue files tend to get larger and split components isn't always the way to go.
Limiting the number of js lines is a requirement, template too, but styling not as much, and some components are using a lot of css lines while others don't, making it harder for us to set a global value for the whole files.

@michalsnik
Copy link
Member

I think it could be a quite useful rule. Though it might need a little bit extra work on vue-eslint-parser level to check number of lines in style tag.

@michalsnik
Copy link
Member

I initially marked it as accepted proposition, but now after quite a while I see there was no particular interest in this rule in the community, so I'm going to close this proposal.

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