feat(pdf): @faunosteo/pdf engine — explicit inputs, envelope v1 attachment, layered reader, xmldom composition, allowlist SVG sanitiser, WinAnsi guard, rasterizer adapter; goldens reproduced

This commit is contained in:
bchanot committed 2026-10-11 13:09:17 +02:00
1 parent e7419cb4cb
commit c17956031d
46 files changed
+4396 -1

No files matched your search

+48
View File
@@ -0,0 +1,48 @@
import globals from 'globals'
import tseslint from 'typescript-eslint'
/**
* The engine must run without a browser and without Node-only APIs
* (STEP6 §3.3): the restricted globals and imports apply to `src/**` only,
* tests may read fixtures with node:fs.
*/
const BROWSER_OR_NODE_GLOBALS = [
'fetch',
'window',
'document',
'Image',
'DOMParser',
'XMLSerializer',
'navigator',
'Buffer',
'process',
'require',
]
export default tseslint.config(
{ ignores: ['node_modules/**'] },
{
files: ['**/*.ts'],
extends: [...tseslint.configs.recommended],
languageOptions: {
globals: { ...globals.node, ...globals.es2022 },
},
rules: {
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_' },
],
},
},
{
files: ['src/**/*.ts'],
rules: {
'no-restricted-globals': ['error', ...BROWSER_OR_NODE_GLOBALS],
'no-restricted-imports': [
'error',
{ patterns: ['@/*', 'react*', 'node:*'] },
],
},
},
)