Skip to content

Commit 83e4b82

Browse files
author
bin.han
committed
first commit
0 parents  commit 83e4b82

27 files changed

+4790
-0
lines changed

.DS_Store

6 KB
Binary file not shown.

.babelrc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"presets": [
3+
[
4+
"@babel/preset-env",
5+
{
6+
"modules": false,
7+
"targets": {
8+
"esmodules": true
9+
}
10+
}
11+
],
12+
"@babel/preset-typescript"
13+
]
14+
}

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = false

.eslintignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
node_modules/
2+
dist/
3+
4+
.DS_Store
5+
6+
*.log
7+
8+
.vscode

.eslintrc.js

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
module.exports = {
2+
root: true,
3+
env: { es6: true, node: true },
4+
parser: '@typescript-eslint/parser',
5+
parserOptions: {
6+
ecmaVersion: 2020,
7+
sourceType: 'module',
8+
project: './tsconfig.eslint.json',
9+
},
10+
plugins: ['import', 'prettier'],
11+
extends: [
12+
'airbnb-typescript/base',
13+
'plugin:@typescript-eslint/recommended',
14+
'plugin:@typescript-eslint/recommended-requiring-type-checking',
15+
],
16+
settings: {
17+
'import/parsers': {
18+
'@typescript-eslint/parser': ['.ts', '.tsx'],
19+
},
20+
},
21+
globals: {
22+
$log: false,
23+
$info: false,
24+
$option: false,
25+
$http: false,
26+
$file: false,
27+
$data: false,
28+
},
29+
rules: {
30+
'no-var': 'off',
31+
'vars-on-top': 'off',
32+
'prefer-const': 'off',
33+
'no-return-assign': 'off',
34+
'consistent-return': 'off',
35+
'prefer-destructuring': 'off',
36+
'no-underscore-dangle': 'off',
37+
'object-curly-newline': 'off',
38+
// 'import/no-unresolved': 'error',
39+
'import/no-mutable-exports': 'off',
40+
'import/prefer-default-export': 'off',
41+
'import/no-extraneous-dependencies': 'off',
42+
'import/no-named-as-default-member': 'off',
43+
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
44+
'max-len': ['error', { ignoreComments: true, code: 120, ignoreStrings: true }],
45+
'@typescript-eslint/require-await': 'off',
46+
'@typescript-eslint/no-unsafe-call': 'off',
47+
'@typescript-eslint/no-explicit-any': 'off',
48+
'@typescript-eslint/no-var-requires': 'off',
49+
'@typescript-eslint/no-unsafe-return': 'off',
50+
'@typescript-eslint/no-throw-literal': 'off',
51+
'@typescript-eslint/naming-convention': 'off',
52+
'@typescript-eslint/no-floating-promises': 'off',
53+
'@typescript-eslint/no-unsafe-assignment': 'off',
54+
'@typescript-eslint/no-unsafe-member-access': 'off',
55+
'@typescript-eslint/restrict-template-expressions': 'off',
56+
'@typescript-eslint/explicit-module-boundary-types': 'off',
57+
'@typescript-eslint/quotes': ['error', 'single', { allowTemplateLiterals: true }],
58+
},
59+
};

.github/workflows/release.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Release
2+
on:
3+
push:
4+
tags:
5+
- '*'
6+
7+
jobs:
8+
build:
9+
runs-on: macos-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
with:
13+
fetch-depth: 0
14+
token: ${{ secrets.GIT_TOKEN }}
15+
16+
- uses: actions/setup-node@v2-beta
17+
with:
18+
node-version: '14'
19+
20+
- name: Install Dependencies And Build
21+
run: |
22+
yarn install
23+
yarn run build
24+
25+
- name: Commit files
26+
run: |
27+
git config --global user.name 'robbinhan'
28+
git config --global user.email '[email protected]'
29+
git commit -am "chore: 更新版本文件"
30+
31+
- name: Push changes
32+
uses: ad-m/github-push-action@master
33+
with:
34+
github_token: ${{ secrets.GIT_TOKEN }}
35+
36+
- uses: ncipollo/release-action@v1
37+
with:
38+
artifacts: 'release/*.bobplugin'
39+
token: ${{ secrets.GIT_TOKEN }}

.gitignore

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
9+
# Diagnostic reports (https://nodejs.org/api/report.html)
10+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11+
12+
# Runtime data
13+
pids
14+
*.pid
15+
*.seed
16+
*.pid.lock
17+
18+
# Directory for instrumented libs generated by jscoverage/JSCover
19+
lib-cov
20+
21+
# Coverage directory used by tools like istanbul
22+
coverage
23+
*.lcov
24+
25+
# nyc test coverage
26+
.nyc_output
27+
28+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
29+
.grunt
30+
31+
# Bower dependency directory (https://bower.io/)
32+
bower_components
33+
34+
# node-waf configuration
35+
.lock-wscript
36+
37+
# Compiled binary addons (https://nodejs.org/api/addons.html)
38+
build/Release
39+
40+
# Dependency directories
41+
node_modules/
42+
jspm_packages/
43+
44+
# TypeScript v1 declaration files
45+
typings/
46+
47+
# TypeScript cache
48+
*.tsbuildinfo
49+
50+
# Optional npm cache directory
51+
.npm
52+
53+
# Optional eslint cache
54+
.eslintcache
55+
56+
# Microbundle cache
57+
.rpt2_cache/
58+
.rts2_cache_cjs/
59+
.rts2_cache_es/
60+
.rts2_cache_umd/
61+
62+
# Optional REPL history
63+
.node_repl_history
64+
65+
# Output of 'npm pack'
66+
*.tgz
67+
68+
# Yarn Integrity file
69+
.yarn-integrity
70+
71+
# dotenv environment variables file
72+
.env
73+
.env.test
74+
75+
# parcel-bundler cache (https://parceljs.org/)
76+
.cache
77+
78+
# Next.js build output
79+
.next
80+
81+
# Nuxt.js build / generate output
82+
.nuxt
83+
dist
84+
85+
# Gatsby files
86+
.cache/
87+
# Comment in the public line in if your project uses Gatsby and *not* Next.js
88+
# https://nextjs.org/blog/next-9-1#public-directory-support
89+
# public
90+
91+
# vuepress build output
92+
.vuepress/dist
93+
94+
# Serverless directories
95+
.serverless/
96+
97+
# FuseBox cache
98+
.fusebox/
99+
100+
# DynamoDB Local files
101+
.dynamodb/
102+
103+
# TernJS port file
104+
.tern-port
105+
banner.user.js
106+
107+
release

.prettierrc.js

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
// .prettierrc.js
2+
module.exports = {
3+
// 一行最多 120 字符
4+
printWidth: 120,
5+
// 使用 2 个空格缩进
6+
tabWidth: 2,
7+
// 不使用缩进符,而使用空格
8+
useTabs: false,
9+
// 行尾需要有分号
10+
semi: true,
11+
// 使用单引号
12+
singleQuote: true,
13+
// 对象的 key 仅在必要时用引号
14+
quoteProps: 'as-needed',
15+
// jsx 不使用单引号,而使用双引号
16+
jsxSingleQuote: false,
17+
// 末尾需要有逗号
18+
trailingComma: 'all',
19+
// 大括号内的首尾需要空格
20+
bracketSpacing: true,
21+
// jsx 标签的反尖括号需要换行
22+
jsxBracketSameLine: false,
23+
// 箭头函数,只有一个参数的时候,也需要括号
24+
arrowParens: 'always',
25+
// 每个文件格式化的范围是文件的全部内容
26+
rangeStart: 0,
27+
rangeEnd: Infinity,
28+
// 不需要写文件开头的 @prettier
29+
requirePragma: false,
30+
// 不需要自动在文件开头插入 @prettier
31+
insertPragma: false,
32+
// 使用默认的折行标准
33+
proseWrap: 'preserve',
34+
// 根据显示样式决定 html 要不要折行
35+
htmlWhitespaceSensitivity: 'css',
36+
// vue 文件中的 script 和 style 内不用缩进
37+
vueIndentScriptAndStyle: false,
38+
// 换行符使用 lf
39+
endOfLine: 'lf',
40+
// 格式化嵌入的内容
41+
embeddedLanguageFormatting: 'auto',
42+
};

CHANGELOG.md

Whitespace-only changes.

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021 robbinhan
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)