eslint 配置 .eslintrc.json
module.exports = {
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"node": true,
"amd": true
},
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"globals": {
"axios": true
},
"root": true,
"plugins": [
"vuefix",
"html"
],
"settings": {
"html/html-extensions": [".html"]
},
"extends": "eslint:recommended",
/**
* 上面的配置,基本是 ESLint 主配置,或者 插件配置
* 所有页面规则写在 rules 中
* 具体规则用法 请查看 :http://eslint.cn/docs/rules/
*/
"rules": {
"vuefix/vuefix": [2, {
"auto": true
}],
"no-const-assign": "warn",
"no-this-before-super": "warn",
"no-undef": "warn",
"no-self-assign": 2,
"no-self-compare": 2,
"constructor-super": "warn",
"valid-typeof": "warn",
"no-use-before-define": 0,
"global-require": "off",
"no-console":"off",
"no-unused-vars":0
}
}
复制代码
babel 配置 .babelrc
{
"presets": ["env","stage-3"],
"plugins": ["transform-runtime", ["component", //element-ui babel插件
{
"libraryName": "element-ui",
"styleLibraryName": "~public/theme" // element 自定义主题
}
]],
"comments": false
}
复制代码
.gitignore git免上传配置
*.log
package-lock.json
node_modules
.idea
.svn
.vscode
distgit
Server/public/doc/*
Server/public/prod/*
复制代码