willhoney7 / eslint-plugin-import-helpers

ESLint plugin to help enforce a configurable order for import statements
291 stars 17 forks source link

Ensure newlines aren't inserted into large group #44

Closed bmish closed 2 years ago

bmish commented 2 years ago

I noticed that import-helpers/order-imports was unnecessarily adding a blank line after 100 imports in the same group with my configuration.

It's easily possible to end up with a large group of imports when importing all the files in a directory which contains over 100 files, especially for auto-generated directory index files. Example: https://github.com/ember-template-lint/ember-template-lint/blob/f92cae0bcc0fdfcc885bd5ca702e853f614815b5/lib/rules/index.js#L103

I have added a test case which succeeds now but failed before the fix.

willhoney7 commented 2 years ago

LGTM! Thanks!

willhoney7 commented 2 years ago

Released in v1.2.1