From daca1c03ea7961dbbfd8d314bcae3ed6fad2d5e5 Mon Sep 17 00:00:00 2001 From: DogmaDragon <103123951+DogmaDragon@users.noreply.github.com> Date: Tue, 11 Feb 2025 01:59:29 +0200 Subject: [PATCH] Remove code formatting workflows and related configuration files (#504) --- .github/workflows/on_pr_check_code_format.yml | 51 ------------------- .../workflows/on_push_check_code_format.yml | 49 ------------------ .prettierignore | 12 ----- .prettierrc.json | 3 -- README.md | 28 +--------- package.json | 9 +--- requirements.txt | 1 - yarn.lock | 8 --- 8 files changed, 2 insertions(+), 159 deletions(-) delete mode 100644 .github/workflows/on_pr_check_code_format.yml delete mode 100644 .github/workflows/on_push_check_code_format.yml delete mode 100644 .prettierignore delete mode 100644 .prettierrc.json delete mode 100644 requirements.txt delete mode 100644 yarn.lock diff --git a/.github/workflows/on_pr_check_code_format.yml b/.github/workflows/on_pr_check_code_format.yml deleted file mode 100644 index 1aac93c..0000000 --- a/.github/workflows/on_pr_check_code_format.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: Check Code Format - -on: - pull_request: - branches: - - main - - workflow_dispatch: - -permissions: - contents: write - -jobs: - check_js_code_format: - name: Check JS code format - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - fetch-depth: 0 - ref: ${{ github.event.pull_request.head.ref }} - repository: ${{ github.event.pull_request.head.repo.full_name }} - - - name: Check format - uses: creyD/prettier_action@v4.3 - with: - prettier_options: --check . - dry: true - only_changed: true - github_token: ${{ secrets.GITHUB_TOKEN }} - - check_py_code_format: - name: Check PY code format - runs-on: ubuntu-latest - needs: check_js_code_format - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - fetch-depth: 0 - ref: ${{ github.event.pull_request.head.ref }} - repository: ${{ github.event.pull_request.head.repo.full_name }} - - - name: Check format - uses: psf/black@stable - with: - options: '--exclude="3rd party"' - src: "." diff --git a/.github/workflows/on_push_check_code_format.yml b/.github/workflows/on_push_check_code_format.yml deleted file mode 100644 index f934b6c..0000000 --- a/.github/workflows/on_push_check_code_format.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: Check Code Format - -on: - push: - branches: - - main - - workflow_dispatch: - -permissions: - contents: write - -jobs: - check_js_code_format: - name: Check JS code format - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - fetch-depth: 0 - ref: ${{ github.head_ref }} - - - name: Check format - uses: creyD/prettier_action@v4.3 - with: - prettier_options: --check . - dry: true - only_changed: true - github_token: ${{ secrets.GITHUB_TOKEN }} - - check_py_code_format: - name: Check PY code format - runs-on: ubuntu-latest - needs: check_js_code_format - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - fetch-depth: 0 - ref: ${{ github.head_ref }} - - - name: Check format - uses: psf/black@stable - with: - options: '--exclude="3rd party"' - src: "." diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index 08d0e44..0000000 --- a/.prettierignore +++ /dev/null @@ -1,12 +0,0 @@ -*.md - -# dependencies -node_modules -yarn.lock - -# production -dist - -# 3rd party -# https://github.com/killhellokitty/stash-material-ize-theme/blob/main/stash-theme.css -plugins/themeSwitch/assets/themes/materialize diff --git a/.prettierrc.json b/.prettierrc.json deleted file mode 100644 index 757fd64..0000000 --- a/.prettierrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "trailingComma": "es5" -} diff --git a/README.md b/README.md index 68bef78..67b2586 100644 --- a/README.md +++ b/README.md @@ -78,33 +78,7 @@ To install/run a script follow the install instructions listed in individual REA ## Contributing -### Formatting - -Formatting is enforced on all files. Follow this setup guide: - -1. **[Yarn](https://yarnpkg.com/en/docs/install)** and **its dependencies** must be installed to run the formatting tools. - ```sh - yarn install --frozen-lockfile - ``` - -2. **Python dependencies** must also be installed to format `py` files. - ```sh - pip install -r requirements.txt - ``` - -#### Formatting non-`py` files - -```sh -yarn run format -``` - -#### Formatting `py` files - -`py` files are formatted using [`black`](https://pypi.org/project/black/). - -```sh -yarn run format-py -``` +Submit a PR to add your plugin, theme, userscript and other utility script to the repository. ## Deprecation diff --git a/package.json b/package.json index 1691a6b..9a4308d 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,5 @@ { "name": "community-scripts", "description": "This repository contains plugin and utility scripts created by the Stash community and hosted on the official GitHub repo.", - "license": "AGPL-3.0-only", - "scripts": { - "format": "prettier --write .", - "format-py": "black --exclude=\"3rd party\" ." - }, - "devDependencies": { - "prettier": "^3.2.5" - } + "license": "AGPL-3.0-only" } diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 05a538a..0000000 --- a/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -black>=24.1.1 \ No newline at end of file diff --git a/yarn.lock b/yarn.lock deleted file mode 100644 index e8e07c4..0000000 --- a/yarn.lock +++ /dev/null @@ -1,8 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -prettier@^3.2.5: - version "3.2.5" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.2.5.tgz#e52bc3090586e824964a8813b09aba6233b28368" - integrity sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==