1 Star 0 Fork 0

animalcoder/Vue

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
eslintDeps.js 1.05 KB
一键复制 编辑 原始数据 按行查看 历史
animalcoder 提交于 2020-03-23 09:59 +08:00 . Vue6
const DEPS_MAP = {
base: {
eslint: '^6.7.2',
'eslint-plugin-vue': '^6.1.2'
},
airbnb: {
'@vue/eslint-config-airbnb': '^5.0.2',
'eslint-plugin-import': '^2.20.1'
},
prettier: {
'@vue/eslint-config-prettier': '^6.0.0',
'eslint-plugin-prettier': '^3.1.1',
prettier: '^1.19.1'
},
standard: {
'@vue/eslint-config-standard': '^5.1.0',
'eslint-plugin-import': '^2.20.1',
'eslint-plugin-node': '^11.0.0',
'eslint-plugin-promise': '^4.2.1',
'eslint-plugin-standard': '^4.0.0'
},
typescript: {
'@vue/eslint-config-typescript': '^5.0.1',
'@typescript-eslint/eslint-plugin': '^2.18.0',
'@typescript-eslint/parser': '^2.18.0'
}
}
exports.DEPS_MAP = DEPS_MAP
exports.getDeps = function (api, preset) {
const deps = Object.assign({}, DEPS_MAP.base, DEPS_MAP[preset])
if (api.hasPlugin('typescript')) {
Object.assign(deps, DEPS_MAP.typescript)
}
if (api.hasPlugin('babel') && !api.hasPlugin('typescript')) {
Object.assign(deps, {
'babel-eslint': '^10.0.3'
})
}
return deps
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/animalcoder/Vue.git
git@gitee.com:animalcoder/Vue.git
animalcoder
Vue
Vue
master

搜索帮助