-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
225 changed files
with
30,234 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
node_modules/* | ||
./node_modules/** | ||
**/node_modules/** | ||
dist/** | ||
**/dist/** | ||
.dist/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
{ | ||
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"], | ||
"rules": { | ||
"semi": ["error", "always"], | ||
"quotes": ["warn", "single"], | ||
"array-callback-return": "error", | ||
"constructor-super": "error", | ||
"for-direction": "error", | ||
"getter-return": "error", | ||
"no-array-constructor": "error", | ||
"no-async-promise-executor": "error", | ||
"no-await-in-loop": "error", | ||
"no-class-assign": "error", | ||
"no-compare-neg-zero": "error", | ||
"no-cond-assign": "error", | ||
"no-const-assign": "error", | ||
"no-constant-binary-expression": "error", | ||
"no-constant-condition": "error", | ||
"no-constructor-return": "error", | ||
"no-control-regex": "error", | ||
"no-debugger": "error", | ||
"no-dupe-args": "error", | ||
"no-dupe-class-members": "error", | ||
"no-dupe-else-if": "error", | ||
"no-dupe-keys": "error", | ||
"no-duplicate-case": "error", | ||
"no-duplicate-imports": "error", | ||
"no-empty-character-class": "error", | ||
"no-empty-pattern": "error", | ||
"no-ex-assign": "error", | ||
"no-fallthrough": "error", | ||
"no-func-assign": "error", | ||
"no-inner-declarations": "error", | ||
"no-invalid-regexp": "error", | ||
"no-irregular-whitespace": "warn", | ||
"no-loss-of-precision": "error", | ||
"no-misleading-character-class": "error", | ||
"no-new-native-nonconstructor": "error", | ||
"no-new-symbol": "error", | ||
"no-obj-calls": "error", | ||
"no-promise-executor-return": "error", | ||
"no-prototype-builtins": "error", | ||
"no-self-assign": "error", | ||
"no-self-compare": "error", | ||
"no-setter-return": "error", | ||
"no-sparse-arrays": "warn", | ||
"no-template-curly-in-string": "warn", | ||
"no-this-before-super": "error", | ||
"no-undef": "error", | ||
"no-unexpected-multiline": "error", | ||
"no-unmodified-loop-condition": "error", | ||
"no-unreachable": "warn", | ||
"no-unreachable-loop": "warn", | ||
"no-unsafe-finally": "error", | ||
"no-unsafe-negation": "error", | ||
"no-unsafe-optional-chaining": "error", | ||
"no-unused-private-class-members": "warn", | ||
"no-use-before-define": "error", | ||
"no-useless-backreference": "error", | ||
"require-atomic-updates": "error", | ||
"use-isnan": "error", | ||
"valid-typeof": "error", | ||
|
||
"accessor-pairs": "error", | ||
"arrow-body-style": "off", | ||
"camelcase": "warn", | ||
"no-var": "error", | ||
"no-with": "error", | ||
"no-console": "off", | ||
|
||
// typescript | ||
"@typescript-eslint/no-explicit-any": "error", | ||
|
||
"no-else-return": "warn" | ||
}, | ||
|
||
"parser": "@typescript-eslint/parser", | ||
// "parserOptions": {}, | ||
|
||
"plugins": ["@typescript-eslint"], | ||
"root": true, | ||
|
||
"env": { | ||
"browser": true, | ||
"node": true, | ||
"deno": true | ||
}, | ||
|
||
// ignore files | ||
"ignorePatterns": ["node_modules/", "dist/", "*.js", "**/submodules/"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
module.exports = { | ||
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'], | ||
parser: '@typescript-eslint/parser', | ||
plugins: ['@typescript-eslint'], | ||
root: true, | ||
|
||
// rules | ||
rules: { | ||
'@typescript-eslint/no-explicit-any': 'warn', | ||
'@typescript-eslint/no-unused-vars': [ | ||
'warn', | ||
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' }, | ||
], | ||
}, | ||
|
||
parserOptions: { | ||
// project: ["./tsconfig.eslint.json"], | ||
// tsconfigRootDir: __dirname, | ||
}, | ||
|
||
ignorePatterns: ['node_modules/', 'dist/', '**/*.js', '**/submodules/'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
# This workflow will install Deno then run `deno lint` and `deno test`. | ||
# For more information see: https://github.com/denoland/setup-deno | ||
|
||
name: Checks | ||
|
||
on: | ||
push: | ||
branches: ['main'] | ||
pull_request: | ||
branches: ['main'] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Retrieve git dependencies | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: 'true' | ||
token: ${{ secrets.GH_TOKEN }} | ||
|
||
- name: Ignore if changes were automated | ||
run: | | ||
- name: Setup Deno | ||
# uses: denoland/setup-deno@v1 | ||
uses: denoland/setup-deno@61fe2df320078202e33d7d5ad347e7dcfa0e8f31 # v1.1.2 | ||
with: | ||
deno-version: v1.x | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 16 | ||
|
||
- name: Stash current dependencies | ||
run: | | ||
echo "Rename package.json and package-lock.json to .package.json and .package-lock.json so that they are not picked up by npm install" | ||
mv package.json .package.json | ||
mv package-lock.json .package-lock.json | ||
- name: Install local dependencies | ||
run: | | ||
if git log -1 --pretty=%B | grep -q "AUTOMATED"; then | ||
echo "Changes were automated, exiting" | ||
exit 0 | ||
fi | ||
npm i --save-dev --force prettier-plugin-svelte prettier @typescript-eslint/parser @typescript-eslint/[email protected] eslint typescript prettier-plugin-svelte svelte | ||
- name: Install global dependencies | ||
run: | | ||
if git log -1 --pretty=%B | grep -q "AUTOMATED"; then | ||
echo "Changes were automated, exiting" | ||
exit 0 | ||
fi | ||
npm i -g eslint prettier svelte | ||
- name: Import submodules | ||
run: | | ||
if git log -1 --pretty=%B | grep -q "AUTOMATED"; then | ||
echo "Changes were automated, exiting" | ||
exit 0 | ||
fi | ||
git submodule update --init --recursive --remote | ||
- name: Run Formatter, Linter, then Checks | ||
run: | | ||
if git log -1 --pretty=%B | grep -q "AUTOMATED"; then | ||
echo "Changes were automated, exiting" | ||
exit 0 | ||
fi | ||
sh ./scripts/fmt-lint-check.sh | ||
- name: Restore dependencies | ||
run: | | ||
echo "Restore package.json and package-lock.json to their original names" | ||
rm package.json package-lock.json | ||
mv .package.json package.json | ||
mv .package-lock.json package-lock.json | ||
- name: Git Config | ||
run: | | ||
git config --global user.name "github-actions[bot]" | ||
git config --global user.email "github-actions[bot]@users.noreply.github.com" | ||
- name: Push results | ||
run: | | ||
if git log -1 --pretty=%B | grep -q "AUTOMATED"; then | ||
echo "Changes were automated, exiting" | ||
exit 0 | ||
fi | ||
echo "Adding changes..." | ||
git add . | ||
echo "Committing changes..." | ||
git commit --allow-empty -m "AUTOMATED: Format, lint, and check" | ||
echo "Pushing changes..." | ||
git push origin main | ||
- name: Push to deliver | ||
run: | | ||
echo "testing if on branch 'main'" | ||
if [ "$(git rev-parse --abbrev-ref HEAD)" != "main" ]; then | ||
echo "not on branch 'main', exiting" | ||
exit 0 | ||
fi | ||
echo "Good, we're on main. Pushing to deliver..." | ||
echo "Deleting old deliver branch" | ||
git branch -D deliver || true | ||
git push origin --delete deliver || true | ||
echo "Creating new deliver branch" | ||
git checkout --orphan deliver | ||
git reset --hard | ||
git commit --allow-empty -m "Initializing deliver branch" | ||
echo "Merging main into deliver" | ||
git merge main --strategy-option=theirs --allow-unrelated-histories -m "Merging main into gh-pages" | ||
git pull origin main --allow-unrelated-histories | ||
git add . | ||
git commit --allow-empty -m "Merging main into deliver" | ||
git push origin deliver |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Document Repository | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
Document-Repository: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Retrieve git dependencies | ||
uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.GH_TOKEN }} | ||
|
||
- name: Setup Node.js | ||
uses: actions/[email protected] | ||
with: | ||
node-version: '14' | ||
|
||
- name: Install dependencies | ||
run: npm i -g documentation | ||
|
||
- name: Set up Github | ||
run: | | ||
git config --global user.name "github-actions[bot]" | ||
git config --global user.email "github-actions[bot]@users.noreply.github.com" | ||
echo "Deleting old gh-pages branch" | ||
git branch -D gh-pages || true | ||
git push origin --delete gh-pages || true | ||
echo "Creating new gh-pages branch" | ||
git checkout --orphan gh-pages | ||
git reset --hard | ||
git commit --allow-empty -m "Initializing gh-pages branch" | ||
git push origin gh-pages | ||
echo "Merge main into gh-pages" | ||
git merge main --allow-unrelated-histories -m "Merge main into gh-pages" | ||
- name: Run documentation | ||
run: sh ./scripts/docs.sh | ||
|
||
# - name: Deploy to GitHub Pages 🚀 | ||
# uses: JamesIves/[email protected] | ||
# with: | ||
# branch: gh-pages | ||
# folder: ./ | ||
|
||
- name: Deploy to GitHub Pages 🚀 | ||
run: | | ||
git add . | ||
git commit -m "Update docs" | ||
git push origin gh-pages |
Oops, something went wrong.