Skip to content

Commit 4c6fe05

Browse files
committed
feat: harden PDF assets and add lint config
1 parent 48c0c18 commit 4c6fe05

File tree

12 files changed

+1254
-453
lines changed

12 files changed

+1254
-453
lines changed

.github/workflows/ci.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
jobs:
9+
build-test:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
- name: Setup Bun
15+
uses: oven-sh/setup-bun@v2
16+
with:
17+
bun-version: 1.3.0
18+
- name: Install dependencies
19+
run: bun install --frozen-lockfile
20+
- name: Lint
21+
run: bun run lint
22+
- name: Typecheck
23+
run: bun run typecheck
24+
- name: Test
25+
run: bun run test
26+
- name: Build
27+
run: bun run build

.prettierrc.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"semi": true,
3+
"trailingComma": "es5",
4+
"singleQuote": true,
5+
"printWidth": 100,
6+
"tabWidth": 2,
7+
"useTabs": false,
8+
"bracketSpacing": true,
9+
"arrowParens": "avoid",
10+
"endOfLine": "lf",
11+
"overrides": [
12+
{
13+
"files": "*.md",
14+
"options": {
15+
"printWidth": 80,
16+
"proseWrap": "always"
17+
}
18+
},
19+
{
20+
"files": "*.json",
21+
"options": {
22+
"printWidth": 120
23+
}
24+
}
25+
]
26+
}

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
- Custom themes & styling
3131
- Vector graphics support
3232
- Print-optimized layouts
33-
- **v1.2:** @table rendering
33+
- **v1.3:** @table export parity
3434

3535
</td>
3636
<td width="25%">
@@ -40,7 +40,7 @@
4040
- Rich text formatting
4141
- Tables with styling
4242
- Document metadata
43-
- **v1.2:** @table support
43+
- **v1.3:** @table export parity
4444

4545
</td>
4646
<td width="25%">
@@ -50,7 +50,7 @@
5050
- Automatic slide generation
5151
- Theme-based styling
5252
- Interactive layouts
53-
- **v1.2:** @table support
53+
- **v1.3:** @table export parity
5454

5555
</td>
5656
<td width="25%">
@@ -60,16 +60,16 @@
6060
- Formula evaluation
6161
- Multiple worksheets
6262
- Data type preservation
63-
- **v1.2:** @table support
63+
- **v1.3:** @table export parity
6464

6565
</td>
6666
</tr>
6767
</table>
6868

69-
### 🆕 v1.2 Features
70-
-**@table blocks** - Render markdown-style tables in all formats
71-
-**@include resolution** - Support for modular document composition
72-
-**Enhanced security** - Grade A+ validation and sanitization
69+
### 🆕 v1.3 Features
70+
-**@table export parity** - Tables render consistently across formats
71+
-**Blockquote styling** - Quotes match preview/export behavior
72+
-**Preview alignment** - Rendering parity across surfaces
7373

7474
---
7575

@@ -523,4 +523,4 @@ MIT License © 2025 [Alphin Tom](https://github.com/alpha912)
523523

524524
*Built with ❤️ for professional document workflows*
525525

526-
</div>
526+
</div>

bun.lock

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

eslint.config.mjs

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
// File: eslint.config.mjs
2+
// What: ESLint configuration for OmniScript converters
3+
// Why: Ensure consistent linting in CI and local development
4+
// Related: package.json scripts, tsconfig.json
5+
import js from '@eslint/js';
6+
import tseslint from '@typescript-eslint/eslint-plugin';
7+
import tsparser from '@typescript-eslint/parser';
8+
import prettier from 'eslint-plugin-prettier';
9+
10+
export default [
11+
{
12+
ignores: [
13+
'**/dist/**',
14+
'**/node_modules/**',
15+
'**/coverage/**',
16+
'**/*.config.*',
17+
'**/*.d.ts',
18+
'**/bin/**'
19+
],
20+
},
21+
js.configs.recommended,
22+
{
23+
files: ['**/*.ts', '**/*.js'],
24+
languageOptions: {
25+
parser: tsparser,
26+
parserOptions: {
27+
ecmaVersion: 2022,
28+
sourceType: 'module',
29+
},
30+
globals: {
31+
console: 'readonly',
32+
process: 'readonly',
33+
__dirname: 'readonly',
34+
__filename: 'readonly',
35+
Buffer: 'readonly',
36+
global: 'readonly',
37+
require: 'readonly',
38+
module: 'readonly',
39+
exports: 'readonly',
40+
setTimeout: 'readonly',
41+
clearTimeout: 'readonly',
42+
Blob: 'readonly',
43+
NodeJS: 'readonly',
44+
},
45+
},
46+
plugins: {
47+
'@typescript-eslint': tseslint,
48+
prettier,
49+
},
50+
rules: {
51+
'@typescript-eslint/no-unused-vars': 'warn',
52+
'@typescript-eslint/no-explicit-any': 'warn',
53+
'@typescript-eslint/explicit-function-return-type': 'off',
54+
'@typescript-eslint/no-non-null-assertion': 'warn',
55+
'prettier/prettier': 'error',
56+
'no-console': 'off',
57+
'prefer-const': 'warn',
58+
'no-var': 'error',
59+
'no-useless-escape': 'warn',
60+
'no-unused-vars': 'warn',
61+
},
62+
},
63+
{
64+
files: ['**/*.test.ts', '**/*.test.js'],
65+
rules: {
66+
'no-console': 'off',
67+
'@typescript-eslint/no-explicit-any': 'off',
68+
'@typescript-eslint/no-non-null-assertion': 'off',
69+
},
70+
},
71+
];

package.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,23 @@
3939
"prepublishOnly": "bun run build"
4040
},
4141
"dependencies": {
42+
"chart.js": "^4.4.0",
4243
"docx": "^9.5.1",
4344
"exceljs": "^4.4.0",
4445
"jszip": "^3.10.1",
46+
"mermaid": "^10.9.1",
4547
"omniscript-parser": "^1.3.0",
4648
"pptxgenjs": "^4.0.1",
4749
"puppeteer": "^24.25.0"
4850
},
4951
"devDependencies": {
52+
"@eslint/js": "^9.38.0",
53+
"@typescript-eslint/eslint-plugin": "^8.46.1",
54+
"@typescript-eslint/parser": "^8.46.1",
5055
"@types/node": "24.8.1",
5156
"eslint": "^9.37.0",
57+
"eslint-plugin-prettier": "^5.5.4",
58+
"prettier": "^3.5.3",
5259
"rimraf": "^6.0.1",
5360
"typescript": "^5.9.3",
5461
"vitest": "^4.0.16"

0 commit comments

Comments
 (0)