Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upThoughts on padded-blocks rule? #86
Comments
This comment has been minimized.
This comment has been minimized.
|
hmm wouldn't a fix be to treat comments as non-blank lines? |
This comment has been minimized.
This comment has been minimized.
|
I was able to verify that this passes with no linting problems: function doAsync () {}
function foo () {
return doAsync()
.then(function () {
return 'yay'
}, function () {
// user exited early
return 'wee'
})
}
module.exports = fooIs it possible to run |
This comment has been minimized.
This comment has been minimized.
Exact code: var argv = {}
commit()
//commits current working dir, resolves to html_url
function commit (result) {
var url = result.html_url
//user opted not to commit anything
if (argv.b || argv.bare) {
return Promise.resolve(url)
}
return getMessage().then(function (message) {
return gitCommit({
message: message,
url: url + '.git'
}).catch(function () {
return Promise.resolve(url)
}).then(function () {
// some stuff
return url
})
})
}
function getMessage () {
}
function gitCommit () {
} |
This comment has been minimized.
This comment has been minimized.
|
For that snippet w/ latest npm
|
This comment has been minimized.
This comment has been minimized.
|
@maxogden same! After fixing them it is clean. |
This comment has been minimized.
This comment has been minimized.
|
I'm using latest as well (3.2.1). I get the newline issue but not the I think this is related to the babel-eslint issue. #85 |
This comment has been minimized.
This comment has been minimized.
|
Resolved after #85 was fixed |
mattdesl
closed this
Mar 26, 2015
lock
bot
locked as resolved and limited conversation to collaborators
May 11, 2018
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
mattdesl commentedMar 25, 2015
What are your thoughts on the padded-blocks rule?
http://eslint.org/docs/rules/padded-blocks.html
I have some code like this:
But because of this rule I am getting an error because
// user exited earlyis treated as a blank line.Personally I find super strict rules like this just slow down my dev cycle.