Skip to content

Commit ace8bf0

Browse files
authored
Merge pull request #18 from xjamundx/standard
Fixes for standard style
2 parents c80916a + 9bcb245 commit ace8bf0

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"dependencies": {},
1010
"devDependencies": {
1111
"eslint": "^3.0.1",
12-
"mocha": "^2.2.5"
12+
"mocha": "^2.2.5",
13+
"standard": "*"
1314
},
1415
"homepage": "https://github.com/xjamundx/eslint-plugin-standard#readme",
1516
"keywords": [

rules/array-bracket-even-spacing.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,15 +138,15 @@ module.exports = {
138138
var last = context.getLastToken(node)
139139

140140
var openingBracketMustBeSpaced =
141-
options.objectsInArraysException && second.value === '{' ||
142-
options.arraysInArraysException && second.value === '[' ||
143-
options.singleElementException && node.elements.length === 1
141+
(options.objectsInArraysException && second.value === '{') ||
142+
(options.arraysInArraysException && second.value === '[') ||
143+
(options.singleElementException && node.elements.length === 1)
144144
? !options.spaced : options.spaced
145145

146146
var closingBracketMustBeSpaced =
147-
options.objectsInArraysException && penultimate.value === '}' ||
148-
options.arraysInArraysException && penultimate.value === ']' ||
149-
options.singleElementException && node.elements.length === 1
147+
(options.objectsInArraysException && penultimate.value === '}') ||
148+
(options.arraysInArraysException && penultimate.value === ']') ||
149+
(options.singleElementException && node.elements.length === 1)
150150
? !options.spaced : options.spaced
151151

152152
// we only care about evenly spaced things

rules/object-curly-even-spacing.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ module.exports = {
132132
*/
133133
function validateBraceSpacing (node, first, second, penultimate, last) {
134134
var closingCurlyBraceMustBeSpaced =
135-
options.arraysInObjectsException && penultimate.value === ']' ||
136-
options.objectsInObjectsException && penultimate.value === '}'
135+
(options.arraysInObjectsException && penultimate.value === ']') ||
136+
(options.objectsInObjectsException && penultimate.value === '}')
137137
? !options.spaced : options.spaced
138138

139139
// we only care about evenly spaced things

0 commit comments

Comments
 (0)