Skip to content

Commit 2811a11

Browse files
More tests (#37)
* add theme switch and unsupported block tests * generate and format * checkpoint * checkpoint * checkpoint * watch eslint
1 parent f4a2080 commit 2811a11

18 files changed

+557
-52
lines changed

typescript/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,11 +274,12 @@ b7b30c1 : Make more typesafe
274274
You can choose a different version from the list or create new one. But bumpp is smart enough to use appropriate next version.
275275

276276
3. Verify and confirm
277-
4. Push commit and tag
277+
4. Push commit and tag
278278

279279
```
280280
git push --follow-tags
281281
```
282+
282283
5. The new tag will trigger a release on github actions.
283284
6. Go to github and create release using the new tag. Make sure you set the correct previous tag prefixed with `typescript-v`
284285

@@ -317,6 +318,7 @@ git push --follow-tags
317318
- [ ] validate page prop somehow. not clear how to do yet. we can't use the /schema because it's HUGE and also because it's outside of /typescript. Will need to think about this.
318319

319320
maybe do something like this?
321+
320322
```
321323
import type { Page } from "../models/generated/page/page";
322324
import { isPage } from "../models/generated/essential-types";
@@ -353,4 +355,4 @@ export function validatePageWithError(obj: unknown): {
353355

354356
will require us to write a validator and we won't benefit from the defined schema jsons.
355357

356-
- [ ] make error boundary catch errors in JsonDocRenderer.tsx body
358+
- [ ] make error boundary catch errors in JsonDocRenderer.tsx body

typescript/eslint.config.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@ module.exports = [
4848
// "@typescript-eslint/no-explicit-any": "error",
4949
"@typescript-eslint/no-unused-vars": [
5050
"warn",
51-
{ argsIgnorePattern: "^_" },
51+
{
52+
argsIgnorePattern: "^_",
53+
varsIgnorePattern: "^_",
54+
caughtErrorsIgnorePattern: "^_",
55+
},
5256
],
5357

5458
// React rules
@@ -97,9 +101,7 @@ module.exports = [
97101
"coverage/**",
98102
".jest/**",
99103
"scripts/**",
100-
"tests/**",
101104
"**/generated/**",
102-
"src/serialization/**",
103105
],
104106
},
105107
];

typescript/package-lock.json

Lines changed: 224 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

typescript/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
"clean": "rm -rf dist",
1010
"build": "tsup",
1111
"build:watch": "tsup --watch",
12-
"dev": "concurrently \"npm run build:watch\" \"npm run lint:watch\" \"npm run type-check:watch\"",
13-
"type-check:watch": "tsc --noEmit --watch --pretty",
14-
"lint:watch": "eslint src --ext .ts,.tsx --cache",
12+
"dev": "concurrently \"npm run build:watch\" \"npm run lint:watch\" \"npm run check:watch\"",
13+
"check:watch": "tsc --noEmit --watch --pretty",
14+
"lint:watch": "nodemon --watch src --ext ts,tsx --exec \"eslint src --ext .ts,.tsx\"",
1515
"generate-types": "ts-node scripts/generate-types.ts",
1616
"test": "vitest",
1717
"test:run": "vitest run",
@@ -62,6 +62,7 @@
6262
"json-schema-to-typescript": "^15.0.4",
6363
"json5": "^2.2.3",
6464
"lint-staged": "^15.5.2",
65+
"nodemon": "^3.1.10",
6566
"prettier": "3.5.3",
6667
"puppeteer": "^24.9.0",
6768
"size-limit": "^11.2.0",

typescript/src/models/generated/block/types/equation/equation.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import type { Block } from "../../block";
1+
import type { BlockBase } from "../../base";
22

3-
export type EquationBlock = Block & {
3+
export type EquationBlock = BlockBase & {
44
type: "equation";
55
equation: {
66
expression: string;

0 commit comments

Comments
 (0)