Skip to content

Commit 09fd652

Browse files
committed
chore: copy source
0 parents  commit 09fd652

20 files changed

+12195
-0
lines changed

.commitlintrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": ["@commitlint/config-conventional"]
3+
}

.editorconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Define code style for GitHub
2+
[*]
3+
charset = utf-8
4+
indent_style = tab
5+
indent_size = 4
6+
trim_trailing_whitespace = true

.eslintignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# thirdparty
2+
node_modules
3+
4+
# temporary exceptions
5+
/scripts/jest/setupFiles/index.js
6+
/src/eslint-local-rules.js
7+
/jest.config.js
8+
9+
# artifacts
10+
/out
11+
/dist
12+
/build
13+
14+
# files
15+
*.d.ts
16+
*.html
17+
*.md

.eslintrc

Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"es2020": true
5+
},
6+
"parser": "@typescript-eslint/parser",
7+
"parserOptions": {
8+
"ecmaFeatures": {
9+
"jsx": true
10+
},
11+
"ecmaVersion": 11,
12+
"sourceType": "module"
13+
},
14+
"plugins": [
15+
"@typescript-eslint",
16+
"unused-imports",
17+
"spellcheck",
18+
"simple-import-sort"
19+
],
20+
"extends": [
21+
"plugin:import/recommended",
22+
"plugin:import/errors",
23+
"plugin:import/warnings",
24+
"plugin:import/typescript"
25+
],
26+
"rules": {
27+
// turn on errors for missing imports
28+
"import/no-unresolved": "error",
29+
"spellcheck/spell-checker": [
30+
"error",
31+
{
32+
"comments": false,
33+
"strings": true,
34+
"identifiers": true,
35+
"templates": true,
36+
"ignoreRequire": true,
37+
"lang": "en_US",
38+
"skipWords": [],
39+
// Check if word contains numbers
40+
"skipIfMatch": [
41+
"\\d+",
42+
"^[a-z]+$"
43+
],
44+
"minLength": 3
45+
}
46+
],
47+
"import/no-useless-path-segments": [
48+
"error",
49+
{
50+
"noUselessIndex": true
51+
}
52+
],
53+
"import/export": "off",
54+
"import/namespace": "warn",
55+
"import/no-duplicates": [
56+
"error",
57+
{
58+
"prefer-inline": true
59+
}
60+
],
61+
"import/newline-after-import": [
62+
"error",
63+
{
64+
"count": 1
65+
}
66+
],
67+
"unused-imports/no-unused-imports": "error",
68+
"simple-import-sort/imports": [
69+
"error",
70+
{
71+
// docs: https://github.com/lydell/eslint-plugin-simple-import-sort#custom-grouping
72+
"groups": [
73+
// Side effect imports.
74+
[
75+
"^\\u0000"
76+
],
77+
// Node.js builtins prefixed with `node:`.
78+
[
79+
"^node:"
80+
],
81+
// Packages.
82+
// Things that start with a letter (or digit or underscore), or `@` followed by a letter.
83+
[
84+
"^react",
85+
"^\\w",
86+
"^@\\w"
87+
],
88+
// Absolute imports and other imports such as Vue-style `@/foo`.
89+
// Anything not matched in another group.
90+
[
91+
"^"
92+
],
93+
// Relative imports.
94+
[
95+
"^../../"
96+
],
97+
// Anything that starts with a dot.
98+
[
99+
"^../",
100+
"^./",
101+
"^\\."
102+
],
103+
// Global CSS files at bottom
104+
[
105+
"\\.css$"
106+
]
107+
]
108+
}
109+
],
110+
"function-call-argument-newline": [
111+
"error",
112+
"consistent"
113+
],
114+
"no-var": "error",
115+
"no-bitwise": "error",
116+
"no-multi-spaces": "error",
117+
"no-multiple-empty-lines": "error",
118+
"space-in-parens": "error",
119+
"semi": "error",
120+
"prefer-const": "error",
121+
// off cuz eslint is dumb: https://stackoverflow.com/questions/63818415/react-was-used-before-it-was-defined
122+
"no-use-before-define": "off",
123+
"@typescript-eslint/no-use-before-define": [
124+
"error"
125+
],
126+
// Codestyle
127+
"indent": [
128+
"error",
129+
"tab",
130+
{
131+
"SwitchCase": 1
132+
}
133+
],
134+
"camelcase": [
135+
"error",
136+
{
137+
"allow": [
138+
"^UNSAFE_",
139+
"^UNSTABLE_"
140+
]
141+
}
142+
],
143+
"arrow-parens": [
144+
"error",
145+
"always"
146+
],
147+
"operator-linebreak": [
148+
"error",
149+
"after",
150+
{
151+
"overrides": {
152+
"?": "before",
153+
":": "before"
154+
}
155+
}
156+
],
157+
"space-before-function-paren": [
158+
"error",
159+
{
160+
"asyncArrow": "always",
161+
"anonymous": "never",
162+
"named": "never"
163+
}
164+
]
165+
}
166+
}

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "npm" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "daily"
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
name: "CodeQL"
8+
9+
on:
10+
push:
11+
branches: [ master ]
12+
pull_request:
13+
# The branches below must be a subset of the branches above
14+
branches: [ master ]
15+
schedule:
16+
# At 04:35 AM, every 3 days
17+
# test expression on https://crontab.cronhub.io/
18+
- cron: '35 4 */3 * *'
19+
20+
workflow_dispatch:
21+
22+
jobs:
23+
tests:
24+
name: Tests
25+
runs-on: ubuntu-latest
26+
27+
steps:
28+
- uses: actions/checkout@v2
29+
- uses: actions/setup-node@v2
30+
with:
31+
node-version: '14'
32+
33+
- name: Install deps
34+
run: npm install
35+
36+
- name: Run tests
37+
run: npm test
38+
39+
analyze:
40+
name: Analyze
41+
runs-on: ubuntu-latest
42+
permissions:
43+
actions: read
44+
contents: read
45+
security-events: write
46+
47+
strategy:
48+
fail-fast: false
49+
matrix:
50+
language: [ 'javascript', 'TypeScript' ]
51+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
52+
# Learn more:
53+
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
54+
55+
steps:
56+
- name: Checkout repository
57+
uses: actions/checkout@v2
58+
59+
# Initializes the CodeQL tools for scanning.
60+
- name: Initialize CodeQL
61+
uses: github/codeql-action/init@v1
62+
with:
63+
languages: ${{ matrix.language }}
64+
# If you wish to specify custom queries, you can do so here or in a config file.
65+
# By default, queries listed here will override any specified in a config file.
66+
# Prefix the list here with "+" to use these queries and those in the config file.
67+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
68+
69+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
70+
# If this step fails, then you should remove it and run the build manually (see below)
71+
- name: Autobuild
72+
uses: github/codeql-action/autobuild@v1
73+
74+
# ℹ️ Command-line programs to run using the OS shell.
75+
# 📚 https://git.io/JvXDl
76+
77+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
78+
# and modify them (or add more) to build your code if your project
79+
# uses a compiled language
80+
81+
#- run: |
82+
# make bootstrap
83+
# make release
84+
85+
- name: Perform CodeQL Analysis
86+
uses: github/codeql-action/analyze@v1

.gitignore

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# packages
2+
node_modules
3+
.npmrc
4+
5+
# debug
6+
npm-debug.log*
7+
yarn-debug.log*
8+
yarn-error.log*
9+
.pnpm-debug.log*
10+
*.tsbuildinfo
11+
12+
# testing
13+
coverage
14+
15+
# editors
16+
.idea
17+
.vscode
18+
debug.log
19+
20+
# misc
21+
.DS_Store
22+
*.pem
23+
24+
# local env files
25+
.env
26+
*.local
27+
28+
# artifacts
29+
out
30+
dist

.husky/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.husky/commit-msg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx commitlint --edit ""

.husky/pre-commit

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
# Specify config explicitly, to not use config from nested directories
5+
npx lint-staged --config .lintstagedrc

0 commit comments

Comments
 (0)