Skip to content
This repository has been archived by the owner on Feb 21, 2022. It is now read-only.

Latest commit

 

History

History
50 lines (39 loc) · 1.42 KB

terNewlineAfterVarRule.md

File metadata and controls

50 lines (39 loc) · 1.42 KB

ter-newline-after-var (ESLint: newline-after-var)

rule_source test_source

require or disallow an empty newline after variable declarations

Rationale

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.

Config

This rule has a string option:

  • "always" (default) requires an empty line after var, let, or const. Comments on a line directly after var statements are treated like additional var statements.
  • "never" disallows empty lines after var, let, or const.

Examples

"ter-newline-after-var": [true]
"ter-newline-after-var": [true, "always"]
"ter-newline-after-var": [true, "never"]

Schema

{
  "type": "array",
  "items": [
    {
      "enum": [
        "always",
        "never"
      ]
    }
  ],
  "maxLength": 1
}