Skip to content

Commit 229e57d

Browse files
author
Martin Rohrmeier
authored
chore(husky): improve pre commit checks (#338)
1 parent 4a247c6 commit 229e57d

17 files changed

+122
-111
lines changed

.github/dependabot.yml

+19-21
Original file line numberDiff line numberDiff line change
@@ -21,46 +21,44 @@
2121
version: 2
2222
updates:
2323
# NPM
24-
-
25-
package-ecosystem: "npm"
24+
- package-ecosystem: 'npm'
2625
directory: /
2726
labels:
28-
- "dependabot"
29-
- "dependencies"
27+
- 'dependabot'
28+
- 'dependencies'
3029
schedule:
31-
interval: "weekly"
30+
interval: 'weekly'
3231
# restrict to patch updates (due to the big amount of dependencies)
3332
ignore:
34-
- dependency-name: "*"
35-
update-types: ["version-update:semver-major", "version-update:semver-minor"]
33+
- dependency-name: '*'
34+
update-types:
35+
['version-update:semver-major', 'version-update:semver-minor']
3636
groups:
3737
production-dependencies:
38-
dependency-type: "production"
38+
dependency-type: 'production'
3939
development-dependencies:
40-
dependency-type: "development"
40+
dependency-type: 'development'
4141

4242
# Github Actions
43-
-
44-
package-ecosystem: "github-actions"
43+
- package-ecosystem: 'github-actions'
4544
directory: /
4645
labels:
47-
- "dependabot"
48-
- "github-actions"
46+
- 'dependabot'
47+
- 'github-actions'
4948
schedule:
50-
interval: "weekly"
49+
interval: 'weekly'
5150
groups:
5251
dependencies:
53-
dependency-type: "production"
52+
dependency-type: 'production'
5453

5554
# Docker
56-
-
57-
package-ecosystem: "docker"
55+
- package-ecosystem: 'docker'
5856
directory: ./.conf/
5957
labels:
60-
- "dependabot"
61-
- "docker"
58+
- 'dependabot'
59+
- 'docker'
6260
schedule:
63-
interval: "weekly"
61+
interval: 'weekly'
6462
groups:
6563
dependencies:
66-
dependency-type: "production"
64+
dependency-type: 'production'

.github/workflows/build.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ on:
2626
workflow_dispatch:
2727

2828
env:
29-
IMAGE_NAMESPACE: "tractusx"
30-
IMAGE_NAME: "portal-assets"
29+
IMAGE_NAMESPACE: 'tractusx'
30+
IMAGE_NAME: 'portal-assets'
3131
# variables needed for scripts/legal-notice.sh
32-
SERVER_URL: "${{ github.server_url }}"
33-
REPOSITORY: "${{ github.repository }}"
34-
REF_NAME: "${{ github.ref_name }}"
32+
SERVER_URL: '${{ github.server_url }}'
33+
REPOSITORY: '${{ github.repository }}'
34+
REF_NAME: '${{ github.ref_name }}'
3535

3636
jobs:
3737
build-and-push-image:
@@ -92,7 +92,7 @@ jobs:
9292
username: ${{ secrets.DOCKER_HUB_USER }}
9393
password: ${{ secrets.DOCKER_HUB_TOKEN }}
9494
repository: ${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }}
95-
readme-filepath: ".conf/notice-assets.md"
95+
readme-filepath: '.conf/notice-assets.md'
9696

9797
auth-and-dispatch:
9898
needs: build-and-push-image

.github/workflows/checks.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ jobs:
3535
- name: Install Dependencies
3636
run: yarn
3737

38-
- name: Execute linter checks
38+
- name: Prettier checks
39+
run: yarn pretty:check
40+
41+
- name: Linter checks
3942
run: yarn lint
4043

4144
- name: Build Application

.github/workflows/codeql.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
# supported CodeQL languages.
3030
#
3131

32-
name: "CodeQL"
32+
name: 'CodeQL'
3333

3434
on:
3535
push:
@@ -42,7 +42,7 @@ on:
4242
- 'src/**'
4343
- 'public/**'
4444
schedule:
45-
- cron: "0 0 * * *"
45+
- cron: '0 0 * * *'
4646
workflow_dispatch:
4747

