Files
FreshRSS/package.json
T
InverleandAlexandre Alapetite 0285dc8970 Check SVG optimization in the tests CI workflow with SVGO (#9361)
* Check SVG optimization in the tests CI workflow with SVGO

Previously it was only recommended by the documentation that SVG images should be optimized using [SVGOMG](https://github.com/jakearchibald/svgomg), the web GUI version of https://github.com/svg/svgo (CLI)


Now all SVG images are optimized, and optimization is mandatory enforced by the tests CI workflow.
\+ SVGs are sanitized of potentially malicious JS code using the https://svgo.dev/docs/plugins/removeScripts/ plugin

* Output prettified SVGs instead and remove unchanged files from stdout

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>

* Use `removeScripts` SVGO plugin to reduce risk of malicious SVGs

* Move the CLI options to the JS config instead

* Disable `removeComments` plugin included in the default preset

* editorconfig, and easier config

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2026-09-29 16:18:01 +02:00

72 lines
1.8 KiB
JSON

{
"name": "freshrss",
"type": "module",
"description": "A free, self-hostable aggregator",
"homepage": "https://freshrss.org/",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/FreshRSS/FreshRSS/issues"
},
"keywords": [
"news",
"aggregator",
"RSS",
"Atom",
"WebSub"
],
"repository": {
"type": "git",
"url": "https://github.com/FreshRSS/FreshRSS.git"
},
"license": "AGPL-3.0",
"engines": {
"node": ">=20"
},
"scripts": {
"eslint": "eslint .",
"eslint_fix": "eslint --fix .",
"markdownlint": "markdownlint-cli2",
"markdownlint_fix": "markdownlint-cli2 --fix",
"rtlcss": "rtlcss -d p/themes/ && find p/themes/ -type f -name '*.rtl.rtl.css' -delete",
"svgo": "find p/ docs/ -name '*.svg' -exec svgo {} + | awk '/:$/{name=$0;next} /KiB/ && !/ - 0% /{print name; print}'",
"stylelint": "stylelint '**/*.css'",
"stylelint_fix": "stylelint --fix '**/*.css'",
"test": "npm run eslint && npm run stylelint && npm run markdownlint",
"fix": "npm run eslint_fix && npm run stylelint_fix && npm run rtlcss && npm run markdownlint_fix && npm run svgo"
},
"devDependencies": {
"@eslint/js": "^10.0.1",
"@stylistic/stylelint-plugin": "^5.3.0",
"eslint": "^10.10.0",
"globals": "^17.12.0",
"markdownlint-cli2": "^0.23.2",
"neostandard": "^0.14.0-next.1",
"rtlcss": "^4.3.0",
"stylelint": "^17.15.0",
"stylelint-config-recommended": "^18.0.0",
"stylelint-order": "^8.1.1",
"svgo": "^4.1.0"
},
"rtlcssConfig": {
"options": {
"processUrls": {
"atrule": true,
"decl": false
},
"stringMap": [
{
"name": "import-rtl",
"priority": 10,
"exclusive": true,
"search": ".css",
"replace": ".rtl.css",
"options": {
"scope": "url",
"ignoreCase": false
}
}
]
}
}
}