Skip to content
This repository was archived by the owner on Jan 19, 2019. It is now read-only.
This repository was archived by the owner on Jan 19, 2019. It is now read-only.

Padded block rules has false positive when block come after template string #255

Closed
@soda0289

Description

@soda0289

What version of TypeScript are you using?
2.2.2

What version of typescript-eslint-parser are you using?
master

Eslint Version
master

ESLint config

//    "extends": ["eslint:all"],
    "parser": "typescript-eslint-parser",
    "parserOptions": {
        "ecmaVersion": 6,
        "sourceType": "module",
        "ecmaFeatures": {
            "jsx": true
        }
    },
    "rules": {
        "indent": "error",
        "padded-blocks": ["error", "never"]
    }
};

What code were you trying to parse?

`${name}`;
{
    /* TODO Use system attribute name instead of column name */
    1 + 1;
}

What did you expect to happen?
Padded block with config ['error', 'never'] should not error here

What happened?
Eslint fails

/mnt/c/Users/reyad.attiyat/Workspace/eslint-test/test-padded-blocks.js
  2:1  error  Block must not be padded by blank lines  padded-blocks

Might be related too: #216

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