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

Latest commit

 

History

History
77 lines (67 loc) · 1.7 KB

terPaddedBlocksRule.md

File metadata and controls

77 lines (67 loc) · 1.7 KB

ter-padded-blocks (ESLint: padded-blocks)

rule_source test_source

enforce padding within blocks

Rationale

Some style guides require block statements to start and end with blank lines. The goal is to improve readability by visually separating the block content and the surrounding code.

Config

This rule has one option, which can be a string option or an object option

Examples

"ter-padded-blocks": [true]
"ter-padded-blocks": [true, "always"]
"ter-padded-blocks": [true, "never"]
"ter-padded-blocks": [true, { "blocks": "always" }]
"ter-padded-blocks": [true, { "blocks": "never" }]

Schema

{
  "type": "array",
  "items": [
    {
      "enum": [
        "always",
        "never"
      ]
    },
    {
      "type": "object",
      "properties": {
        "blocks": {
          "enum": [
            "always",
            "never"
          ]
        },
        "classes": {
          "enum": [
            "always",
            "never"
          ]
        },
        "switches": {
          "enum": [
            "always",
            "never"
          ]
        }
      },
      "additionalProperties": false
    }
  ],
  "maxLength": 1
}