Commit graph

26 commits

Author SHA1 Message Date
Jack fe7a67d0fb
chore: add more eslint rules (#5687)
* duplicate

* no meaningless void

* no-unnecessary-boolean-literal-compare

* prefer includes

* fixes

* type cast

* ignore rule

* backend

* duplicate

* interface > type

* no-confusing-void-expression

* no-unnecessary-type-assertion

* extend plugin

* fix

* ignore
2024-07-30 18:17:58 +02:00
Jack 3e88ac2f12
refactor: restructure project to a true monorepo (#5626)
* split ts files

* packages

* nomore workspace?

* blah

* build, exports

* declaration

* blargh

* turrrrbo

* fix fontawesome paths

* allow file in eslint, fix ts errors

* optimise package, update tsconfig

* fix ts

* update turbo config

* eslint split

* fix imports

* fix types

* lock

* add turbo task

* script

* test task

* pretty scripts

* update prettier ignore

* no cache for tests

* lint task

* turbo

* no out

* depend on env

* fix mono breaking things

* odl

* fix version dependency of mongodb-memory-server

* Revert "fix version dependency of mongodb-memory-server"

This reverts commit 52ffac47b1.

* update vitest-mongodb

* release scripts

* update ci

* update dev script

* ignore issues around firebase config

* add check ts tasks

* import isaxioserror

* shared types package

* replace tsnodedev with tsx

* fix import

* shared types

* module

* backend imports

* declaration

* node version

* test code

* assert json

* verbatim

* type

* lodash

* ts ver

* fix fix fix?

* remove assert

* remove module and resolution

* cleanup

* tsconfig

* fix frontend

* remove unecessary props

* more unused

* remove skiplib

* declaration map, dev script

* remove install scripts

* fix regex

* move shared types to package

* dont include shared types

* remove path

* update scripts

* test code

* test code

* fix backend types

* fully fix backend

* fix frontend d.ts

* add .js to imports

* remove module

* revert add .js

* update tsconfig

* use bundler module resolution

* almost all frontend types

* mooore

* date fns

* fix backend docker

* fix ape keys

* fix type

* clean rimraf type

* fix shared-types in workspace

* fix import resolving

* fix docker builds

* ignore type problems on slim-select until new version is released

* turrrrbo

* fix npm ci

* fix lint task

* expose env variables needed by frontend build

* fix dependencies

* package-lock

* backend watch ts and lint

* add fe and be build scripts to root

* fix dev not building packages

* shared-types missing eslint

* move shared types back to dev-deps

* add packages to labeler

* add packages step to ci

* typo

* filter update

* remove concurrently from root

* add scripts

* abbreviate

* rename

* yeet

* fixed path

* test pkg

* consistent ordering

* rename

* Revert "backend imports"

This reverts commit d715198829.

* fix missing imports, remove last .js

* remove test package

---------

Co-authored-by: Christian Fehmer <cfe@sexy-developer.com>
2024-07-22 15:08:11 +02:00
Christian Fehmer 5b970ecea7
impr: use typescript for font-preview and fontawesome scripts (@fehmer) (#5613) 2024-07-15 12:17:31 +02:00
Jack 966d3ce574
fix: preview fonts not working correctly in the commandline (#5595) 2024-07-10 18:40:18 +02:00
Christian Fehmer 66c09a462f
impr: reduce initial loading time of settings page (@fehmer) (#5583) 2024-07-09 21:23:28 +02:00
Jack f72f58f3f9
fix: font awesome regular not working (Miodec, fehmer) (#5477)
!nuf
2024-06-07 13:51:32 +02:00
Christian Fehmer fad3f6e8d1
impr: optimize use of fontawesome (fehmer) (#5423)
!nuf
2024-06-07 11:29:04 +02:00
Miodec f91d6d7e6b chore: quote lengths script 2024-03-11 22:32:40 +01:00
Sanidhya Singh 9aeaa31d2c
impr: replace JSONSchema with ajv for faster validation (sanidhyas3s) (#5145)
* impr: replace JSONSchema with ajv for faster validation

* Remove JSONSchema from packages

* Add ajv in dev-dependencies

* move dep to frontend

* Fix validation schema for different languages and error messages

* fix double space

* different way of showing errors

* por que no los dos

* return on failed schema

---------

Co-authored-by: Miodec <jack@monkeytype.com>
2024-03-11 20:00:10 +01:00
Jack 8f6bfbb708
build: replace webpack with vite (#5096) 2024-02-22 02:24:20 +01:00
farkon00 0566280bc4
impr(layout emulator): add support for alt layer emulation (farkon00) (#4817)
* impr: add AltGr support to the keyboard emulator

* Added a polish layout

* fix: fix caps lock and punctuation behavior for layout emulator

* Add AltGr version of Ґ to the Ukrainian layout

* Fixed the backquote key not working for the layout emulator

* Renamed polish layout to polish programmers

* Made layout emulator use both alts for modifications on mac
2024-01-10 15:48:16 +01:00
Christian Fehmer 730dd20ec6
fix(lazy mode): proper handling of german umlaute in lazy mode (fehmer) (#4864)
* fix: Proper handling of german umlaute in lazy mode

* fix: Proper handling of german umlaute in lazy mode

* use additional accents from language file

* refactoring

* add tests

* update property name

* update validation script

---------

Co-authored-by: Miodec <jack@monkeytype.com>
2024-01-08 17:01:20 +01:00
Miodec 268e311290 build: add theme name and filename validation 2023-10-10 11:45:21 +01:00
Miodec 7e9a7efd79 prettier fix 2023-08-03 16:24:48 +02:00
Gabriel Forien 8bebb8c54a
ci(frontend/scripts): print expected quote length (#4499) gforien 2023-08-02 15:47:34 +02:00
Jack 5543aaae65
converted required leftToRight to optional rightToLeft (#4229)
* converted required leftToRight to optional rightToLeft

* merge straggler

* removed empty lines

* removed empty lines
2023-04-26 23:34:13 +02:00
Miodec 675b7c1bf3 added script 2023-01-12 08:39:28 +01:00
egorguslyan 588d14a2b3
Multiple funboxes (#3578) egorguslyan
* input-controller

* result

* Finishing logic

* Numbers + layoutfluid

* One interface

* Filter results

* tts error on undefined

Extencions like NoScript can partly block scripts on the page.
If speech synthesis is not loaded, notification shows up
without freezing the page

* Improved randomcase

* Prevent dublicates in command line

* Change filter logic

* Prettier

* Convert numbers

* num

* Quote and zen modes

* withWords

* Misc

* Expand funboxes list for pb saving

* Move list to backend

* Move to constants

* Async withWords, checkFunbox tweak

* Prettier

* Forbid nonexistent funboxes

* Disable speech if language is ignored

TtS's init() uses setLanguage()

* canGetPb

* Less circular imports

* Ligatures typo

* Simon says blocks word highlight

* blockWordHighlight backend

* Changed imports

* usesLayout

* JSON schema

* Display notification instead of reseting

* canGetPB

* One getWordHtml

* Dividing properties

* No sync

* blockedModes

* forcedConfig

* Infinitness parameter, list sync

* applyConfig, memory

Remove extra applyConfig somewhere;
Memory in quotes and custom modes

* I lost this code after merging

* Remove arrowKeys

* isFunboxCompatible

* Fix logic

* sync canGetPb

* remove FunboxObjectType

* baloons

* moved cangetpb function to pb utils

* updated the pb check to be easier to understand

* Refactor isFunboxCompatible

* Check modes conflicts

* Strict highlightMode type

* Only one allowed or blocked highlight mode

* More checks

* Undefined only, not false

* Prettier

* Highlight modes

* added intersect helper function

* reworked forced config
 - storing allowed modes as an array, not string
 - first value will be used if config is outside of the allowed values
 - instead of checking if highlight mode is allowed, checking if the whole config is available
- removed the "Finite" forced config and replaced it with "noInfiniteDuration" property
- config event listener now checks every config change, not just highlight mode. this will ensure any future forced configs will work straight out of the box

* ManualRestart in commandline

* fixed funbox commands not correctly showing which funbox is active

* Upd list

* Reduce list

* split funbox into smaller files
moved funbox files into its own folder

* missing none command

* added function to convert camel case to space separated words

* changed config validation to be blocking the change rather than reacting to the change

* reduced code duplication

* allowing sub color flash

* moved keymap key higlighting and flashing into an observable event

* moved tts into a observable event

* passing funbox into config validation funcitons

* replaced getActive with get

* only keeping functions structure in the list, moved the actual function bodies to funbox.ts
done to remove a circular dependency
still need to finish the rest of the funboxes

* removed empty function definitions (typing issues)

* removed unnecessary type

* unnecessary check

* moved mode checking to config validation

* longer notification

* checking funboxes before changing mode

* moved more functions

* fixed incorrect type

* checking funboxes when setting punctuation and numbers

* Rest of funboxes

* fixed funbox commands showing tags text and icon

* checking if funbox can be set with the current config

* better error message

* validating with setting time and words
importing from a new file

* added a function to capitalise the first letter of a string

* using function from a new file
new parameters

* moved test length check to a function in a different file

* moved some funbox validation into its own file

* only  showing notifications if the setWordCount returned true

* moved funbox validation to its own file

* setting manual restart when trying to set funbox to nonoe

* moving this validation to before activating the funbox

* returning forcedConfigs along side if current value is allowed
moved infinite check to checkFunboxForcedConfigs

* removed function, replaced by funox validation

* removing duplicates

* throwing if no intersection

* wrong type

* always allowing setting funbox
sometimes it might be possible to update the config

* checking forced configs first, and updating config if possible
only setting funbox to none when couldnt update config

* basic difficulty levels

* xp funbox bonus

* removed console logs

* renamed import, renamed type

* lowercase b for consistency across the codebase

* renamed variable for readability

* renamed for clarity

* converted metadata to object

* changed from beforesubgroup on the command to before list on the subgroup

* using code suggested by bruce

* renamed type

* removed console log

* merch banner fix

* important animation

* updating the icon of "none" funbox command

* removed unnecessary import

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Miodec <jack@monkeytype.com>
2022-11-30 16:57:48 +01:00
Miodec 8f489960f6 checking if layouts have a valid type 2022-08-22 14:22:16 +02:00
Miodec b0343adfde fix quote lengths 2022-05-28 17:14:55 +02:00
Miodec 145493be6d lowered threshold 2022-05-22 00:50:40 +02:00
Miodec 9811f3f1e5 lowered threshold, not comparing using rounded percentage 2022-05-21 01:02:37 +02:00
Miodec b621c2a988 word duplicates reject validation with error 2022-05-21 00:59:48 +02:00
Miodec 81703b900e fixed count 2022-05-21 00:36:43 +02:00
digi e0c9f3cdd7
adds language validation check (#2995) tmuplayer33
* adds language-validation.js

* run prettier

* run prettier on gulpfile.js

* moves language-validation.js functionality into json-validation.js, rollback gulpfile.js

* improves duplicate detection algorithm, removes constraint

* use duplicate detection from @Bruception

* moves findDuplicates function out of loop, adds duplicatePercentageThreshold

* removes russian_10k as 90% of the words are duplicates

* use Math.round to prevent errors when duplicatePercentageThreshold is 0

* remove duplicates from code_bash.json

* remove duplicates from code_brainfck.json

* remove duplicates from code_html.json

* no longer create error when duplicates are found

* run prettier

* lowered threshold, added count log

Co-authored-by: Maximilian Kronenbürger <maximilian.kronenbuerger@1und1.de>
Co-authored-by: Miodec <bartnikjack@gmail.com>
2022-05-21 00:21:37 +02:00
Bruce Berrios 0fe99e0a28
Handle static assets with webpack (#2723) bruception
* Move some static file management to webpack

* Add build time feedback

* Add lint step back

* Use concurrently
2022-03-17 21:00:20 +01:00