Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"padded-blocks" false positive #2362

Closed
feross opened this issue Apr 23, 2015 · 2 comments
Closed

"padded-blocks" false positive #2362

feross opened this issue Apr 23, 2015 · 2 comments
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion

Comments

@feross
Copy link
Contributor

feross commented Apr 23, 2015

I get the following spurious error:

t.js:6:1: Block must not be padded by blank lines.

With the following config:

{
    "env": {
        "browser": false,
        "es6": true,
        "node": true,
    },

    "rules": {
        "padded-blocks": [2, "never"],
        "semi": [2, "never"]
    }
}

And the following code:

var a = 10

if (a === 1) {
  console.log(1)
// comment
} else if (a === 2) {
  console.log(2)
}

The lack of semis with the comment cause this bug.

New issue in 0.19.0. Issue did not exist in 0.18.0.

@lo1tuma
Copy link
Member

lo1tuma commented Apr 23, 2015

Duplicate of #2336

@feross
Copy link
Contributor Author

feross commented Apr 23, 2015

Sorry about the dupe issue. Hopefully the minimal example is helpful.

@nzakas nzakas closed this as completed Apr 23, 2015
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Feb 7, 2018
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Feb 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion
Projects
None yet
Development

No branches or pull requests

3 participants