ni / javascript-styleguide

JavaScript and TypeScript Style Guide
MIT License
9 stars 9 forks source link

Disable @angular-eslint/component-max-inline-declarations in tests #75

Closed jattasNI closed 2 years ago

jattasNI commented 2 years ago

The @angular-eslint/component-max-inline-declarations rule enforces that inline component templates (those written in the .ts file) can only contain a 15 lines before they should be moved to a separate file. I propose this rule should be disabled in test files since it improves test readability to have helper components in the same file as the test, even if they are longer than 15 lines. We already disable a couple related rules with similar justification (see below in the file I'm editing).

This was spurred by this PR where someone disabled this rule in a test file. In this case the repo is using an older version of our ruleset so the rule was firing on smaller components, but I believe suppressing it would still be valid even if the component were larger.

jattasNI commented 2 years ago

@mure This PR is awaiting your vote!

jattasNI commented 2 years ago

@rajsite, @mure is on vacation for the rest of the year. This rule seems fairly noncontroversial so I think it would be ok to merge without all 4 votes.