chore(lint): enable linting on docs files (#1638)

This commit is contained in:
Xin Du (Clark) 2021-11-02 12:39:00 +00:00 committed by GitHub
parent aba2d224d0
commit a5fcd5a976
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 32 additions and 23 deletions

View File

@ -3,4 +3,3 @@ node_modules
schema
**/*.tmpl.*
sw.js
docs

7
docs/.eslintrc Normal file
View File

@ -0,0 +1,7 @@
{
"settings": {
"import/ignore": [
"vue"
]
}
}

View File

@ -63,11 +63,13 @@ export default {
...userOptions,
container: '#docsearch',
searchParameters: {
...((!lang) ? {} : {
...((!lang)
? {}
: {
facetFilters: [`${userOptions.langAttribute || 'language'}:${lang.iso}`].concat(
userOptions.facetFilters || []
)
}),
})
},
navigator: {
navigate: ({ itemUrl }) => {
@ -97,7 +99,7 @@ export default {
__v: 1,
props: {
href: hit.url,
children: children,
children,
onClick: (event) => {
if (isSpecialClick(event)) {
return
@ -119,7 +121,7 @@ export default {
}
this.$router.push(hit.url)
},
}
}
}
}

View File

@ -29,7 +29,8 @@
:key="link.to"
:title="link.title"
:docs="link.children"
:collapse.sync="link.collapse"
:collapse="link.collapse"
@update:collapse="link.collapse = $event"
/>
<AsideNavigationItem v-else :key="link.to" :docs="[link]" />
</template>

View File

@ -9,4 +9,4 @@
>
<path d="M80.0761 12L159.152 148.965H1L80.0761 12Z" fill="currentColor" />
</svg>
</template?
</template>

View File

@ -77,7 +77,7 @@ export default {
}
</script>
<style>
<style lang="postcss">
.highlight-box {
@apply transition-shadow duration-300;

View File

@ -6,10 +6,10 @@ export default {
template: 'docs',
twitter: 'nuxt_js',
algolia: {
appId: "BH4D9OD16A",
container: "#docsearch",
apiKey: "ff80fbf046ce827f64f06e16f82f1401",
indexName: "nuxtjs",
appId: 'BH4D9OD16A',
container: '#docsearch',
apiKey: 'ff80fbf046ce827f64f06e16f82f1401',
indexName: 'nuxtjs',
facetFilters: ['tags:v3']
},
github: {