Skip to content

Commit

Permalink
Merge branch 'feat-friendship' into nightly
Browse files Browse the repository at this point in the history
  • Loading branch information
danni-cool committed Jan 5, 2024
2 parents 9189f44 + 1a18568 commit d6c6314
Show file tree
Hide file tree
Showing 60 changed files with 6,746 additions and 5,372 deletions.
8 changes: 8 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,12 @@
node_modules
script
docs
cli
loginSession.memory-card.json
packages
pnpm-workspace.yaml
log
typings
.eslintignore
.eslintrc.js
tsconfig.json
4 changes: 3 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
node_modules
packages/cli/node_modules
root
docs
*.md
*.md
packages/cli/lib
39 changes: 20 additions & 19 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
module.exports = {
/** @type {import('eslint').Linter.BaseConfig} */
const config = {
env: {
browser: true,
commonjs: true,
es2021: true,
node: true,
commonjs: true
},
plugins: ['prettier'],
extends: ['standard', 'prettier'],
overrides: [
{
env: {
node: true,
},
files: ['.eslintrc.{js,cjs}'],
parserOptions: {
sourceType: 'script',
},
},
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'prettier'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'prettier'
],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'script' // 对于 CommonJS
},
rules: {
'prettier/prettier': 'error',
'valid-typeof': 0 /** js 配置这个太麻烦,不如上ts */,
},
'prettier/prettier': 'error' /** check prettier lint */,
'@typescript-eslint/no-var-requires': 'off' /** only run with commonjs */,
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/ban-ts-comment':
'off' /** quickly ban all error unnecessary */
}
}

module.exports = config
17 changes: 16 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,19 @@ jobs:
file: ./Dockerfile
push: true
tags: dannicool/docker-wechatbot-webhook:latest
platforms: linux/amd64,linux/arm64
platforms: linux/amd64,linux/arm64

# Setup .npmrc file to publish to npm
# - uses: actions/setup-node@v3
# with:
# node-version: '18.x'
# registry-url: 'https://registry.npmjs.org'
# - run: npm ci

# # New step to copy docs/cli.readme.md to readme.md
# - name: replace cli README.md to README.md
# run: cp ./docs/cli.README.md ./README.md

# - run: npm publish
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_SECRET }}
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
node_modules
.env
loginSession.memory-card.json
loginSession.memory-card.json
generated
log
tsconfig.tmp.json
1 change: 1 addition & 0 deletions .husky/_/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
36 changes: 36 additions & 0 deletions .husky/_/husky.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/usr/bin/env sh
if [ -z "$husky_skip_init" ]; then
debug () {
if [ "$HUSKY_DEBUG" = "1" ]; then
echo "husky (debug) - $1"
fi
}

readonly hook_name="$(basename -- "$0")"
debug "starting $hook_name..."

if [ "$HUSKY" = "0" ]; then
debug "HUSKY env variable is set to 0, skipping hook"
exit 0
fi

if [ -f ~/.huskyrc ]; then
debug "sourcing ~/.huskyrc"
. ~/.huskyrc
fi

readonly husky_skip_init=1
export husky_skip_init
sh -e "$0" "$@"
exitCode="$?"

if [ $exitCode != 0 ]; then
echo "husky - $hook_name hook exited with code $exitCode (error)"
fi

if [ $exitCode = 127 ]; then
echo "husky - command not found in PATH=$PATH"
fi

exit $exitCode
fi
2 changes: 1 addition & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no-install commitlint --edit "$1"
npx -y commitlint --edit "$1"
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx lint-staged
npx -y lint-staged
5 changes: 0 additions & 5 deletions .prettierignore

This file was deleted.

8 changes: 0 additions & 8 deletions .prettierrc

This file was deleted.

9 changes: 9 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/** @type {import('prettier').Config} */
module.exports = {
singleQuote: true,
semi: false,
useTabs: false,
tabWidth: 2,
trailingComma: 'none',
endOfLine: 'lf'
}
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"javascript.validate.enable": true,
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
Expand Down
Loading

0 comments on commit d6c6314

Please sign in to comment.