Skip to content

padded-blocks for classes and switches #610

@caesarsol

Description

@caesarsol

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

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions