Skip to content

Commit

Permalink
feat: 合并dev 支持ts版本 支持npm包 暂时保留对旧版本的模块兼容
Browse files Browse the repository at this point in the history
  • Loading branch information
CakmLexi committed Jul 2, 2024
1 parent 32049ae commit 408f9c7
Show file tree
Hide file tree
Showing 53 changed files with 68 additions and 12,597 deletions.
21 changes: 17 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,23 @@
"editor.detectIndentation": false,
"editor.tabSize": 2,
"editor.formatOnSave": true,
"javascript.format.insertSpaceBeforeFunctionParenthesis": true,
"javascript.format.insertSpaceAfterConstructor": true,
"editor.formatOnType": false,
"editor.formatOnPaste": true,
"editor.formatOnSaveMode": "file",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "always"
},
"files.autoSave": "onFocusChange",
// 单引号
"javascript.preferences.quoteStyle": "single",
// 分号
"javascript.format.semicolons": "remove"
"typescript.preferences.quoteStyle": "single",
// 去掉分号
"javascript.format.semicolons": "remove",
"typescript.format.semicolons": "remove",
// 函数括号前面加空格
"javascript.format.insertSpaceBeforeFunctionParenthesis": true,
"typescript.format.insertSpaceBeforeFunctionParenthesis": true,
// 构造函数后面加空格
"typescript.format.insertSpaceAfterConstructor": true,
"javascript.format.insertSpaceAfterConstructor": true,
}
29 changes: 25 additions & 4 deletions config/defSet/config.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,33 @@
# 日志等级:trace,debug,info,warn,fatal,mark,error,off
log_level: info
# log4js 日志配置
log4jsCfg:
# 日志等级: trace, debug, info, warn, fatal, mark, error, off
level: info
# 日志保留天数
daysToKeep: 7
# 整体化: 将日志输出到一个文件(一天为一个文件) 日志较多的情况下不建议与碎片化同时开启
overall: true
# 碎片化: 将日志分片,达到指定大小后自动切割 日志较多的情况下不建议与整体化同时开启
fragments: false
# 日志文件最大大小 MB
maxLogSize: 30

# 日志保留天数
log_days_Keep: 7
# 关闭后台进程失败后是否继续启动 继续启动会导致多进程
multi_progress: false

# 控制台触发插件日志颜色 十六进制 默认#FFFF00 不支持热更新
log_color: "#E1D919"

# input适配器配置 以下所有配置均不支持热更新
AdapterInput:
# 是否启用
enable: true
# 是否将语音、图片、视频消息转为文件 转为文件后可通过url访问
msgToFile: true
# url访问token 如果为 AdapterInput 每次启动后会重新生成
token: "AdapterInput"
# 访问ip
ip: 127.0.0.1

# ffmpeg配置 用于音视频处理
ffmpeg_path: ""
ffprobe_path: ""
Expand Down
20 changes: 10 additions & 10 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
import neostandard, { resolveIgnoresFromGitignore } from 'neostandard'
import neostandard from 'neostandard'

const data = neostandard({
ignores: resolveIgnoresFromGitignore(),
globals: ['logger'],
ts: true
ignores: ['node_modules', 'temp', 'logs', 'data'],
globals: ['logger', 'NodeJS'],
ts: true,
})

const newData = []

data.forEach(val => {
// 驼峰命名规则关闭
if (val.rules['camelcase']) {
val.rules['camelcase'] = ['off']
}
if (val?.rules?.['camelcase']) val.rules['camelcase'] = ['off']

// 排除掉plugins
if (Array.isArray(val.ignores)) {
val.ignores = val.ignores.filter((v) => !v.includes('plugins'))
// ts
if (val.name === 'neostandard/ts') {
Object.keys(val.rules).forEach((key) => {
if (val.rules[key] === 'off') val.rules[key] = 'error'
})
}
newData.push(val)
})
Expand Down
Loading

0 comments on commit 408f9c7

Please sign in to comment.