mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-10-28 05:58:40 -04:00
* 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>
24 lines
464 B
JavaScript
24 lines
464 B
JavaScript
export default {
|
|
js2svg: {
|
|
indent: '\t',
|
|
pretty: true,
|
|
eol: 'lf',
|
|
finalNewline: true,
|
|
},
|
|
multipass: true,
|
|
plugins: [ // https://svgo.dev/docs/plugins/
|
|
{
|
|
name: 'preset-default', // Built-in plugins enabled by default: https://svgo.dev/docs/preset-default/#plugins-list
|
|
params: {
|
|
overrides: {
|
|
// Disable selected plugins from the default preset
|
|
removeComments: false,
|
|
},
|
|
},
|
|
},
|
|
|
|
// Extra plugins
|
|
'removeScripts',
|
|
],
|
|
};
|