Skip to content

Commit 68f595f

Browse files
committed
Apply lint (standard) formatting
1 parent 79143e2 commit 68f595f

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

lib/middlewares/router-links.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ const undelegate = function (el, handler) {
3838
el.removeEventListener(eventName, handler, false)
3939
}
4040

41-
const camelize = (str) => {
42-
if (str.indexOf('-') === -1) return str
43-
const words = str.split('-')
41+
const camelize = (str) => {
42+
if (str.indexOf('-') === -1) return str
43+
const words = str.split('-')
4444
let result = ''
4545
for (let i = 0; i < words.length; i++) {
46-
const word = words[i]
46+
const word = words[i]
4747
result += i ? word.charAt(0).toUpperCase() + word.slice(1) : word
4848
}
49-
return result
49+
return result
5050
}
5151

5252
function mutationHandler (mutations, observer) {
@@ -117,10 +117,10 @@ function updateLink (el, ownerEl) {
117117
if (anchorEl) anchorEl.setAttribute('href', href)
118118
if (!router.state.activeTransition) {
119119
updateActiveClass(el, routeName, params, query)
120-
}
120+
}
121121
} catch (error) {
122-
console.warn(`Error generating link for "${routeName}": ${error}`)
123-
}
122+
console.warn(`Error generating link for "${routeName}": ${error}`)
123+
}
124124
}
125125

126126
function createLinks (ownerEl, rootEl) {

tests/functional/routerLinksTest.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,15 +138,15 @@ describe('routerLinks', () => {
138138
const parentEl = document.querySelector(parentTag)
139139
await parentEl.updateComplete
140140

141-
expect($('#a-parentlink').attr('href')).to.be.equal('/parent')
141+
expect($('#a-parentlink').attr('href')).to.be.equal('/parent')
142142
})
143143
})
144144

145145
it('should use param-* and query-* attributes to generate href', async function () {
146146
return router.transitionTo('parent').then(async function () {
147147
const parentEl = document.querySelector(parentTag)
148148
await parentEl.updateComplete
149-
149+
150150
expect($('#a-rootlink2').attr('href')).to.be.equal('/root/2')
151151
expect($('#a-grandchildlink').attr('href')).to.be.equal('/parent/child/grandchild?name=test')
152152
})
@@ -156,7 +156,7 @@ describe('routerLinks', () => {
156156
return router.transitionTo('parent').then(async function () {
157157
const parentEl = document.querySelector(parentTag)
158158
await parentEl.updateComplete
159-
159+
160160
expect($('#a-secondrootlink').attr('href')).to.be.equal('/secondroot/2?testValue=yyy')
161161
})
162162
})
@@ -379,7 +379,7 @@ describe('routerLinks', () => {
379379
return router.transitionTo('brokenroot').then(async function () {
380380
const brokenEl = document.querySelector(brokenTag)
381381
await brokenEl.updateComplete
382-
expect($('#a-rootlink').attr('href')).to.be.equal('/root/1')
382+
expect($('#a-rootlink').attr('href')).to.be.equal('/root/1')
383383
})
384384
})
385385

0 commit comments

Comments
 (0)