# ESLint

Vue error

Vue error: Parsing error: Unexpected token

eslint-plugin-vue

yarn add -D eslint eslint-plugin-vue@next

.eslint.js

module.exports = {
  root: true,
  parserOptions: {
    sourceType: 'module'
  },
  parser: "vue-eslint-parser",
  env: {
    browser: true,
    node: true,
    es6: true,
  },
  rules: {
    'no-console': 'off',
  }
}

restart

使用Eslint报"Parsing error: x-invalid-end-tag"错误的解决方案

vue将标签渲染为原生html标签时,由于这些标签是自闭合的,所以有end标签会报错。 适用于Elment-ui、iview

Vue error

Vue js引用警告 "export 'default' (imported as 'Api') was not found in './api'

ES6 编译器识别问题

修改引用js的地方

import Api from './api' 改成import * as Api from './api'