Skip to content

Commit

Permalink
Merge pull request #18 from xjamundx/standard
Browse files Browse the repository at this point in the history
Fixes for standard style
  • Loading branch information
feross committed Mar 2, 2017
2 parents c80916a + 9bcb245 commit ace8bf0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"dependencies": {},
"devDependencies": {
"eslint": "^3.0.1",
"mocha": "^2.2.5"
"mocha": "^2.2.5",
"standard": "*"
},
"homepage": "https://github.com/xjamundx/eslint-plugin-standard#readme",
"keywords": [
Expand Down
12 changes: 6 additions & 6 deletions rules/array-bracket-even-spacing.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,15 @@ module.exports = {
var last = context.getLastToken(node)

var openingBracketMustBeSpaced =
options.objectsInArraysException && second.value === '{' ||
options.arraysInArraysException && second.value === '[' ||
options.singleElementException && node.elements.length === 1
(options.objectsInArraysException && second.value === '{') ||
(options.arraysInArraysException && second.value === '[') ||
(options.singleElementException && node.elements.length === 1)
? !options.spaced : options.spaced

var closingBracketMustBeSpaced =
options.objectsInArraysException && penultimate.value === '}' ||
options.arraysInArraysException && penultimate.value === ']' ||
options.singleElementException && node.elements.length === 1
(options.objectsInArraysException && penultimate.value === '}') ||
(options.arraysInArraysException && penultimate.value === ']') ||
(options.singleElementException && node.elements.length === 1)
? !options.spaced : options.spaced

// we only care about evenly spaced things
Expand Down
4 changes: 2 additions & 2 deletions rules/object-curly-even-spacing.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ module.exports = {
*/
function validateBraceSpacing (node, first, second, penultimate, last) {
var closingCurlyBraceMustBeSpaced =
options.arraysInObjectsException && penultimate.value === ']' ||
options.objectsInObjectsException && penultimate.value === '}'
(options.arraysInObjectsException && penultimate.value === ']') ||
(options.objectsInObjectsException && penultimate.value === '}')
? !options.spaced : options.spaced

// we only care about evenly spaced things
Expand Down

0 comments on commit ace8bf0

Please sign in to comment.