Skip to content

Commit 4361630

Browse files
Rich text in bulleted list fix (#23)
* fix: rich text inside bullet list wrapping fix * add preview workflow that publishes to pkg-pr-new * checkpoint * checkpoint * checkpoint * checkpoint * checkpoint * checkpoint * checkpoint * checkpoint * checkpoint * checkpoint * checkpoint * checkpoint * checkpoint * checkpoint * checkpoint * checkpoint * checkpoint * checkpoint * checkpoint * checkpoint * checkpoint * checkpoint
1 parent f1c5c23 commit 4361630

20 files changed

+392
-1078
lines changed

.github/workflows/preview.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Publish preview from PR
2+
on:
3+
pull_request:
4+
paths:
5+
- 'typescript/**'
6+
- '!typescript/**/*.md' # Exclude markdown files using ! prefix
7+
- '!typescript/README.md'
8+
9+
jobs:
10+
publish-to-pkg-pr:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Set up Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: '20.x'
22+
registry-url: 'https://registry.npmjs.org'
23+
24+
- name: Install dependencies
25+
working-directory: ./typescript
26+
run: npm ci
27+
28+
- name: Generate types and build package
29+
working-directory: ./typescript
30+
run: |
31+
npm run generate-types
32+
npm run build
33+
34+
- name: Run tests
35+
working-directory: ./typescript
36+
run: npm test
37+
38+
- name: Prepare package for publishing
39+
working-directory: ./typescript
40+
run: |
41+
npm pack
42+
43+
44+
45+
- name: List files in typescript dir
46+
working-directory: ./typescript
47+
run: |
48+
ls -la
49+
50+
- name: Create git symlink
51+
run: ln -s ../.git typescript/.git
52+
53+
# - name: Mv tgz to root
54+
# working-directory: ./typescript
55+
# run: |
56+
# mv *.tgz ../
57+
58+
- name: List files in root
59+
run: |
60+
ls -la
61+
62+
- name: Publish preview
63+
working-directory: ./typescript
64+
run: npx pkg-pr-new publish

typescript/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,15 +254,15 @@ MIT
254254
- [x] table
255255
- [ ] todo?
256256
- [x] equation
257-
- [ ] image
257+
- [x] image
258258
- [x] blockquote
259259
- [] fix ts and eslint errors in these dirs and remove from ignore list of ts and eslint
260260
```
261261
"**/generated/**",
262262
"src/serialization/**",
263263
```
264264
- [x] add counter for numbered lists
265-
- [] setup up bumpp: https://www.npmjs.com/package/bumpp
265+
- [x] setup up bumpp: https://www.npmjs.com/package/bumpp
266266
- [] migrate test runner to vitest
267-
- [] move vite app to typescript root examples dir
267+
- [x] move vite app to typescript root examples dir
268268
- [] setup monorepo tooling

typescript/examples/vite_basic/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,31 +24,31 @@ export default tseslint.config({
2424
languageOptions: {
2525
// other options...
2626
parserOptions: {
27-
project: ['./tsconfig.node.json', './tsconfig.app.json'],
27+
project: ["./tsconfig.node.json", "./tsconfig.app.json"],
2828
tsconfigRootDir: import.meta.dirname,
2929
},
3030
},
31-
})
31+
});
3232
```
3333

3434
You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
3535

3636
```js
3737
// eslint.config.js
38-
import reactX from 'eslint-plugin-react-x'
39-
import reactDom from 'eslint-plugin-react-dom'
38+
import reactX from "eslint-plugin-react-x";
39+
import reactDom from "eslint-plugin-react-dom";
4040

4141
export default tseslint.config({
4242
plugins: {
4343
// Add the react-x and react-dom plugins
44-
'react-x': reactX,
45-
'react-dom': reactDom,
44+
"react-x": reactX,
45+
"react-dom": reactDom,
4646
},
4747
rules: {
4848
// other rules...
4949
// Enable its recommended typescript rules
50-
...reactX.configs['recommended-typescript'].rules,
50+
...reactX.configs["recommended-typescript"].rules,
5151
...reactDom.configs.recommended.rules,
5252
},
53-
})
53+
});
5454
```
Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1-
import js from '@eslint/js'
2-
import globals from 'globals'
3-
import reactHooks from 'eslint-plugin-react-hooks'
4-
import reactRefresh from 'eslint-plugin-react-refresh'
5-
import tseslint from 'typescript-eslint'
1+
import js from "@eslint/js";
2+
import globals from "globals";
3+
import reactHooks from "eslint-plugin-react-hooks";
4+
import reactRefresh from "eslint-plugin-react-refresh";
5+
import tseslint from "typescript-eslint";
66

77
export default tseslint.config(
8-
{ ignores: ['dist'] },
8+
{ ignores: ["dist"] },
99
{
1010
extends: [js.configs.recommended, ...tseslint.configs.recommended],
11-
files: ['**/*.{ts,tsx}'],
11+
files: ["**/*.{ts,tsx}"],
1212
languageOptions: {
1313
ecmaVersion: 2020,
1414
globals: globals.browser,
1515
},
1616
plugins: {
17-
'react-hooks': reactHooks,
18-
'react-refresh': reactRefresh,
17+
"react-hooks": reactHooks,
18+
"react-refresh": reactRefresh,
1919
},
2020
rules: {
2121
...reactHooks.configs.recommended.rules,
22-
'react-refresh/only-export-components': [
23-
'warn',
22+
"react-refresh/only-export-components": [
23+
"warn",
2424
{ allowConstantExport: true },
2525
],
2626
},
27-
},
28-
)
27+
}
28+
);

typescript/examples/vite_basic/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
"version": "0.0.0",
55
"type": "module",
66
"scripts": {
7-
"dev": "vite",
7+
"dev": "vite --clearScreen false",
88
"build": "tsc -b && vite build",
99
"lint": "eslint .",
1010
"preview": "vite preview",
1111
"preinstall": "npx only-allow pnpm"
1212
},
1313
"dependencies": {
14-
"@textcortex/jsondoc": "0.2.0-alpha.1",
14+
"@textcortex/jsondoc": "link:/Users/abrehamgezahegn/Documents/projects/textcortex/JSON-DOC/typescript",
1515
"react": "^19.1.0",
1616
"react-dom": "^19.1.0"
1717
},

0 commit comments

Comments
 (0)