Add a space before a function declaration's parentheses.
Kaijun opened this issue · comments
Kaijun Chen commented
http://standardjs.com/rules.html
Add a space before a function declaration's parentheses.
function name (arg) { ... } // ✓ ok
function name(arg) { ... } // ✗ avoid
run(function () { ... }) // ✓ ok
run(function() { ... }) // ✗ avoid
Apparently this snippet doesn't follow this rule.
Any fixes?
Kaijun Chen commented
ok, i would add space manually for now.
Gabo Esquivel commented
thanks @Kaijun. I updated the readme.
snippets were fine, code is here https://github.com/gaboesquivel/atom-standardjs-snippets/blob/master/snippets/functions.cson#L2
f⇥
anonymous function
function (${1:arguments}) { ${0} }
fn⇥
named function
function ${1:name} (${2:arguments}) {
${0}
}