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
Add max-lines #3808
Comments
@pburkindine Thanks for the suggestion. There is also a similar rule in ESLint. I think we'd want to call the rule
Feel free to contribute this rule. |
I'm going to work on this one, if nobody else is working already. |
I'm thinking about adding |
As a rule of thumb, we generally wait until an option is requested before adding it. So, let's just add the plain rule for now. |
Hey there. I hope you don't mind me hijacking this issue - it's a rule I'd like to start enforcing myself in my projects. I've pieced together a really basic implementation in #4021, which should cover the basic requirement for enforcing line count (no secondary options). Let me know if theres any issues with it! |
@cahamilton, sure, I don't mind at all. I was trying to implement this, but haven't found an optimal way to do this while following general approach used in the code base for other rules. |
@evilebottnawi @hudochenkov @jeddy3 @Maxim-Mazurok Working through the PR changes now and was wondering, how do we feel about updating the error message to something like the following?
Would help give more accurate test assertions considering things like different syntaxes, mixed line endings etc. Would also be somewhat more inline with error messaging found in ESLint, which uses: |
Yep, message from eslint looks better |
That makes sense. How's about we standardise on "Found ..." as it's shorter and a single word e.g.
The "Expected ..." convention is shared across all stylelint rules. And the "no more than" is shared across the |
@jeddy3 @Maxim-Mazurok @cahamilton any update here? |
PR welcome, it is open source |
No, @pburkindine sorry, I'm not using stylelint currently. Hopefully, @cahamilton will take care of it in #4021 |
The community is welcome to create a plugin for this. |
@jeddy3 I think this rule more about potential problems rather than stylistics, preventing many lines can help to maintenance big code base, yep, it sounds like stylistics, but this is not actually an indication of style, it's more about how to write code |
This issue is older than one month. Please ask before opening a pull request, as it may no longer be relevant. |
Developers create very large S/CSS files which cannot be maintained
Rule to set an error when the length of a file exceeds a given integer, same concept as tslint:max-file-line-count
The text was updated successfully, but these errors were encountered: