关于vue.js:eslint格式化vue文件配置可格式化html和css部分

50次阅读

共计 359 个字符,预计需要花费 1 分钟才能阅读完成。

.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",

正文完
 0