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:
1 parent
e7419cb4cb
commit
c17956031d
46 files changed
+4396
-1
No files matched your search
@@ -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:*'] },
|
||||
],
|
||||
},
|
||||
},
|
||||
)
|
||||
Reference in new issue
Block a user