Skip to content
This repository has been archived by the owner on Nov 4, 2020. It is now read-only.

Commit

Permalink
第一次提交
Browse files Browse the repository at this point in the history
  • Loading branch information
CaoMeiYouRen committed Jul 13, 2019
0 parents commit 7e911d1
Show file tree
Hide file tree
Showing 14 changed files with 3,963 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# http://editorconfig.org
#启用编辑器配置
root = true
# 对所有文件生效
[*]
#编码方式
charset = utf-8
#缩进格式
indent_style = space
indent_size = 4
#换行符
end_of_line = crlf
#插入最终换行符
insert_final_newline = false
#修剪尾随空格
trim_trailing_whitespace = true
# 对后缀名为 md 的文件生效
[*.md]
trim_trailing_whitespace = false
6 changes: 6 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/dist/
#/*.js
/test/unit/coverage/
/test/unit/specs/
/build/
/test/
66 changes: 66 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
module.exports = {
env: {// 运行环境
node: true,
es6: true,
commonjs: true,
browser: true,
mocha: true
},
extends: [
// 'airbnb-base'
// "eslint:recommended",
'eslint-config-alloy'
],
globals: {// 处理全局变量
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
parser: 'typescript-eslint-parser',
parserOptions: {// JS标准
ecmaVersion: 2018,
sourceType: 'module',
ecmaFeatures: {
modules: true
}
},
plugins: [// 插件
'vue',
'html'
],
rules: {
'complexity': 0,
'max-nested-callbacks': 0,
// 类和接口的命名必须遵守帕斯卡命名法,比如 PersianCat
// 'typescript/class-name-casing': 'error',
indent: [// 强制使用一致的缩进
'error',
4, {
SwitchCase: 1, // case 子句将相对于 switch 语句缩进 4 个空格,即一个tab
},
],
'linebreak-style': [// 强制使用一致的换行风格
'error',
'windows'
],
quotes: [// 强制使用一致的反勾号、双引号或单引号double
'error',
'single',
],
semi: [// 要求或禁止使用分号代替 ASI
'error',
'never',
],
'prefer-arrow-callback': [// 要求回调函数使用箭头函数
'error'
],
// "no-param-reassign": [
// "error", { "props": false }//禁止对 function 的参数进行重新赋值
// ],
'no-shadow': 'error', // 禁止变量声明与外层作用域的变量同名
'no-unused-vars': 0, // 禁止出现未使用过的变量
'no-console': 0, // 禁止console
'object-shorthand': 2, // 要求或禁止对象字面量中方法和属性使用简写语法 ''always
'quote-props': [2, 'as-needed', { keywords: false, numbers: true }], // 要求对象字面量属性名称使用引号。
'prefer-template': 2, //建议使用模板字面量而非字符串连接 (prefer-template)
}
}
33 changes: 33 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
.DS_Store
node_modules

# local env files
.env.local
.env.*.local

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
*.log

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw*

# 忽略图片
*.jpg
*.png
*.rar

.git
ssl
*.crt
*.key
*.pem
sessions
6 changes: 6 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# node.js开发酷Q机器人封装

作者:草梅友仁

本项目基于cq-websocket 项目进行了二次封装,用async/await重新封装函数,使调用api更加方便。

Loading

0 comments on commit 7e911d1

Please sign in to comment.