1

I'm doing project Django Rest Framework + Vue.js I've got a problem with eslint

error Parsing error: Unexpected token


   5 |     <b-container>
   6 |       <b-row class="question-row">
>  7 |         <b-form @submit="onSubmit" @reset="onReset">
     |                 ^
   8 |           <b-form-group id="input-group"
   9 |                         :label="getQuestion(1)"
  10 |                         label-for="input-1">

here's my .eslintrc.json file

{
  "env": {
    "es6": true,
    "node": true
  },
  "extends": [
    "eslint:recommended",
    "plugin:vue/essential",
    "plugin:vue/base"
  ],
  "parser": "babel-eslint",
  "parserOptions": {
    "ecmaVersion": 7,
    "sourceType": "module",
    "ecmaFeatures": {
      "jsx": true,
      "modules": true
    }
  },
  "plugins": [
    "vue"
  ],
  "rules": {
    "max-len": ["error", {"code": 121}],
    "semi": ["error","always"],
    "no-console": 0
  }
}

and do I need babel.config.json? It was added to my project after initializing Vue project. Here's my code

module.exports = {
  presets: [
    '@vue/cli-plugin-babel/preset',
  ],
};

1 Answer 1

1

try to change @submit into v-on:submit

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.