4848
jobs:
@@ -63,7 +63,7 @@ jobs:
6363
strategy:
6464
fail-fast: false
6565
matrix:
66-
language: ["javascript"]
66+
language: ['javascript']
6767
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ]
6868
# Use only 'java' to analyze code written in Java, Kotlin or both
6969
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
@@ -104,4 +104,4 @@ jobs:
104104
- name: Perform CodeQL Analysis
105105
uses: github/codeql-action/analyze@9fdb3e49720b44c48891d036bb502feb25684276 # v2.227
106106
with:
107-
category: "/language:${{matrix.language}}"
107+
category: '/language:${{matrix.language}}'

.github/workflows/dependencies.yaml

+1-3
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,16 @@ name: Check Dependencies
2121

2222
on:
2323
push:
24-
branches: [ main ]
24+
branches: [main]
2525
pull_request:
2626
types: [opened, synchronize, reopened]
2727
workflow_dispatch:
2828

2929
jobs:
3030
check-dependencies:
31-
3231
runs-on: ubuntu-latest
3332

3433
steps:
35-
3634
- name: Set up JDK 17
3735
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
3836
with:

.github/workflows/kics.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@
1717
# SPDX-License-Identifier: Apache-2.0
1818
###############################################################
1919

20-
name: "KICS"
20+
name: 'KICS'
2121

2222
on:
2323
push:
24-
branches: [ main ]
24+
branches: [main]
2525
# pull_request:
2626
# The branches below must be a subset of the branches above
2727
# branches: [main, master]
2828
# paths-ignore:
2929
# - "**/*.md"
3030
# - "**/*.txt"
3131
schedule:
32-
- cron: "0 0 * * *"
32+
- cron: '0 0 * * *'
3333
workflow_dispatch:
3434

3535
jobs:
@@ -48,7 +48,7 @@ jobs:
4848
uses: checkmarx/kics-github-action@d1b692d84c536f4e8696954ce7aab6818f95f5bc # v2.0.0
4949
with:
5050
# Scanning directory .
51-
path: "."
51+
path: '.'
5252
# Fail on HIGH severity results
5353
fail_on: high
5454
# when provided with a directory on output_path
@@ -57,7 +57,7 @@ jobs:
5757
# - results-dir/results.json
5858
# - results-dir/results.sarif
5959
output_path: kicsResults/
60-
output_formats: "json,sarif"
60+
output_formats: 'json,sarif'
6161
# If you want KICS to ignore the results and return exit status code 0 unless a KICS engine error happens
6262
# ignore_on_exit: results
6363
# GITHUB_TOKEN enables this github action to access github API and post comments in a pull request

.github/workflows/pullRequest-lint.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# SPDX-License-Identifier: Apache-2.0
1818
# #############################################################################
1919

20-
name: "Lint PullRequest"
20+
name: 'Lint PullRequest'
2121

2222
on:
2323
pull_request_target:
@@ -44,11 +44,11 @@ jobs:
4444
header: pr-title-lint-error
4545
message: |
4646
Hey there and thank you for opening this pull request! 👋🏼
47-
47+
4848
We require pull request titles to follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) and it looks like your proposed title needs to be adjusted.
4949
5050
Details:
51-
51+
5252
```
5353
${{ steps.lint_pr_title.outputs.error_message }}
5454
```

.github/workflows/release-release_candidate.yml

+10-9
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ on:
2626
workflow_dispatch:
2727

2828
env:
29-
IMAGE_NAMESPACE: "tractusx"
30-
IMAGE_NAME: "portal-assets"
31-
REF_NAME: "${{ github.ref_name }}"
29+
IMAGE_NAMESPACE: 'tractusx'
30+
IMAGE_NAME: 'portal-assets'
31+
REF_NAME: '${{ github.ref_name }}'
3232
# variables needed for scripts/legal-notice.sh
33-
SERVER_URL: "${{ github.server_url }}"
34-
REPOSITORY: "${{ github.repository }}"
33+
SERVER_URL: '${{ github.server_url }}'
34+
REPOSITORY: '${{ github.repository }}'
3535

