feat: init env

This commit is contained in:
tackchen 2020-12-09 18:09:14 +08:00
parent 6041a91154
commit d444edc987
4 changed files with 55 additions and 18 deletions

View File

@ -5,4 +5,5 @@ cnchar.min.js
src_import_version
!.vuepress
docs
vuepress/config.js
vuepress/config.js
**/*.vue

View File

@ -2,7 +2,6 @@ module.exports = {
"parser": '@typescript-eslint/parser',
"plugins": [
'@typescript-eslint',
"vue/lib/configs/essential"
],
"env": {
"browser": true,
@ -10,10 +9,11 @@ module.exports = {
"node": true,
"commonjs": true
},
"extends": [
// "standard",
// "plugin:vue/essential"
],
// 接入vue失败 暂且eslint 忽略vue文件
// "extends": [
// // "standard",
// "plugin:vue/essential"
// ],
"parserOptions": {
"parser": "babel-eslint",
"ecmaVersion": 2018,
@ -77,12 +77,12 @@ module.exports = {
"comma-spacing": "error",
"key-spacing": "error",
"no-undef": "error",
"vue/script-indent": ["warn", 4, {
"baseIndent": 1,
"switchCase": 1
}],
"vue/html-indent": ["error", 4],
"vue/html-quotes": ["error", "single", { "avoidEscape": true }],
// "vue/script-indent": ["warn", 4, {
// "baseIndent": 1,
// "switchCase": 1
// }],
// "vue/html-indent": ["error", 4],
// "vue/html-quotes": ["error", "single", { "avoidEscape": true }],
},
"overrides": [
{

46
package-lock.json generated
View File

@ -5574,14 +5574,50 @@
}
},
"eslint-plugin-vue": {
"version": "6.2.2",
"resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-6.2.2.tgz",
"integrity": "sha512-Nhc+oVAHm0uz/PkJAWscwIT4ijTrK5fqNqz9QB1D35SbbuMG1uB6Yr5AJpvPSWg+WOw7nYNswerYh0kOk64gqQ==",
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-7.2.0.tgz",
"integrity": "sha512-4mt0yIv6rBDNtvis/g22a0ozJ12GfcdEzX77u0ICYjKlxOVtGrKGEvo0cbOObHaKDg9a9kJcoaNodqE4TPfS2A==",
"dev": true,
"requires": {
"eslint-utils": "^2.1.0",
"natural-compare": "^1.4.0",
"semver": "^5.6.0",
"vue-eslint-parser": "^7.0.0"
"semver": "^7.3.2",
"vue-eslint-parser": "^7.2.0"
},
"dependencies": {
"eslint-utils": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz",
"integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==",
"dev": true,
"requires": {
"eslint-visitor-keys": "^1.1.0"
}
},
"lru-cache": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
"dev": true,
"requires": {
"yallist": "^4.0.0"
}
},
"semver": {
"version": "7.3.4",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz",
"integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==",
"dev": true,
"requires": {
"lru-cache": "^6.0.0"
}
},
"yallist": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
"dev": true
}
}
},
"eslint-scope": {

View File

@ -57,7 +57,7 @@
"eslint": "^6.7.2",
"eslint-loader": "^3.0.3",
"eslint-plugin-html": "^6.0.0",
"eslint-plugin-vue": "^6.2.2",
"eslint-plugin-vue": "^7.2.0",
"gulp": "^4.0.2",
"gulp-babel": "^8.0.0",
"gulp-markdown-toc": "^1.1.0",