Skip to content
This repository was archived by the owner on Mar 23, 2024. It is now read-only.

Commit 8ddbd46

Browse files
mbohalmarkelog
authored andcommitted
Preset: switch multipleVarDecl rule in airbnb preset
Closes gh-822
1 parent b4532e3 commit 8ddbd46

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

presets/airbnb.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727
"disallowYodaConditions": true,
2828
"disallowKeywords": [ "with" ],
2929
"disallowMultipleLineBreaks": true,
30+
"disallowMultipleVarDecl": true,
3031
"requireSpaceBeforeBlockStatements": true,
3132
"requireParenthesesAroundIIFE": true,
3233
"requireSpacesInConditionalExpression": true,
33-
"requireMultipleVarDecl": "onevar",
3434
"requireBlocksOnNewline": 1,
3535
"requireCommaBeforeLineBreak": true,
3636
"requireSpaceBeforeBinaryOperators": true,

test/data/options/preset/airbnb.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
console.log('foo');
1111
} while (true);
1212

13-
// "requireMultipleVarDecl": "onevar"
13+
// "disallowMultipleVarDecl": true
1414
// requireCommaBeforeLineBreak
15-
var x = 1,
16-
// requireSpacesInConditionalExpression
17-
y = x ? x : null,
15+
var x = 1;
16+
// requireSpacesInConditionalExpression
17+
var y = x ? x : null;
1818
// disallowSpacesInsideArrayBrackets
19-
z = [1];
19+
var z = [1];
2020

2121
// requireSpaceAfterKeywords
2222
if (1) console.log('foo');
@@ -40,10 +40,10 @@
4040
// disallowSpaceAfterObjectKeys
4141
foo: function() {
4242
// safeContextKeyword
43-
var _this = this,
44-
// disallowDanglingUnderscores: false
45-
// validateQuoteMarks: ''
46-
_priv = 'yo';
43+
var _this = this;
44+
// disallowDanglingUnderscores: false
45+
// validateQuoteMarks: ''
46+
var _priv = 'yo';
4747

4848
// disallowEmptyBlocks
4949
return function() {

0 commit comments

Comments
 (0)