# climber **Repository Path**: hhww_422/climber ## Basic Information - **Project Name**: climber - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-11-19 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # persagy-cli: - 基于vue的ui库,github地址 `ssh://git@101.254.183.198:5522/xxx.git` ## 启动说明(npm命令) - serve `npm run serve` 开发环境 - test `npm run test` 测试包 打包之后输出到更目录test文件夹下 - build `npm run build` 生产包 打包之后输出到更目录production文件夹下 - lint `npm run lint` 执行eslint检测并尝试修复 - clearCache `npm run clearCache` 删除webpack缓存 ## 目录(文件)说明 - src 资源目录 - :file_folder: assets 静态资源,包括样式、icon、image - :file_folder: envVariable 环境参数 - :file_folder: router 路由配置 - :file_folder: store vuex仓库 - :file_folder: utils 工具函数 - :file_folder: views 开发页面目录 - :pencil2: App.vue 入口vue文件 - :pencil2: main.js 入口js文件 - :file_folder: static 静态依赖配置 - :pencil2: top_config.js 配置全局依赖参数,如:需要在打包之后配置接口请求地址 - :pencil2: .babelrc babel依赖 - :pencil2: .eslintignore eslint忽略检查文件及目录配置 - :pencil2: .eslintrc.js eslint规则 - :pencil2: clearCache.js 清除webpack缓存函数 - :pencil2: get_time.js 获取当前时间 - :pencil2: package.json 依赖包函数 - :pencil2: postcss.config.js 兼容浏览器配置 - :pencil2: README.md 项目说明 - :pencil2: server.js 启动打包后的静态server - :pencil2: webpack.config.js 开发打包配置 ## eslint代码检测规范 key | value | describe --- | --- | --- no-console | process.env.NODE_ENV === 'production' ? 'warn' : 'off' | 生产环境出现console报警告 no-debugger | process.env.NODE_ENV === 'production' ? 'warn' : 'off' | 生产环境出现debugger报警告 global-require | 1 | 禁用require引入静态资源 indent | ['error', 4] | 缩进4 array-bracket-spacing | [2, 'never'] | 指定数组的元素之间要以空格隔开(,后面), never参数:[ 之前和 ] 之后不能带空格,always参数:[ 之前和 ] 之后必须带空格 block-scoped-var | 0 | 在块级作用域外访问块内定义的变量是否报错提示 brace-style | [2, '1tbs', { 'allowSingleLine': true }] | if while function 后面的{必须与if在同一行,java风格 camelcase | 2 | 双峰驼命名格式 comma-dangle | [2, 'never'] | 数组和对象键值对最后一个逗号, never参数:不能带末尾的逗号, always参数:必须带末尾的逗号,always-multiline:多行模式必须带逗号,单行模式不能带逗号 comma-spacing | [2, { 'before': false, 'after': true }] | 控制逗号前后的空格 comma-style | [2, 'last'] | 控制逗号在行尾出现还是在行首出现 complexity | [2, 40] | 圈复杂度 computed-property-spacing | [2, 'never'] | 以方括号取对象属性时,[ 后面和 ] 前面是否需要空格, 可选参数 never, always default-case | 2 | switch语句强制default分支,也可添加 // no default 注释取消此次警告 dot-location | [2, 'property'] | 强制object.key 中 . 的位置参数 dot-notation | [2, { 'allowKeywords': true }] | 强制使用.号取属性 eol-last | 2 | 文件末尾强制换行 eqeqeq | [2, 'allow-null'] | 使用 === 替代 == import/no-unresolved | [ 2, { 'ignore': [''] } ] | 不检测引用路径别名 import/no-extraneous-dependencies | ['error', {'devDependencies': true}] | 检查是项目依赖还是dev依赖 import/extensions | [ 'error', { 'js': 'never', 'vue': 'never' } ] | 不用检测后缀名 max-len | ['error', { code : 100 }] | 单行100个字符 arrow-parens | 'off' | 关闭箭头函数在一个参数时的括号限制 no-param-reassign | ['error', { 'props': false }] | 不改变原对象(数组)并重新给字段赋值 no-plusplus | 0 | 关闭++操作符检查 linebreak-style | [0, "error", "windows"] | 关闭强制执行统一的行结尾,而不受操作系统、VCS、WS或整个代码库中使用的编辑器的影响 no-underscore-dangle | 1 | 标识符不能以_开头或结尾 consistent-return | 0 | 关闭方法必须返回值 no-unused-vars | off | 不能使用var声明变量 one-var | ['error', { 'var': 'always', let: 'always' }] | 代码块中多个let放在一起 one-var-declaration-per-line | ['error', 'initializations'] | 声明变量换行 no-return-assign | ['error', 'always'] | 在 return 语句中赋值表达式要用括号包裹 return (result = a + b) no-prototype-builtins | off | 关闭限制使用对象原型上的方法 no-shadow | 1 | 开发阴影变量检查 prefer-destructuring | ['error', {'object': true, 'array': false}] | 获取变量使用解构 radix | ['error', 'as-needed'] | 使用parseInt等不用提供第二个参数 no-case-declarations | 1 | 禁止词法声明 (let、const、function 和 class) 出现在 case或default 子句中 no-nested-ternary | off | 允许使用嵌套的三目运算 no-lonely-if | off | 允许在else中写if operator-assignment | off | 允许运算符简写 object-curly-newline | 1 | 对象应在大括号内换行 - 注意:如果想取消单行eslint检查可设置 `// eslint-disable-next-line key` - 如果想忽略某些文件的检查,请在.eslintignore加上路径和文件,如忽略 `package-lock.json`,详见 `.eslintignore`