Skip to content

Commit fdda165

Browse files
committed
initial: commit
0 parents  commit fdda165

File tree

100 files changed

+18192
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+18192
-0
lines changed

.editorconfig

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
indent_style = space
6+
indent_size = 2
7+
insert_final_newline = true
8+
trim_trailing_whitespace = true

.env.example

Whitespace-only changes.

.eslintrc

+177
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"commonjs": true,
5+
"es2021": true,
6+
"node": true,
7+
"jest": true
8+
},
9+
"parser": "@typescript-eslint/parser",
10+
"parserOptions": {
11+
"project": "tsconfig.json",
12+
"sourceType": "module"
13+
},
14+
"plugins": [
15+
"import"
16+
],
17+
"extends": [
18+
"eslint:recommended",
19+
"plugin:@typescript-eslint/recommended",
20+
"plugin:prettier/recommended"
21+
],
22+
"rules": {
23+
"linebreak-style": ["error", "unix"],
24+
"no-empty": 1,
25+
"no-useless-catch": 1,
26+
"no-prototype-builtins": 1,
27+
"no-constant-condition": 0,
28+
"no-useless-escape": 0,
29+
"no-console": "error",
30+
"no-restricted-globals": [
31+
"error",
32+
{
33+
"name": "global",
34+
"message": "Use `globalThis` instead"
35+
},
36+
{
37+
"name": "window",
38+
"message": "Use `globalThis` instead"
39+
}
40+
],
41+
"require-yield": 0,
42+
"eqeqeq": ["error", "smart"],
43+
"spaced-comment": [
44+
"warn",
45+
"always",
46+
{
47+
"line": {
48+
"exceptions": ["-"]
49+
},
50+
"block": {
51+
"exceptions": ["*"]
52+
},
53+
"markers": ["/"]
54+
}
55+
],
56+
"capitalized-comments": [
57+
"warn",
58+
"always",
59+
{
60+
"ignoreInlineComments": true,
61+
"ignoreConsecutiveComments": true
62+
}
63+
],
64+
"curly": [
65+
"error",
66+
"multi-line",
67+
"consistent"
68+
],
69+
"import/order": [
70+
"error",
71+
{
72+
"groups": [
73+
"type",
74+
"builtin",
75+
"external",
76+
"internal",
77+
"index",
78+
"sibling",
79+
"parent",
80+
"object"
81+
],
82+
"pathGroups": [
83+
{
84+
"pattern": "@",
85+
"group": "internal"
86+
},
87+
{
88+
"pattern": "@/**",
89+
"group": "internal"
90+
}
91+
],
92+
"pathGroupsExcludedImportTypes": [
93+
"type"
94+
],
95+
"newlines-between": "never"
96+
}
97+
],
98+
"@typescript-eslint/no-namespace": 0,
99+
"@typescript-eslint/no-explicit-any": 0,
100+
"@typescript-eslint/explicit-module-boundary-types": 0,
101+
"@typescript-eslint/no-unused-vars": [
102+
"warn",
103+
{
104+
"varsIgnorePattern": "^_",
105+
"argsIgnorePattern": "^_"
106+
}
107+
],
108+
"@typescript-eslint/no-inferrable-types": 0,
109+
"@typescript-eslint/no-non-null-assertion": 0,
110+
"@typescript-eslint/no-this-alias": 0,
111+
"@typescript-eslint/no-var-requires": 0,
112+
"@typescript-eslint/no-empty-function": 0,
113+
"@typescript-eslint/no-empty-interface": 0,
114+
"@typescript-eslint/consistent-type-imports": ["error"],
115+
"@typescript-eslint/consistent-type-exports": ["error"],
116+
"no-throw-literal": "off",
117+
"@typescript-eslint/no-throw-literal": "off",
118+
"@typescript-eslint/no-floating-promises": ["error", {
119+
"ignoreVoid": true,
120+
"ignoreIIFE": true
121+
}],
122+
"@typescript-eslint/no-misused-promises": ["error", {
123+
"checksVoidReturn": false
124+
}],
125+
"@typescript-eslint/await-thenable": ["error"],
126+
"@typescript-eslint/naming-convention": [
127+
"error",
128+
{
129+
"selector": "default",
130+
"format": ["camelCase"],
131+
"leadingUnderscore": "allow",
132+
"trailingUnderscore": "allowSingleOrDouble"
133+
},
134+
{
135+
"selector": "function",
136+
"format": ["camelCase", "PascalCase"],
137+
"leadingUnderscore": "allow",
138+
"trailingUnderscore": "allowSingleOrDouble"
139+
},
140+
{
141+
"selector": "variable",
142+
"format": ["camelCase", "UPPER_CASE", "PascalCase"],
143+
"leadingUnderscore": "allow",
144+
"trailingUnderscore": "allowSingleOrDouble"
145+
},
146+
{
147+
"selector": "parameter",
148+
"format": ["camelCase"],
149+
"leadingUnderscore": "allow",
150+
"trailingUnderscore": "allowSingleOrDouble"
151+
},
152+
{
153+
"selector": "typeLike",
154+
"format": ["PascalCase"],
155+
"trailingUnderscore": "allowSingleOrDouble"
156+
},
157+
{
158+
"selector": "enumMember",
159+
"format": ["PascalCase", "UPPER_CASE"]
160+
},
161+
{
162+
"selector": "objectLiteralProperty",
163+
"format": null
164+
},
165+
{
166+
"selector": "typeProperty",
167+
"format": null
168+
}
169+
],
170+
"@typescript-eslint/ban-ts-comment": [
171+
"error",
172+
{
173+
"ts-ignore": "allow-with-description"
174+
}
175+
]
176+
}
177+
}

.github/workflows/feature.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: "CI / Feature"
2+
3+
on:
4+
push:
5+
branches:
6+
- feature*
7+
workflow_dispatch:
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
use-library-js-feature:
15+
permissions:
16+
contents: read
17+
actions: write
18+
checks: write
19+
uses: MatrixAI/.github/.github/workflows/library-js-feature.yml@master

.github/workflows/staging.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: "CI / Staging"
2+
3+
on:
4+
push:
5+
branches:
6+
- staging
7+
workflow_dispatch:
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
use-library-js-staging:
15+
permissions:
16+
contents: write
17+
actions: write
18+
checks: write
19+
pull-requests: write
20+
uses: MatrixAI/.github/.github/workflows/library-js-staging.yml@master
21+
secrets:
22+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
23+
GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }}
24+
GIT_AUTHOR_NAME: ${{ secrets.GIT_AUTHOR_NAME }}
25+
GIT_COMMITTER_EMAIL: ${{ secrets.GIT_COMMITTER_EMAIL }}
26+
GIT_COMMITTER_NAME: ${{ secrets.GIT_COMMITTER_NAME }}
27+

.github/workflows/tag.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: "CI / Tag"
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
workflow_dispatch:
8+
9+
jobs:
10+
use-library-js-tag:
11+
permissions:
12+
contents: read
13+
actions: write
14+
uses: MatrixAI/.github/.github/workflows/library-js-tag.yml@master
15+
secrets:
16+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

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

.npmignore

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
.*
2+
/*.nix
3+
/nix
4+
/tsconfig.json
5+
/tsconfig.build.json
6+
/jest.config.js
7+
/scripts
8+
/src
9+
/tests
10+
/tmp
11+
/docs
12+
/benches
13+
/build
14+
/builds
15+
/dist/tsbuildinfo

0 commit comments

Comments
 (0)