From 29c564380d0e9833c17bc19073013f2a555d51f5 Mon Sep 17 00:00:00 2001 From: Alexander Date: Mon, 11 Dec 2023 21:46:45 +0100 Subject: [PATCH] feat(infra): Adds pre-comit setup and conventional commit message enforment Adds git-hooks for pre-commit package and configuration for repository checks and commit messages --- .gitignore | 2 +- .pre-commit-config.yaml | 21 +++++++++++++++++++++ LICENSE.txt | 2 +- README.md | 2 +- on-site-vtt/lang/de.json | 2 +- on-site-vtt/lang/en.json | 2 +- on-site-vtt/module.json | 2 +- on-site-vtt/scripts/on-site-vtt.js | 2 +- on-site-vtt/styles/on-site-vtt.css | 2 +- 9 files changed, 29 insertions(+), 8 deletions(-) create mode 100644 .pre-commit-config.yaml diff --git a/.gitignore b/.gitignore index b1d1720..bdc9661 100644 --- a/.gitignore +++ b/.gitignore @@ -23,7 +23,7 @@ .LSOverride # Icon must end with two \r -Icon +Icon # Thumbnails ._* diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..2c79561 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,21 @@ +## See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v3.2.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + - id: check-added-large-files + - id: check-json + - id: check-byte-order-marker + - id: end-of-file-fixer + - id: mixed-line-ending + - id: detect-private-key +- repo: https://github.com/compilerla/conventional-pre-commit + rev: v3.0.0 + hooks: + - id: conventional-pre-commit + stages: [commit-msg] + args: [feat, fix, chore, test] diff --git a/LICENSE.txt b/LICENSE.txt index d3b47bc..b1ce4fd 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file +SOFTWARE. diff --git a/README.md b/README.md index a33dfe8..f881c04 100644 --- a/README.md +++ b/README.md @@ -1 +1 @@ -# On-Site VTT \ No newline at end of file +# On-Site VTT diff --git a/on-site-vtt/lang/de.json b/on-site-vtt/lang/de.json index 4da3442..faad5c1 100644 --- a/on-site-vtt/lang/de.json +++ b/on-site-vtt/lang/de.json @@ -1,4 +1,4 @@ { "on-site-vtt.title": "On-Site VTT", "on-site-vtt.rotate": "Ansicht drehen" -} \ No newline at end of file +} diff --git a/on-site-vtt/lang/en.json b/on-site-vtt/lang/en.json index f36600a..67cdf78 100644 --- a/on-site-vtt/lang/en.json +++ b/on-site-vtt/lang/en.json @@ -1,4 +1,4 @@ { "on-site-vtt.title": "On-Site VTT", "on-site-vtt.rotate": "Rotate view" -} \ No newline at end of file +} diff --git a/on-site-vtt/module.json b/on-site-vtt/module.json index 54e745a..f20922f 100644 --- a/on-site-vtt/module.json +++ b/on-site-vtt/module.json @@ -40,4 +40,4 @@ "esmodules": [ "./scripts/on-site-vtt.js" ] -} \ No newline at end of file +} diff --git a/on-site-vtt/scripts/on-site-vtt.js b/on-site-vtt/scripts/on-site-vtt.js index b16fa50..b0b0331 100644 --- a/on-site-vtt/scripts/on-site-vtt.js +++ b/on-site-vtt/scripts/on-site-vtt.js @@ -38,4 +38,4 @@ function rotateView() { } Hooks.on("init", init); -Hooks.on("ready", ready); \ No newline at end of file +Hooks.on("ready", ready); diff --git a/on-site-vtt/styles/on-site-vtt.css b/on-site-vtt/styles/on-site-vtt.css index dbe4e2d..8cacb5c 100644 --- a/on-site-vtt/styles/on-site-vtt.css +++ b/on-site-vtt/styles/on-site-vtt.css @@ -1,3 +1,3 @@ .nsvRotate { rotate: 180deg; -} \ No newline at end of file +}