Vue.jsエラー 「Missing space before function parentheses / space-before-blocks」
とあるコンポーネント(hoge.vue)でエラーメッセージ:
3:17 error Missing space before function parentheses space-before-function-paren
該当箇所のコードは以下。
<script>
export default {
data: function() {
return {
title: ''
}
},
(VS Codeを使用しているが)Terminalに出ていたエラーは以下。
1 problems (1 errors, 0 warnings)
1 errors and 0 warnings potentially fixable with the `--fix` option.
素直に、以下コマンドでサーバ起動しなおすと、改善。
文法的に宜しくない記述方法なのかと思ったのだが、そうではなかった?
npm run serve --fix