8000 Rule proposal: make padding-line-between-statements support TS syntax · Issue #2293 · typescript-eslint/typescript-eslint · GitHub
[go: up one dir, main page]

Skip to content 8000
Rule proposal: make padding-line-between-statements support TS syntax #2293
Closed
@pascalgn

Description

@pascalgn

Proposal

Currently, padding-line-between-statements supports generic JS syntax elements like "class", "block", "block-like", "switch", "throw". However, TS-specific elements like "type" or "interface" are not supported.

{
  "rules": {
    "@typescript-eslint/padding-line-between-statements": [
      "error",
      {
        "blankLine": "always",
        "prev": "type",
        "next": "interface"
      }
    ]
  }
}
type SomeType = {
  value: string;
};
interface SomeInterface {
}

Expected Result

Rule should report the missing blank line between SomeType and SomeInterface.

Actual Result

The padding-line-between-statements rule from ESLint doesn't support the configuration options "type" or "interface" and will throw an error.

Additional Info

Original issue was submitted to eslint/eslint first: eslint/eslint#13477

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0