better-docs
better-docs copied to clipboard
Unable to parse SomeComponent.vue: Unexpected token
Hi, this happens when I try to generate docs:
ERROR: Unable to parse Username.vue: Unexpected token (7:4)
I cannot for the life of me figure out what I'm doing wrong.
Username.vue
<template>
<v-text-field
prepend-inner-icon="mdi-account-circle"
outlined dense filled
:label="label"
:value="value"
@change="(...args) => $emit('change', ...args)"
/>
</template>
<script>
/**
* @file Username.vue
* @name Username
* @memberof LoginForm
* @categories account
* @description Represents a username field component.
*
* @vue-prop {string} [label='label'] Label to use for the field.
*
* @vue-event {event} [change] Event bubbled from v-text-field.
*/
export default {
props: [
'label',
'value'
]
}
</script>
jsdoc.json (jsdoc config file)
{
"source": {
"include": ["./src/components"],
"includePattern": ".+\\.(vue|js)$"
},
"opts": {
"template": "node_modules/better-docs"
}
}
package.json
{
...
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
"docs": "jsdoc -r -c jsdoc.json -d ./docs -t ./node_modules/better-docs",
"test": "jest"
},
...
"devDependencies": {
"@vue/cli-plugin-babel": "~4.5.0",
...
"jsdoc": "^3.6.6",
...
"vue-template-compiler": "^2.6.12",
"vuetify-loader": "^1.3.0"
},
...
"extends": [
"plugin:vue/essential",
"eslint:recommended"
],
"parserOptions": {
"parser": "babel-eslint"
},
"rules": {}
},
...
}