Skip to content

Commit

Permalink
Update eslint indent for switch
Browse files Browse the repository at this point in the history
  • Loading branch information
m4n1ok committed Apr 18, 2018
1 parent 9ff0a49 commit eb32b81
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 24 deletions.
8 changes: 5 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ module.exports = {
// no need of v-key in vue v-for loop
'vue/require-v-for-key': 'off',
// indent
'indent': ['error', 2],
'indent': ['error', 2, {'SwitchCase' : 1}],
'vue/script-indent': ['error', 2, {
'baseIndent': 1
'baseIndent': 1,
'switchCase': 1
}],
'no-useless-escape': 0,
// allow paren-less arrow functions
Expand All @@ -42,7 +43,8 @@ module.exports = {
rules: {
"indent": "off",
"vue/script-indent": ['error', 2, {
'baseIndent': 1
'baseIndent': 1,
'switchCase': 1
}]
}
}
Expand Down
17 changes: 8 additions & 9 deletions frontend/js/utils/formDataAsObj.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,16 +136,15 @@ export default function (formNode) {
// Set the main form object we are working on.
function setForm () {
switch (typeof formRef) {
case 'string':
$form = document.getElementById(formRef)
break
case 'string':
$form = document.getElementById(formRef)
break

case 'object':
if (isDomElementNode(formRef)) {
$form = formRef
}

break
case 'object':
if (isDomElementNode(formRef)) {
$form = formRef
}
break
}

return $form
Expand Down
24 changes: 12 additions & 12 deletions frontend/js/utils/tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -334,18 +334,18 @@ export default class Tooltip {

events.forEach(event => {
switch (event) {
case 'hover':
directEvents.push('mouseenter')
oppositeEvents.push('mouseleave')
break
case 'focus':
directEvents.push('focus')
oppositeEvents.push('blur')
break
case 'click':
directEvents.push('click')
oppositeEvents.push('click')
break
case 'hover':
directEvents.push('mouseenter')
oppositeEvents.push('mouseleave')
break
case 'focus':
directEvents.push('focus')
oppositeEvents.push('blur')
break
case 'click':
directEvents.push('click')
oppositeEvents.push('click')
break
}
})

Expand Down

0 comments on commit eb32b81

Please sign in to comment.