3

.eslintrc.js

module.exports = {
  root: true,
  env: {
    node: true
  },
  extends: ['plugin:vue/essential', 'eslint:recommended', '@vue/prettier'],
  parserOptions: {
    parser: 'babel-eslint'
  },
  plugins: ['prettier'],
  rules: {
     .....
  }
}

需要的依赖

"@vue/eslint-config-prettier": "^6.0.0",
"eslint-config-prettier": "^6.15.0",
"eslint-plugin-prettier": "^3.1.4",
"prettier": "^1.19.1",
"prettier-eslint": "^11.0.0",

all2005
3.4k 声望36 粉丝