eslint格式化vue文件配置,可格式化html和css部分

all2005

.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",
阅读 1k

Aco的故事
js魔法师
3.4k 声望
34 粉丝
0 条评论
3.4k 声望
34 粉丝
文章目录
宣传栏