ter-newline-after-var (ESLint: newline-after-var)
require or disallow an empty newline after variable declarations
This rule enforces a coding style where empty lines are required or disallowed after var
, let
, or const
statements to achieve a consistent coding style across the project.
This rule has a string option:
"always"
(default) requires an empty line aftervar
,let
, orconst
. Comments on a line directly after var statements are treated like additional var statements."never"
disallows empty lines aftervar
,let
, orconst
.
"ter-newline-after-var": [true]
"ter-newline-after-var": [true, "always"]
"ter-newline-after-var": [true, "never"]
{
"type": "array",
"items": [
{
"enum": [
"always",
"never"
]
}
],
"maxLength": 1
}