3636
jobs:
3737
build-and-push-release:
@@ -88,9 +88,10 @@ jobs:
8888
id: meta
8989
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
9090
with:
91-
images: ${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }}
92-
# Automatically prepare image tags;
93-
# semver patter will generate tags like these for example :v1 :v1.2 v1.2.3
91+
images:
92+
${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }}
93+
# Automatically prepare image tags;
94+
# semver patter will generate tags like these for example :v1 :v1.2 v1.2.3
9495
tags: |
9596
type=raw,value=latest
9697
type=raw,value=${{ env.REF_NAME }}
@@ -116,7 +117,7 @@ jobs:
116117
username: ${{ secrets.DOCKER_HUB_USER }}
117118
password: ${{ secrets.DOCKER_HUB_TOKEN }}
118119
repository: ${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }}
119-
readme-filepath: ".conf/notice-assets.md"
120+
readme-filepath: '.conf/notice-assets.md'
120121

121122
auth-and-dispatch:
122123
needs: build-and-push-release

.github/workflows/release.yml

+10-9
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ on:
2727
workflow_dispatch:
2828

2929
env:
30-
IMAGE_NAMESPACE: "tractusx"
31-
IMAGE_NAME: "portal-assets"
32-
REF_NAME: "${{ github.ref_name }}"
30+
IMAGE_NAMESPACE: 'tractusx'
31+
IMAGE_NAME: 'portal-assets'
32+
REF_NAME: '${{ github.ref_name }}'
3333
# variables needed for scripts/legal-notice.sh
34-
SERVER_URL: "${{ github.server_url }}"
35-
REPOSITORY: "${{ github.repository }}"
34+
SERVER_URL: '${{ github.server_url }}'
35+
REPOSITORY: '${{ github.repository }}'
3636

3737
jobs:
3838
build-and-push-release:
@@ -89,9 +89,10 @@ jobs:
8989
id: meta
9090
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
9191
with:
92-
images: ${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }}
93-
# Automatically prepare image tags;
94-
# semver patter will generate tags like these for example :v1 :v1.2 v1.2.3
92+
images:
93+
${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }}
94+
# Automatically prepare image tags;
95+
# semver patter will generate tags like these for example :v1 :v1.2 v1.2.3
9596
tags: |
9697
type=raw,value=latest
9798
type=raw,value=${{ env.REF_NAME }}
@@ -117,7 +118,7 @@ jobs:
117118
username: ${{ secrets.DOCKER_HUB_USER }}
118119
password: ${{ secrets.DOCKER_HUB_TOKEN }}
119120
repository: ${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }}
120-
readme-filepath: ".conf/notice-assets.md"
121+
readme-filepath: '.conf/notice-assets.md'
121122

122123
auth-and-dispatch:
123124
needs: build-and-push-release

.github/workflows/release_candidate.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ on:
2626
workflow_dispatch:
2727

2828
env:
29-
IMAGE_NAMESPACE: "tractusx"
30-
IMAGE_NAME: "portal-assets"
29+
IMAGE_NAMESPACE: 'tractusx'
30+
IMAGE_NAME: 'portal-assets'
3131
# variables needed for scripts/legal-notice.sh
32-
SERVER_URL: "${{ github.server_url }}"
33-
REPOSITORY: "${{ github.repository }}"
34-
REF_NAME: "${{ github.ref_name }}"
32+
SERVER_URL: '${{ github.server_url }}'
33+
REPOSITORY: '${{ github.repository }}'
34+
REF_NAME: '${{ github.ref_name }}'
3535

3636
jobs:
3737
build-and-push-image:
@@ -92,7 +92,7 @@ jobs:
9292
username: ${{ secrets.DOCKER_HUB_USER }}
9393
password: ${{ secrets.DOCKER_HUB_TOKEN }}
9494
repository: ${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }}
95-
readme-filepath: ".conf/notice-assets.md"
95+
readme-filepath: '.conf/notice-assets.md'
9696

9797
auth-and-dispatch:
9898
needs: build-and-push-image

0 commit comments

Comments
 (0)