From abe04e142a60a6767fee0ef5c561bd73957b5366 Mon Sep 17 00:00:00 2001 From: Ludy87 Date: Mon, 14 Jul 2025 20:25:08 +0200 Subject: [PATCH] more stuff --- .github/labeler-config.yml | 86 ------------------------------ .github/workflows/auto-labeler.yml | 27 ---------- devGuide/STYLELINT.md | 10 ++-- devTools/.stylelintrc.json | 10 ++-- devTools/package.json | 4 +- 5 files changed, 12 insertions(+), 125 deletions(-) delete mode 100644 .github/labeler-config.yml delete mode 100644 .github/workflows/auto-labeler.yml diff --git a/.github/labeler-config.yml b/.github/labeler-config.yml deleted file mode 100644 index d1a340065..000000000 --- a/.github/labeler-config.yml +++ /dev/null @@ -1,86 +0,0 @@ -Translation: - - changed-files: - - any-glob-to-any-file: 'stirling-pdf/src/main/resources/messages_*_*.properties' - - any-glob-to-any-file: 'scripts/ignore_translation.toml' - - any-glob-to-any-file: 'stirling-pdf/src/main/resources/templates/fragments/languages.html' - -Front End: - - changed-files: - - any-glob-to-any-file: 'stirling-pdf/src/main/resources/templates/**/*' - - any-glob-to-any-file: 'stirling-pdf/src/main/resources/static/**/*' - - any-glob-to-any-file: 'stirling-pdf/src/main/java/stirling/software/SPDF/controller/web/**' - - any-glob-to-any-file: 'stirling-pdf/src/main/java/stirling/software/SPDF/UI/**/*' - -Java: - - changed-files: - - any-glob-to-any-file: 'common/src/main/java/**/*.java' - - any-glob-to-any-file: 'proprietary/src/main/java/**/*.java' - - any-glob-to-any-file: 'stirling-pdf/src/main/java/**/*.java' - -Back End: - - changed-files: - - any-glob-to-any-file: 'stirling-pdf/src/main/java/stirling/software/SPDF/config/**/*' - - any-glob-to-any-file: 'stirling-pdf/src/main/java/stirling/software/SPDF/controller/**/*' - - any-glob-to-any-file: 'stirling-pdf/src/main/resources/settings.yml.template' - - any-glob-to-any-file: 'stirling-pdf/src/main/resources/application.properties' - - any-glob-to-any-file: 'stirling-pdf/src/main/resources/banner.txt' - - any-glob-to-any-file: 'scripts/png_to_webp.py' - - any-glob-to-any-file: 'split_photos.py' - -Security: - - changed-files: - - any-glob-to-any-file: 'proprietary/src/main/java/stirling/software/proprietary/security/**/*' - - any-glob-to-any-file: 'scripts/download-security-jar.sh' - - any-glob-to-any-file: '.github/workflows/dependency-review.yml' - - any-glob-to-any-file: '.github/workflows/scorecards.yml' - -API: - - changed-files: - - any-glob-to-any-file: 'stirling-pdf/src/main/java/stirling/software/SPDF/config/OpenApiConfig.java' - - any-glob-to-any-file: 'stirling-pdf/src/main/java/stirling/software/SPDF/controller/web/MetricsController.java' - - any-glob-to-any-file: 'stirling-pdf/src/main/java/stirling/software/SPDF/controller/api/**/*' - - any-glob-to-any-file: 'stirling-pdf/src/main/java/stirling/software/SPDF/model/api/**/*' - - any-glob-to-any-file: 'scripts/png_to_webp.py' - - any-glob-to-any-file: 'split_photos.py' - - any-glob-to-any-file: '.github/workflows/swagger.yml' - -Documentation: - - changed-files: - - any-glob-to-any-file: '**/*.md' - - any-glob-to-any-file: 'scripts/counter_translation.py' - - any-glob-to-any-file: 'scripts/ignore_translation.toml' - -Docker: - - changed-files: - - any-glob-to-any-file: '.github/workflows/build.yml' - - any-glob-to-any-file: '.github/workflows/push-docker.yml' - - any-glob-to-any-file: 'Dockerfile' - - any-glob-to-any-file: 'Dockerfile.fat' - - any-glob-to-any-file: 'Dockerfile.ultra-lite' - - any-glob-to-any-file: 'exampleYmlFiles/*.yml' - - any-glob-to-any-file: 'scripts/download-security-jar.sh' - - any-glob-to-any-file: 'scripts/init.sh' - - any-glob-to-any-file: 'scripts/init-without-ocr.sh' - - any-glob-to-any-file: 'scripts/installFonts.sh' - - any-glob-to-any-file: 'test.sh' - - any-glob-to-any-file: 'test2.sh' - -Devtools: - - changed-files: - - any-glob-to-any-file: '.devcontainer/**/*' - - any-glob-to-any-file: 'Dockerfile.dev' - -Test: - - changed-files: - - any-glob-to-any-file: 'cucumber/**/*' - - any-glob-to-any-file: 'common/src/test/**/*' - - any-glob-to-any-file: 'proprietary/src/test/**/*' - - any-glob-to-any-file: 'stirling-pdf/src/test/**/*' - - any-glob-to-any-file: 'src/testing/**/*' - - any-glob-to-any-file: '.pre-commit-config' - - any-glob-to-any-file: '.github/workflows/pre_commit.yml' - - any-glob-to-any-file: '.github/workflows/scorecards.yml' - -Github: - - changed-files: - - any-glob-to-any-file: '.github/**/*' diff --git a/.github/workflows/auto-labeler.yml b/.github/workflows/auto-labeler.yml deleted file mode 100644 index f1d7d730c..000000000 --- a/.github/workflows/auto-labeler.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: "Pull Request Labeler" -on: - pull_request_target: - types: [opened, synchronize] - -permissions: - contents: read - -jobs: - labeler: - runs-on: ubuntu-latest - permissions: - pull-requests: write - steps: - - name: Harden Runner - uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2 - with: - egress-policy: audit - - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - - name: Apply Labels - uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5.0.0 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - configuration-path: .github/labeler-config.yml - sync-labels: true diff --git a/devGuide/STYLELINT.md b/devGuide/STYLELINT.md index 27bc4da4d..04ddc407a 100644 --- a/devGuide/STYLELINT.md +++ b/devGuide/STYLELINT.md @@ -17,8 +17,8 @@ Apply Stylelint to your project's CSS with the following steps: ```jsonc { "scripts": { - "lint:css:check": "stylelint \"../stirling-pdf/src/main/**/*.css\" \"../proprietary/src/main/resources/static/css/*.css\" --config .stylelintrc.json", - "lint:css:fix": "stylelint \"../stirling-pdf/src/main/**/*.css\" \"../proprietary/src/main/resources/static/css/*.css\" --config .stylelintrc.json --fix" + "lint:css:check": "stylelint \"../app/core/src/main/**/*.css\" \"../app/proprietary/src/main/resources/static/css/*.css\" --config ../.stylelintrc.json", + "lint:css:fix": "stylelint \"../app/core//src/main/**/*.css\" \"../app/proprietary/src/main/resources/static/css/*.css\" --config .stylelintrc.json --fix" } } ``` @@ -32,15 +32,15 @@ Apply Stylelint to your project's CSS with the following steps: - Lint all CSS files: ```bash - npx stylelint ../stirling-pdf/src/main/**/*.css ../proprietary/src/main/resources/static/css/*.css + npx stylelint ../app/core/src/main/**/*.css ../app/proprietary/src/main/resources/static/css/*.css ``` - Lint a single file: ```bash - npx stylelint ../proprietary/src/main/resources/static/css/audit-dashboard.css + npx stylelint ../app/proprietary/src/main/resources/static/css/audit-dashboard.css ``` - Apply automatic fixes: ```bash - npx stylelint "../stirling-pdf/src/main/**/*.css" "../proprietary/src/main/resources/static/css/*.css" --fix + npx stylelint "../app/core/src/main/**/*.css" "../app/proprietary/src/main/resources/static/css/*.css" --fix ``` For full configuration options and rule customization, refer to the official documentation: [https://stylelint.io](https://stylelint.io) diff --git a/devTools/.stylelintrc.json b/devTools/.stylelintrc.json index d676c0159..4e7e07111 100644 --- a/devTools/.stylelintrc.json +++ b/devTools/.stylelintrc.json @@ -6,11 +6,11 @@ "@stylistic/stylelint-plugin" ], "ignoreFiles": [ - "stirling-pdf/src/main/resources/static/css/bootstrap*.css", - "stirling-pdf/src/main/resources/static/css/cookieconsent.css", - "stirling-pdf/src/main/resources/static/css/cookieconsentCustomisation.css", - "stirling-pdf/src/main/resources/static/css/prism.css", - "stirling-pdf/src/main/resources/static/pdfjs-legacy/**/*.css" + "app/core/src/main/resources/static/css/bootstrap*.css", + "app/core/src/main/resources/static/css/cookieconsent.css", + "app/core/src/main/resources/static/css/cookieconsentCustomisation.css", + "app/core/src/main/resources/static/css/prism.css", + "app/core/src/main/resources/static/pdfjs-legacy/**/*.css" ], "rules": { "property-no-vendor-prefix": null, diff --git a/devTools/package.json b/devTools/package.json index e58ed4df0..334dd08ac 100644 --- a/devTools/package.json +++ b/devTools/package.json @@ -2,8 +2,8 @@ "name": "stirling-pdf", "version": "1.0.0", "scripts": { - "lint:css:check": "stylelint \"../stirling-pdf/src/main/**/*.css\" \"../proprietary/src/main/resources/static/css/*.css\" --config .stylelintrc.json", - "lint:css:fix": "stylelint \"../stirling-pdf/src/main/**/*.css\" \"../proprietary/src/main/resources/static/css/*.css\" --config .stylelintrc.json --fix" + "lint:css:check": "stylelint \"../app/core/src/main/**/*.css\" \"../app/proprietary/src/main/resources/static/css/*.css\" --config .stylelintrc.json", + "lint:css:fix": "stylelint \"../app/core/src/main/**/*.css\" \"../app/proprietary/src/main/resources/static/css/*.css\" --config .stylelintrc.json --fix" }, "devDependencies": { "@stylistic/stylelint-plugin": "^3.1.3",