Jack
a067a32b7a
chore: move main linting to oxlint (@miodec) ( #7144 )
...
- main linting is now done by oxlint. eslint remains for linting json
files in the frontend (until oxlint adds support)
- move type checking to the lint step (with --type-check)
this improves performance by removing a duplicated typescript parse task
(instead of parsing for linting then again for type checking, it parses
once for both)
- add a `lint-fast` npm script to get some fast fail behavior. it simply
lints with no type information
- oxc plugins are still in preview, so the custom plugin that checks for
`__testing` usage outside of tests runs outside the main linting job
until performance is improved
- fixes some type issues (and config issues) that were not visible due
to a missing type check on some files. now type checking will run on
every file that is linted
- split up oxc config for easier management
waiting https://github.com/oxc-project/tsgolint/pull/494
seeing around 3x improvement in type aware linting
2025-12-15 22:16:16 +01:00
Jack
f910c8a567
chore: prettier upgrade (@miodec) ( #7159 )
2025-11-27 00:20:09 +01:00
Christian Fehmer
1009791915
refactor: remove lodash from backend (@fehmer) ( #6953 )
2025-11-17 12:51:40 +01:00
Christian Fehmer
6b1bbfb432
fix: pin implementation (@fehmer) ( #6699 )
2025-07-09 12:05:18 +02:00
Miodec
04fbd81c10
chore: bump oxlint version
2025-05-29 13:23:13 +02:00
Jack
ea90e0a99e
refactor: dont allow nullable numbers (@miodec) ( #6564 )
...
Enables strict boolean expressions rule for nullable numbers
2025-05-16 16:04:19 +02:00
Christian Fehmer
5ab7bfb438
refactor: move themes list to typescript (@fehmer) ( #6489 )
...
Co-authored-by: fehmer <3728838+fehmer@users.noreply.github.com>
2025-05-05 13:30:09 +02:00
Jack
b257a52f41
impr: add fallback and migrate to parsejsonwithschema (@miodec) ( #6518 )
...
!nuf
2025-05-03 12:14:35 +02:00
Jack
e06f7f41cf
refactor: add trycatch util (@miodec) ( #6492 )
...
Adds trycatch util to cleanup try catch code.
2025-04-26 21:24:39 +02:00
Jack
cac8835c77
chore: add oxlint (@miodec) ( #6455 )
...
Use oxlint for general linting to provide much quicker feedback. Keep
eslint for type-aware rules. Fully switch to oxlint once it supports
type-aware.
2025-04-16 17:18:50 +02:00
Jack
01dee3fe15
feat: leaderboards remake, weekly xp leaderboards (@miodec) ( #6250 )
2025-02-12 16:34:03 +01:00
Christian Fehmer
a2d91f2a73
refactor: better detection of ZodError (@fehmer) ( #6258 )
2025-02-11 20:16:09 +01:00
Christian Fehmer
12e150072b
fix: fix error handling in parseWithSchema (@fehmer) ( #6229 )
...
`instanceof ZodError` is not working if the code is packaged as a module
for unknown reason. Found while adding tests for the url-handler in
#6207 .
2025-02-04 11:08:46 +01:00
Mohit Paddhariya
3510ea9760
refactor: replace JSON.parse with parseJsonWithSchema (@dev-mohit06) ( #6207 )
...
## Description
Replaces raw JSON parsing with schema-based validation across frontend
TypeScript files to improve type safety and error handling.
### Scope of Changes
- Updated JSON parsing in:
- `account.ts`
- `import-export-settings.ts`
- `analytics-controller.ts`
- `local-storage-with-schema.ts`
- `url-handler.ts`
- `commandline/lists.ts`
- `test/wikipedia.ts`
- Added schema in `test/custom-text.ts`:
```typescript
export const customTextDataSchema = z.object({
text: z.array(z.string()),
mode: CustomTextModeSchema,
limit: z.object({
value: z.number(),
mode: CustomTextLimitModeSchema
}),
pipeDelimiter: z.boolean(),
});
```
### Benefits
- Enhanced runtime type safety
- More robust error handling
- Consistent JSON parsing approach
### Checks
- [x] Follows Conventional Commits
- [x] Includes GitHub username
- [ ] Adding quotes? (N/A)
- [ ] Adding language/theme? (N/A)
---------
Co-authored-by: Miodec <jack@monkeytype.com>
2025-02-03 23:45:57 +01:00
Christian Fehmer
353fc14b4e
refactor: move parseJsonWithSchema to utils package (@fehmer) ( #6109 )
2024-12-22 18:04:12 +01:00
Jack
1509a675b8
refactor: move common util functions to a package (@miodec) ( #5894 )
...
Also moves esbuild to a package.
2024-09-20 11:54:14 +02:00