Path: blob/main/docs/rules/newline-after-import.md
829 views
import/newline-after-import
Enforces having one or more empty lines after the last top-level import statement or require call. +(fixable) The --fix option on the [command line] automatically fixes problems reported by this rule.
Rule Details
This rule has one option, count which sets the number of newlines that are enforced after the last top-level import statement or require call. This option defaults to 1.
Valid:
Invalid:
With count set to 2 this will be considered valid:
With count set to 2 these will be considered invalid:
Example options usage
When Not To Use It
If you like to visually group module imports with its usage, you don't want to use this rule.