-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[order/newline-after-import]: More new lines allowed than specified in config #1901
Comments
It's a bit vague in the docs, but it's only enforcing a minimum. It seems reasonable to add an option that would enforce |
From reading the docs I would expect it to enforce an exact number of new lines. It would definitely be nice to have an option for this! |
PRs both to make the docs more clear, and to add such an option, would be welcome. |
I will try to implement the option and update the docs soon. |
Fixes import-js#1901. Fixes import-js#514. Co-authored-by: Anix <anik220798@gmail.com> Co-authored-by: reosarevok <reosarevok@metabrainz.org>
I'm running into an issue with
import/order
andimport/newline-after-import
, where more newlines are allowed than specified in the configuration. My (minimal) ESLint config looks like this:I would expect this to ensure that there is always exactly one newline between import groups, and after all imports, e.g.:
It works when there are less newlines than required, the following would result in an error for example:
It does not seem to work when there are more newlines than the specified
count
however. I would expect the following to result in errors, but it works fine:Am I misunderstanding
newline-after-import
'scount
option, or is this a bug?The text was updated successfully, but these errors were encountered: