Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion '.turbo'/0887dd989cb0df92-meta.json

This file was deleted.

Binary file removed '.turbo'/0887dd989cb0df92.tar.zst
Binary file not shown.
1 change: 0 additions & 1 deletion '.turbo'/560fb9e86b65f150-meta.json

This file was deleted.

Binary file removed '.turbo'/560fb9e86b65f150.tar.zst
Binary file not shown.
1 change: 0 additions & 1 deletion '.turbo'/5de5b3be5565a1d4-meta.json

This file was deleted.

Binary file removed '.turbo'/5de5b3be5565a1d4.tar.zst
Binary file not shown.
1 change: 0 additions & 1 deletion '.turbo'/6df68d36259bce9e-meta.json

This file was deleted.

Binary file removed '.turbo'/6df68d36259bce9e.tar.zst
Binary file not shown.
1 change: 0 additions & 1 deletion '.turbo'/6e55f2172ff48f6f-meta.json

This file was deleted.

Binary file removed '.turbo'/6e55f2172ff48f6f.tar.zst
Binary file not shown.
1 change: 0 additions & 1 deletion '.turbo'/87c54e168150e584-meta.json

This file was deleted.

Binary file removed '.turbo'/87c54e168150e584.tar.zst
Binary file not shown.
1 change: 0 additions & 1 deletion '.turbo'/8ec1ba9b0fa0ad92-meta.json

This file was deleted.

Binary file removed '.turbo'/8ec1ba9b0fa0ad92.tar.zst
Binary file not shown.
1 change: 0 additions & 1 deletion '.turbo'/928fdb17552f72c8-meta.json

This file was deleted.

Binary file removed '.turbo'/928fdb17552f72c8.tar.zst
Binary file not shown.
1 change: 0 additions & 1 deletion '.turbo'/bf4fc849fd54c438-meta.json

This file was deleted.

Binary file removed '.turbo'/bf4fc849fd54c438.tar.zst
Binary file not shown.
1 change: 0 additions & 1 deletion '.turbo'/c1c2543d8c410791-meta.json

This file was deleted.

Binary file removed '.turbo'/c1c2543d8c410791.tar.zst
Binary file not shown.
1 change: 0 additions & 1 deletion '.turbo'/c57e3a1fe2240051-meta.json

This file was deleted.

Binary file removed '.turbo'/c57e3a1fe2240051.tar.zst
Binary file not shown.
1 change: 0 additions & 1 deletion '.turbo'/dda3b3af35eb510f-meta.json

This file was deleted.

Binary file removed '.turbo'/dda3b3af35eb510f.tar.zst
Binary file not shown.
1 change: 0 additions & 1 deletion '.turbo'/eb9eb96f6e1ed9be-meta.json

This file was deleted.

Binary file removed '.turbo'/eb9eb96f6e1ed9be.tar.zst
Binary file not shown.
8 changes: 0 additions & 8 deletions .devcontainer/Dockerfile

This file was deleted.

32 changes: 0 additions & 32 deletions .devcontainer/devcontainer.json

This file was deleted.

2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
## Guidelines

### General Concepts
* Code should follow our ESLint rules as closely as possible (`pnpm lint`)
* Code should follow our linting rules as closely as possible (`pnpm lint`)
* Code should attempt to be TypeScript type safe
* Code should attempt to be consistent, fast, scalable, and efficient

Expand Down
27 changes: 16 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CI
on:
push:
branches:
- main
- main
pull_request:

permissions:
Expand All @@ -14,43 +14,48 @@ jobs:
name: CI
runs-on: ubuntu-latest
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
TURBO_SCM_BASE: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.before }}
TURBO_TELEMETRY_DISABLED: 1
steps:
- name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
fetch-depth: 0
filter: blob:none

- name: Setup pnpm
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4

- name: Install node.js v22
- name: Install node.js v24
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version: 22.6.0
node-version: 24.7.0

- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh

- name: Turbo cache
id: turbo-cache
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
with:
path: .turbo
key: turbo-${{ github.job }}-${{ github.ref_name }}-${{ github.sha }}
restore-keys: |
turbo-${{ github.job }}-${{ github.ref_name }}-

- name: Install dependencies
run: pnpm install
run: pnpm install --frozen-lockfile

- name: Lint
run: pnpm lint
run: pnpm lint:ci --affected

- name: Typecheck
run: pnpm test:types
run: pnpm typecheck --affected

- name: Build
run: pnpm build

- name: Test
run: pnpm test:coverage
run: pnpm test:coverage --changed=$TURBO_SCM_BASE
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
environment: production
steps:
- name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
token: ${{ secrets.REPO_PAT }}
submodules: recursive
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ config.json
dist
node_modules
.turbo
'.turbo'
package-lock.json
out
.yarn/install-state.gz
Expand All @@ -14,6 +15,8 @@ out
*.tar.gz
*.7z
*.rar
.DS_Store
**/.DS_Store
.swc
.next
.
Expand All @@ -24,6 +27,5 @@ apps/support-bot/commands.json
Cargo.lock
/target
/data
compose.dev.yml
*.node
.env
4 changes: 4 additions & 0 deletions .oxfmtrc.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "./node_modules/oxfmt/configuration_schema.json",
"printWidth": 80,
}
183 changes: 183 additions & 0 deletions .oxlintrc.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": [
"eslint",
"typescript",
"unicorn",
"oxc",
"import",
"node",
"promise",
"vitest",
],
"jsPlugins": [
{ "name": "license-header", "specifier": "eslint-plugin-license-header" },
],
"rules": {
// Oxc
"oxc/no-this-in-exported-function": "error",
"oxc/misrefactored-assign-op": "error",
"oxc/approx-constant": "error",
"oxc/no-accumulating-spread": "error",
"oxc/branches-sharing-code": "error",

// Type Aware Rules
"typescript/no-unnecessary-boolean-literal-compare": "error",
"typescript/no-unnecessary-template-expression": "error",
"typescript/no-unnecessary-type-arguments": "error",
"typescript/no-unnecessary-type-conversion": "error",
"typescript/no-unnecessary-type-assertion": "error",
"typescript/non-nullable-type-assertion-style": "error",
"typescript/prefer-optional-chain": "error",
"typescript/no-unnecessary-condition": "error",
"typescript/no-confusing-void-expression": "error",
"typescript/no-deprecated": "error",
"typescript/no-misused-promises": "error",
"typescript/only-throw-error": "error",
"typescript/prefer-includes": "error",
"typescript/prefer-nullish-coalescing": "error",
"typescript/prefer-promise-reject-errors": "error",
"typescript/related-getter-setter-pairs": "error",
"typescript/require-await": "error",
"typescript/restrict-plus-operands": "error",
"typescript/switch-exhaustiveness-check": "error",

"typescript/no-unnecessary-type-constraint": "error",
"typescript/no-extraneous-class": ["error", { "allowWithDecorator": true }],
"typescript/no-confusing-non-null-assertion": "error",
"typescript/no-non-null-asserted-nullish-coalescing": "error",
"typescript/no-import-type-side-effects": "error",
"typescript/no-empty-object-type": "error",
"typescript/no-dynamic-delete": "error",
"typescript/ban-ts-comment": [
"error",
{
"ts-expect-error": "allow-with-description",
"ts-ignore": true,
"ts-nocheck": true,
"ts-check": true,
"minimumDescriptionLength": 3,
},
],
"typescript/no-unsafe-function-type": "error",

// Eslint
"no-unneeded-ternary": "error",
"no-unmodified-loop-condition": "error",
"no-unexpected-multiline": "error",
"no-underscore-dangle": "error",
"no-extra-bind": "error",
"no-extend-native": "error",
"no-var": "error",
"no-proto": "error",
"no-param-reassign": "warn",
"no-empty": "error",
"no-useless-call": "error",
"no-await-in-loop": "error",
"no-useless-assignment": "error",
"no-array-constructor": "error",
"no-case-declarations": "error",
"no-constructor-return": "error",
"no-else-return": "error",
"no-fallthrough": "error",
"no-lonely-if": "error",
"no-promise-executor-return": "error",
"no-prototype-builtins": "error",
"no-useless-return": "error",
"no-warning-comments": "warn",
"no-unused-vars": [
"error",
{ "fix": { "imports": "safe-fix", "variables": "safe-fix" } },
],
"eqeqeq": "error",
"class-methods-use-this": "warn",
"symbol-description": "error",

// Unicorn
"unicorn/prefer-add-event-listener": "error",
"unicorn/no-instanceof-builtins": "error",
"unicorn/no-accessor-recursion": "error",
"unicorn/consistent-function-scoping": "error",
"unicorn/prefer-number-properties": "error",
"unicorn/prefer-node-protocol": "error",
"unicorn/prefer-modern-math-apis": "error",
"unicorn/no-useless-error-capture-stack-trace": "error",
"unicorn/no-magic-array-flat-depth": "error",
"unicorn/no-unnecessary-slice-end": "error",
"unicorn/no-array-for-each": "error",
"unicorn/no-anonymous-default-export": "error",
"unicorn/no-abusive-eslint-disable": "error",
"unicorn/prefer-array-flat-map": "error",
"unicorn/prefer-array-find": "error",
"unicorn/no-useless-iterator-to-array": "error",
"unicorn/consistent-assert": "error",
"unicorn/consistent-empty-array-spread": "error",
"unicorn/explicit-length-check": "error",
"unicorn/new-for-builtins": "error",
"unicorn/no-hex-escape": "error",
"unicorn/no-immediate-mutation": "error",
"unicorn/no-lonely-if": "error",
"unicorn/no-negation-in-equality-check": "error",
"unicorn/no-new-buffer": "error",
"unicorn/no-object-as-default-parameter": "error",
"unicorn/no-typeof-undefined": "error",
"unicorn/no-unnecessary-array-splice-count": "error",
"unicorn/no-unreadable-iife": "error",
"unicorn/no-useless-promise-resolve-reject": "error",
"unicorn/prefer-array-flat": "error",
"unicorn/prefer-array-some": "error",
"unicorn/prefer-blob-reading-methods": "error",
"unicorn/prefer-code-point": "error",
"unicorn/prefer-dom-node-dataset": "error",
"unicorn/prefer-dom-node-append": "error",
"unicorn/prefer-dom-node-remove": "error",
"unicorn/prefer-event-target": "error",
"unicorn/prefer-import-meta-properties": "error",
"unicorn/prefer-math-trunc": "error",
"unicorn/prefer-native-coercion-functions": "error",
"unicorn/prefer-query-selector": "error",
"unicorn/prefer-regexp-test": "error",
"unicorn/prefer-string-replace-all": "error",
"unicorn/prefer-string-slice": "error",
"unicorn/prefer-top-level-await": "error",
"unicorn/prefer-type-error": "error",
"unicorn/require-number-to-fixed-digits-argument": "error",

// Import
"import/no-self-import": "error",
"import/no-named-as-default": "error",
"import/no-empty-named-blocks": "error",
"import/no-absolute-path": "error",
"import/no-cycle": "error",

// Promise
"promise/no-promise-in-callback": "error",
"promise/no-multiple-resolved": "error",
"promise/always-return": "error",
"promise/no-new-statics": "error",

// Node
"node/no-path-concat": "error",
"node/handle-callback-err": "error",

// Vitest
"vitest/no-disabled-tests": "error",
"vitest/no-conditional-tests": "error",
"vitest/no-conditional-expect": "error",
"vitest/expect-expect": "error",

// License Header
"license-header/header": [
"error",
[
"/**",
" * Copyright (c) Statsify",
" *",
" * This source code is licensed under the GNU GPL v3 license found in the",
" * LICENSE file in the root directory of this source tree.",
" * https://github.com/Statsify/statsify/blob/main/LICENSE",
" */",
],
],
},
}
Loading
Loading