CI: Add svgo pre-commit hook

This commit is contained in:
Thaddeus Crews 2024-06-04 09:49:56 -05:00
parent 04bf7d4cad
commit 4af1068688
No known key found for this signature in database
GPG key ID: 62181B86FE9E5D84
3 changed files with 31 additions and 0 deletions

View file

@ -21,3 +21,6 @@ indent_size = 4
[*.{yml,yaml}]
indent_style = space
indent_size = 2
[*.svg]
insert_final_newline = false

View file

@ -118,6 +118,14 @@ repos:
pass_filenames: false
additional_dependencies: ['jsdoc@^4.0.3']
- id: svgo
name: svgo
language: node
entry: svgo
files: \.svg$
args: [--quiet, --config, misc/utility/svgo.config.mjs]
additional_dependencies: ["svgo@3.3.2"]
- id: copyright-headers
name: copyright-headers
language: python

View file

@ -0,0 +1,20 @@
export default {
multipass: true,
precision: 2,
plugins: [
{
name: "preset-default",
params: {
overrides: {
removeHiddenElems: false,
convertPathData: false,
},
},
},
"convertStyleToAttrs",
"removeScriptElement",
"removeStyleElement",
"reusePaths",
"sortAttrs",
],
};