Skip to content

v-bind use dymaic import get errors #1246

Closed
@Volankey

Description

@Volankey

Tell us about your environment

  • ESLint version: 6.7.2
  • eslint-plugin-vue version: 6.1.2
  • Node version: v13.3.0

Please show your full configuration:

module.exports = {
  root: true,
  env: {
    node: true,
  },
  extends: ['@vue/standard', 'plugin:vue/recommended'],
  rules: {
    'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
    'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
    'comma-dangle': [
      'error',
      {
        arrays: 'always',
        objects: 'always',
        imports: 'never',
        exports: 'never',
        functions: 'never',
      },
    ],
    'comma-spacing': [
      'error',
      {
        before: false,
        after: true,
      },
    ],
    'space-before-function-paren': 0,
    'no-shadow': ['error'],
    'standard/object-curly-even-spacing': [0, 'either'],
    'standard/array-bracket-even-spacing': [0, 'either'],
    'standard/computed-property-even-spacing': [2, 'even'],
    'standard/no-callback-literal': [2, ['cb', 'callback']],
    'array-bracket-spacing': 'off',
    'vue/max-attributes-per-line': [
      2,
      {
        singleline: 20,
        multiline: {
          max: 1,
          allowFirstLine: false,
        },
      },
    ],
    'vue/no-parsing-error': [
      2,
      {
        'x-invalid-end-tag': false,
      },
    ],
  },
  parserOptions: {
    parser: 'babel-eslint',
    "ecmaVersion": 8,
    "sourceType": "module"
  },
}

What did you do?

 <IconRender
            style="vertical-align:middle;"
            :icon="()=>import('ui/lib/icons/ios-more')"
            :size="30"
            color="#333"
          />

What did you expect to happen?
no error

What actually happened?

{
"resource": "xxx.vue",
"owner": "generated_diagnostic_collection_name#1",
"severity": 8,
"message": "\n[vue/valid-v-bind]\n'v-bind' directives require an attribute value.",
"source": "eslint-plugin-vue",
"startLineNumber": 60,
"startColumn": 13,
"endLineNumber": 60,
"endColumn": 56
}
{
"resource": "xxx.vue",
"owner": "generated_diagnostic_collection_name#1",
"severity": 8,
"message": "\n[vue/no-parsing-error]\nParsing error: Unexpected token import.",
"source": "eslint-plugin-vue",
"startLineNumber": 60,
"startColumn": 24,
"endLineNumber": 60,
"endColumn": 24
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions