Skip to content

Unexpected token after async  #147

@willin

Description

@willin

Tell us about your environment

  • ESLint Version: 4.3
  • eslint-plugin-vue Version: 3.11.0
  • Node Version: 8.1.4

Please show your full configuration:

module.exports = {
  root: true,
  extends: [
    'dwing',
    'plugin:vue/recommended'
  ],
  rules: {
    'global-require': 0,
    'import/extensions': [2, 'always', { js: 'never', vue: 'never' }]
  },
  settings: {
    'import/resolver': {
      webpack: {
        config: 'build/webpack.config.js'
      }
    }
  }
};

What did you do? Please include the actual source code causing the issue.

const actions = {
  async getAllData({ commit }) {
    await this.getAllData();
  }
};

export default actions;
// or this 
export const getAllData = async ({ commit }) => {
   await this.getAllData();
}

What did you expect to happen?

What actually happened? Please include the actual, raw output from ESLint.

file: 'file:///Users/willin/Desktop/vuetify-demo/src/store/actions.js' severity: '错误' message: 'Parsing error: Unexpected token getAllData' at: '2,9' source: 'eslint'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions