Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ updates:
directory: "/"
versioning-strategy: increase
schedule:
interval: "weekly"
interval: "weekly"
10 changes: 9 additions & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,12 @@ packages:
- any: ["packages/**/*"]

local dev:
- any: ["**/turbo.json", "**/tsconfig.json", "**/knip.json", "**/.prettierrc", "**/.oxlintrc.json", "**/.eslintrc.cjs"]
- any:
[
"**/turbo.json",
"**/tsconfig.json",
"**/knip.json",
"**/.prettierrc",
"**/.oxlintrc.json",
"**/.eslintrc.cjs",
]
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Formatting check
name: Check formatting

env:
PNPM_VERSION: "9.6.0"
Expand All @@ -8,7 +8,7 @@ on:
pull_request:
branches: [master]
types: [opened, reopened, synchronize, ready_for_review]

permissions:
contents: read

Expand Down Expand Up @@ -36,8 +36,7 @@ jobs:
version: ${{ env.PNPM_VERSION }}

- name: Install formatter
run: pnpm install -D -w prettier

run: pnpm install -D -w oxfmt

- name: Get changed files
id: get-changed-files
Expand All @@ -58,6 +57,5 @@ jobs:
run: |
CHANGED_FILES=$(echo ${{ steps.get-changed-files.outputs.result }})
if [ -n "$CHANGED_FILES" ]; then
pnpm prettier --check $CHANGED_FILES
pnpm oxfmt $CHANGED_FILES --check --no-error-on-unmatched-pattern
fi

2 changes: 1 addition & 1 deletion .github/workflows/ci-failure-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ jobs:
- name: Apply label changes
uses: PauMAVA/add-remove-label-action@v1.0.3
with:
issue_number: ${{ steps.pr_num_reader.outputs.content }}
issue_number: ${{ steps.pr_num_reader.outputs.content }}
add: "waiting for update"
remove: "waiting for review"
5 changes: 2 additions & 3 deletions .github/workflows/fix-formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
version: ${{ env.PNPM_VERSION }}

- name: Install formatter
run: pnpm install -D -w prettier
run: pnpm install -D -w oxfmt

- name: Get changed files
id: get-changed-files
Expand All @@ -51,12 +51,11 @@ jobs:
);
return changedFiles.filter(file=> file.status !== "removed").map(file => file.filename).join(' ');


- name: Fix formatting
run: |
CHANGED_FILES=$(echo ${{ steps.get-changed-files.outputs.result }})
if [ -n "$CHANGED_FILES" ]; then
pnpm prettier --write $CHANGED_FILES
pnpm oxfmt $CHANGED_FILES --no-error-on-unmatched-pattern
fi

- name: Commit changes
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ jobs:
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v4
with:
repo-token: "${{ secrets.API_TOKEN }}"
- uses: actions/labeler@v4
with:
repo-token: "${{ secrets.API_TOKEN }}"
3 changes: 0 additions & 3 deletions .github/workflows/monkey-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ jobs:
needs: [pre-ci]
if: needs.pre-ci.outputs.should-build-be == 'true' || needs.pre-ci.outputs.should-build-fe == 'true' || needs.pre-ci.outputs.should-build-pkg == 'true' || needs.pre-ci.outputs.assets-json == 'true' || contains(github.event.pull_request.labels.*.name, 'force-full-ci')
steps:

- name: Checkout pnpm-lock
uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -175,7 +174,6 @@ jobs:
runs-on: ubuntu-latest
if: needs.pre-ci.outputs.should-build-fe == 'true' || needs.pre-ci.outputs.should-build-pkg == 'true' || contains(github.event.pull_request.labels.*.name, 'force-full-ci')
steps:

- uses: actions/checkout@v4
with:
sparse-checkout: |
Expand Down Expand Up @@ -296,7 +294,6 @@ jobs:
runs-on: ubuntu-latest
if: needs.pre-ci.outputs.should-build-pkg == 'true' || contains(github.event.pull_request.labels.*.name, 'force-full-ci')
steps:

- uses: actions/checkout@v4
with:
sparse-checkout: |
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/publish-docker-images.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: Publish Docker image


permissions:
contents: read

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/semantic-pr-title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
style
test
requireScope: false
subjectPattern: ^.+ \(@[^ ,]+(, @[^ ,]+)*\)$
subjectPattern: ^.+ \(@[^ ,]+(, @[^ ,]+)*\)$
subjectPatternError: |
Title "{title}"
didn't match the configured pattern. Please ensure that the title
Expand All @@ -46,7 +46,7 @@ jobs:
- uses: marocchino/sticky-pull-request-comment@v2
# When the previous steps fails, the workflow would stop. By adding this
# condition you can continue the execution with the populated error message.
if: always() && (steps.lint_pr_title.outputs.error_message != null)
if: always() && (steps.lint_pr_title.outputs.error_message != null)
with:
header: pr-title-lint-error
message: |
Expand Down
18 changes: 18 additions & 0 deletions .oxfmtrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"$schema": "https://raw.githubusercontent.com/oxc-project/oxc/refs/heads/main/npm/oxfmt/configuration_schema.json",
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"htmlWhitespaceSensitivity": "ignore",
"endOfLine": "lf",
"trailingComma": "all",
"ignorePatterns": [
"node_modules",
".turbo",
"dist",
"build",
"logs",
"coverage",
"*.md"
]
}
20 changes: 0 additions & 20 deletions .prettierignore

This file was deleted.

1 change: 1 addition & 0 deletions .prettierrc → .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"htmlWhitespaceSensitivity": "ignore",
Expand Down
2 changes: 1 addition & 1 deletion backend/docker/compose.db-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ services:

volumes:
mongo-data:
redis-data:
redis-data:
2 changes: 1 addition & 1 deletion backend/docker/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ services:
FROM node:24.11.0
RUN npm i -g pnpm@9.6.0
RUN mkdir /pnpm-store && chown -R 1000:1000 /pnpm-store
user: "node" ##this works as long as your local user has uid=1000
user: "node" ##this works as long as your local user has uid=1000
restart: on-failure
depends_on:
- redis
Expand Down
8 changes: 4 additions & 4 deletions backend/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "@monkeytype/backend",
"version": "1.14.3",
"license": "GPL-3.0",
"private": true,
"license": "GPL-3.0",
"scripts": {
"eslint": "eslint \"./src/**/*.ts\"",
"oxlint": "oxlint .",
Expand All @@ -20,9 +20,6 @@
"docker": "docker compose -f docker/compose.yml up",
"gen-docs": "tsx scripts/openapi.ts dist/static/api/openapi.json && redocly build-docs -o dist/static/api/internal.html internal@v2 && redocly bundle -o dist/static/api/public.json public-filter && redocly build-docs -o dist/static/api/public.html public@v2"
},
"engines": {
"node": "24.11.0 || 22.21.0"
},
"dependencies": {
"@date-fns/utc": "1.2.0",
"@monkeytype/contracts": "workspace:*",
Expand Down Expand Up @@ -94,5 +91,8 @@
"tsx": "4.16.2",
"typescript": "5.9.3",
"vitest": "4.0.8"
},
"engines": {
"node": "24.11.0 || 22.21.0"
}
}
4 changes: 2 additions & 2 deletions docker/backend-configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"dailyLeaderboards": {
"enabled": false
},
"leaderboards":{
"leaderboards": {
"minTimeTyping": 0
}
}
}
}
2 changes: 1 addition & 1 deletion docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ services:
volumes:
- redis-data:/data
healthcheck:
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
test: ["CMD", "redis-cli", "--raw", "incr", "ping"]
interval: 5s
timeout: 10s
retries: 15
Expand Down
2 changes: 1 addition & 1 deletion frontend/docker/compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:
FROM node:24.11.0
RUN npm i -g pnpm@9.6.0
RUN mkdir /pnpm-store && chown -R 1000:1000 /pnpm-store
user: "node" ##this works as long as your local user has uid=1000
user: "node" ##this works as long as your local user has uid=1000
# restart: on-failure
environment:
- SERVER_OPEN=false
Expand Down
91 changes: 45 additions & 46 deletions frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@monkeytype/frontend",
"license": "GPL-3.0",
"private": true,
"license": "GPL-3.0",
"type": "module",
"scripts": {
"eslint": "eslint \"./**/*.ts\"",
Expand All @@ -21,24 +21,50 @@
"tsc": "tsc",
"docker": "docker compose -f docker/compose.dev.yml up"
},
"engines": {
"node": "24.11.0 || 22.21.0"
},
"browserslist": [
"defaults",
"not op_mini all",
"not dead"
],
"lint-staged": {
"*.{json,scss,css,html}": [
"prettier --write"
"*": [
"oxfmt --no-error-on-unmatched-pattern"
],
"*.{ts,js}": [
"prettier --write",
"oxlint",
"eslint"
]
},
"dependencies": {
"@date-fns/utc": "1.2.0",
"@monkeytype/contracts": "workspace:*",
"@monkeytype/funbox": "workspace:*",
"@monkeytype/schemas": "workspace:*",
"@monkeytype/util": "workspace:*",
"@sentry/browser": "9.14.0",
"@sentry/vite-plugin": "3.3.1",
"@ts-rest/core": "3.52.1",
"animejs": "4.2.2",
"balloon-css": "1.2.0",
"canvas-confetti": "1.5.1",
"chart.js": "3.7.1",
"chartjs-adapter-date-fns": "3.0.0",
"chartjs-plugin-annotation": "2.2.1",
"chartjs-plugin-trendline": "1.0.2",
"color-blend": "4.0.0",
"damerau-levenshtein": "1.0.8",
"date-fns": "3.6.0",
"disposable-email-domains-js": "^1.0.35",
"firebase": "12.0.0",
"hangul-js": "0.2.6",
"howler": "2.2.3",
"idb": "8.0.3",
"jquery": "3.7.1",
"konami": "1.7.0",
"lz-ts": "1.1.2",
"modern-screenshot": "4.6.5",
"object-hash": "3.0.0",
"slim-select": "2.9.2",
"stemmer": "2.0.1",
"throttle-debounce": "5.0.2",
"zod": "3.23.8",
"zod-urlsearchparams": "0.0.16"
},
"devDependencies": {
"@fortawesome/fontawesome-free": "5.15.4",
"@monkeytype/eslint-config": "workspace:*",
Expand Down Expand Up @@ -81,39 +107,12 @@
"vite-plugin-pwa": "1.1.0",
"vitest": "4.0.8"
},
"dependencies": {
"@date-fns/utc": "1.2.0",
"@monkeytype/contracts": "workspace:*",
"@monkeytype/funbox": "workspace:*",
"@monkeytype/schemas": "workspace:*",
"@monkeytype/util": "workspace:*",
"@sentry/browser": "9.14.0",
"@sentry/vite-plugin": "3.3.1",
"@ts-rest/core": "3.52.1",
"animejs": "4.2.2",
"balloon-css": "1.2.0",
"canvas-confetti": "1.5.1",
"chart.js": "3.7.1",
"chartjs-adapter-date-fns": "3.0.0",
"chartjs-plugin-annotation": "2.2.1",
"chartjs-plugin-trendline": "1.0.2",
"color-blend": "4.0.0",
"damerau-levenshtein": "1.0.8",
"date-fns": "3.6.0",
"disposable-email-domains-js": "^1.0.35",
"firebase": "12.0.0",
"hangul-js": "0.2.6",
"howler": "2.2.3",
"idb": "8.0.3",
"jquery": "3.7.1",
"konami": "1.7.0",
"lz-ts": "1.1.2",
"modern-screenshot": "4.6.5",
"object-hash": "3.0.0",
"slim-select": "2.9.2",
"stemmer": "2.0.1",
"throttle-debounce": "5.0.2",
"zod": "3.23.8",
"zod-urlsearchparams": "0.0.16"
"browserslist": [
"defaults",
"not op_mini all",
"not dead"
],
"engines": {
"node": "24.11.0 || 22.21.0"
}
}
6 changes: 3 additions & 3 deletions frontend/src/ts/test/test-ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -960,9 +960,9 @@ export async function scrollTape(noAnimation = false): Promise<void> {
.slice(0, activeWordIndex)
.filter((child) => child.classList.contains("afterNewline")).length;
// the second `.afterNewline` after active word is visible during line jump
let lastVisibleAfterNewline = afterNewLineEls[
newLinesBeforeActiveWord + 1
] as HTMLElement | undefined;
let lastVisibleAfterNewline = afterNewLineEls[newLinesBeforeActiveWord + 1] as
| HTMLElement
| undefined;
if (lastVisibleAfterNewline) {
lastElementIndex = wordsChildrenArr.indexOf(lastVisibleAfterNewline);
} else {
Expand Down
Loading
Loading