Skip to content

lint: format default-theme #264

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions lib/default-theme/DropdownLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,12 @@
</template>

<script>
import { isExternal, ensureExt } from './util'
import NavLink from './NavLink.vue'
import DropdownTransition from './DropdownTransition.vue'

export default {
components: { NavLink, DropdownTransition },
data() {
data () {
return {
open: false
}
Expand All @@ -44,7 +43,7 @@ export default {
}
},
methods: {
toggle() {
toggle () {
this.open = !this.open
}
}
Expand Down
6 changes: 2 additions & 4 deletions lib/default-theme/Layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ export default {
)
},
shouldShowSidebar () {
const { themeConfig } = this.$site
const { frontmatter } = this.$page
return (
!frontmatter.layout &&
Expand All @@ -69,13 +68,13 @@ export default {
this.$localePath
)
},
pageClasses() {
pageClasses () {
const userPageClass = this.$page.frontmatter.pageClass
return [
{
'no-navbar': !this.shouldShowNavbar,
'sidebar-open': this.isSidebarOpen,
'no-sidebar': !this.shouldShowSidebar,
'no-sidebar': !this.shouldShowSidebar
},
userPageClass
]
Expand All @@ -88,7 +87,6 @@ export default {
this.$ssrContext.lang = this.$lang
this.$ssrContext.description = this.$page.description || this.$description
}

},

mounted () {
Expand Down
2 changes: 1 addition & 1 deletion lib/default-theme/NavLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default {
}
},
computed: {
link() {
link () {
return ensureExt(this.item.link)
}
},
Expand Down
8 changes: 4 additions & 4 deletions lib/default-theme/NavLinks.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default {
nav () {
const { locales } = this.$site
if (locales && Object.keys(locales).length > 1) {
let currentLink = this.$page.path
const currentLink = this.$page.path
const routes = this.$router.options.routes
const themeLocales = this.$site.themeConfig.locales || {}
const languageDropdown = {
Expand Down Expand Up @@ -63,11 +63,11 @@ export default {
return this.userNav
},
userLinks () {
return (this.nav || []).map((link => {
return (this.nav || []).map(link => {
return Object.assign(resolveNavLinkItem(link), {
items: (link.items || []).map(resolveNavLinkItem)
})
}))
})
},
repoLink () {
const { repo } = this.$site.themeConfig
Expand All @@ -93,7 +93,7 @@ export default {
}

return 'Source'
},
}
}
}
</script>
Expand Down
4 changes: 2 additions & 2 deletions lib/default-theme/Sidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@

<script>
import SidebarGroup from './SidebarGroup.vue'
import SidebarLink, { groupHeaders } from './SidebarLink.vue'
import SidebarLink from './SidebarLink.vue'
import NavLinks from './NavLinks.vue'
import { isActive, resolveSidebarItems } from './util'
import { isActive } from './util'

export default {
components: { SidebarGroup, SidebarLink, NavLinks },
Expand Down
2 changes: 1 addition & 1 deletion lib/default-theme/SidebarLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function renderLink (h, to, text, active) {
props: {
to,
activeClass: '',
exactActiveClass: '',
exactActiveClass: ''
},
class: {
active,
Expand Down