CI: Add `svgo` pre-commit hook
This commit is contained in:
parent
04bf7d4cad
commit
4af1068688
|
@ -21,3 +21,6 @@ indent_size = 4
|
||||||
[*.{yml,yaml}]
|
[*.{yml,yaml}]
|
||||||
indent_style = space
|
indent_style = space
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
|
|
||||||
|
[*.svg]
|
||||||
|
insert_final_newline = false
|
||||||
|
|
|
@ -118,6 +118,14 @@ repos:
|
||||||
pass_filenames: false
|
pass_filenames: false
|
||||||
additional_dependencies: ['jsdoc@^4.0.3']
|
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
|
- id: copyright-headers
|
||||||
name: copyright-headers
|
name: copyright-headers
|
||||||
language: python
|
language: python
|
||||||
|
|
|
@ -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",
|
||||||
|
],
|
||||||
|
};
|
Loading…
Reference in New Issue