Skip to content

Is two versions eslint-version-vue essential? #686

@Priestch

Description

@Priestch

Tell us about your environment

  • ESLint version: 5.9.0
  • eslint-plugin-vue version: 5.0.0-beta.5
  • Node version: v8.11.3

Please show your full configuration:

module.exports = {
  root: true,
  env: {
    node: true,
  },
  extends: ['plugin:vue/recommended', '@vue/prettier'],
  rules: {
    'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
    'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
    curly: 'error',
    eqeqeq: 'error',
    'no-trailing-spaces': 'error',
    'vue/prop-name-casing': 'error',
    'vue/html-closing-bracket-spacing': 'error',
    'vue/mustache-interpolation-spacing': 'error',
    'prettier/prettier': [
      'error',
      {
        trailingComma: 'all',
        singleQuote: true,
        bracketSpacing: true,
        jsxBracketSameLine: true,
      },
    ],
  },
  parserOptions: {
    parser: 'babel-eslint',
  },
};

What did you do?

yarn lint
# package.json
"scripts": {
    "lint": "vue-cli-service lint --fix && vue-cli-service lint:style --fix",
    "lint:style": "vue-cli-service lint:style"
  },

What did you expect to happen?
yarn lint should only fix normal format issues like before, but it changed almost all project files.
I try to figure out what happended, only find a broken yarn.lock with not resolved git conflicts. So I fixed the lock file, and I also find two version
eslint-version-vue in yarn.lock, is both versions essential? or maybe this two versions plugin cause such a mess?

eslint-plugin-vue@4.7.1 may caused by dependencies of cli-plugin-eslint in package.json.

Two version eslint-plugin-vue log

yarn why v1.12.3
[1/4] Why do we have the module "eslint-plugin-vue"...?
[2/4] Initialising dependency graph...
[3/4] Finding dependency...
[4/4] Calculating file sizes...
=> Found "eslint-plugin-vue@5.0.0-beta.5"
info Has been hoisted to "eslint-plugin-vue"
info This module exists because it's specified in "devDependencies".
info Disk size without dependencies: "476KB"
info Disk size with unique dependencies: "2.46MB"
info Disk size with transitive dependencies: "9.16MB"
info Number of shared dependencies: 12
=> Found "@vue/cli-plugin-eslint#eslint-plugin-vue@4.7.1"
info This module exists because "@vue#cli-plugin-eslint" depends on it.
info Disk size without dependencies: "420KB"
info Disk size with unique dependencies: "2.41MB"
info Disk size with transitive dependencies: "9.11MB"
info Number of shared dependencies: 12

What actually happened?

Before lint

<el-table-column
        prop="id"
        width="80"
        align="center"
        label="ID"
      />

After lint

<ElTableColumn prop="id" width="80" align="center" label="ID" />

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