Skip to content

padded-blocks for classes and switches #610

Closed
@caesarsol

Description

As of now, the padded-blocks rule is configured as:

"padded-blocks": [2, "never"],

Since:

"always" requires empty lines at the beginning and ending of block statements (except switch statements and classes)
"never" disallows empty lines at the beginning and ending of block statements

And this implies that in classes and switch statements the never-padded-blocks is not enforced, wouldn't it be coherent to modify the rule as this?

"padded-blocks": [2, { "blocks": "never", "switches": "never", "classes": "never" }],

Here is the reference: http://eslint.org/docs/rules/padded-blocks#classes

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions