Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions .eslintrc.js

This file was deleted.

41 changes: 33 additions & 8 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ on:
- reopened

jobs:
php-cs-fixer:
backend-lint:
name: Backend Lint
runs-on: ubuntu-latest

strategy:
Expand All @@ -30,12 +31,36 @@ jobs:
run: composer require --dev friendsofphp/php-cs-fixer

- name: Run php-cs-fixer
run: vendor/bin/php-cs-fixer fix
run: vendor/bin/php-cs-fixer fix --dry-run --diff

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
frontend-lint:
name: Frontend Lint
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
commit_message: "chore: fix code style"
commit_options: "--no-verify"
commit_user_name: "GitHub Actions"
commit_user_email: "github-actions[bot]@users.noreply.github.com"
version: 10.28.2
run_install: false

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "24"
cache: "pnpm"

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Run Biome lint
run: pnpm run lint

- name: Run Biome format check
run: pnpm run format

- name: Run TypeScript type check
run: pnpm run typecheck
20 changes: 8 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,17 @@ jobs:
with:
path: ${{ env.APP_NAME }}

- name: Read package.json node and npm engines version
uses: skjnldsv/read-package-engines-version-actions@v1.2
id: versions
- name: Set up node
uses: actions/setup-node@v4
with:
path: ./${{ env.APP_NAME }}/
fallbackNode: "^14"
fallbackNpm: "^7"
node-version: "24"
cache: "pnpm"
cache-dependency-path: ./${{ env.APP_NAME }}/pnpm-lock.yaml

- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@v3
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}

- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
version: 10.28.2

- name: Run build
run: |
Expand Down
22 changes: 21 additions & 1 deletion .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,19 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Copy staging deploy script
uses: appleboy/scp-action@master
with:
host: ${{ vars.STAGING_SERVER_HOST }}
username: ${{ vars.STAGING_SERVER_USER }}
key: ${{ secrets.STAGING_SSH_PRIVATE_KEY }}
proxy_host: ${{ vars.STAGING_PROXY_HOST }}
proxy_username: ${{ vars.STAGING_PROXY_USER }}
proxy_key: ${{ secrets.STAGING_PROXY_SSH_PRIVATE_KEY }}
source: "scripts/stage/deploy.sh"
target: "/tmp"
strip_components: 1

- name: Deploy
uses: appleboy/ssh-action@master
with:
Expand All @@ -22,4 +35,11 @@ jobs:
proxy_host: ${{ vars.STAGING_PROXY_HOST }}
proxy_username: ${{ vars.STAGING_PROXY_USER }}
proxy_key: ${{ secrets.STAGING_PROXY_SSH_PRIVATE_KEY }}
script: bash deploy
script: |
set -e
SCRIPT_PATH="/tmp/deploy.sh"
if [ ! -f "$SCRIPT_PATH" ]; then
SCRIPT_PATH="/tmp/scripts/stage/deploy.sh"
fi
chmod +x "$SCRIPT_PATH"
bash "$SCRIPT_PATH"
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
.env
/build
/dev-environment
js/nextcloud-swarm-plugin*.*
/css
/js
/.php-cs-fixer.cache

# Package Manages
Expand Down
4 changes: 0 additions & 4 deletions .phpactor.json

This file was deleted.

8 changes: 0 additions & 8 deletions .prettierignore

This file was deleted.

15 changes: 0 additions & 15 deletions .prettierrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"junstyle.php-cs-fixer",
"xdebug.php-debug",
"bmewburn.vscode-intelephense-client",
"esbenp.prettier-vscode"
"biomejs.biome"
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": []
Expand Down
6 changes: 5 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{
"editor.formatOnSave": true
"editor.formatOnSave": true,
"search.exclude": {
"**/dev-environment": true,
"**/vendor": true
}
}
75 changes: 33 additions & 42 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ cert_directory=$(HOME)/.nextcloud/certificates

all: dev-setup lint build-js-production

release: composer npm-init build-js-production build-tarball
release: composer pnpm-init build-js-production build-tarball

appstore: composer npm-init build-js-production build-appstore-tarball
appstore: composer pnpm-init build-js-production build-appstore-tarball

dev-setup: clean-dev composer npm-init
dev-setup: clean-dev composer pnpm-init

lint: eslint stylelint prettier php-cs
lint: lint-js-check format-check typecheck php-cs

lint-fix: eslint-fix stylelint-fix prettier-fix php-cs-fix
lint-fix: lint-js-fix format-fix php-cs-fix

# Dependencies
composer:
Expand All @@ -27,45 +27,40 @@ composer:
composer-update:
composer update --prefer-dist

npm-init:
npm ci
pnpm-init:
pnpm install --frozen-lockfile

npm-update:
npm update
pnpm-update:
pnpm update

# Building
build-js:
npm run dev
pnpm run dev

build-js-production:
npm run build
pnpm run build

watch-js:
npm run watch
pnpm run dev

serve-js:
npm run serve
pnpm run serve

# Linting
eslint:
npm run eslint
lint-js-check:
pnpm run lint

eslint-fix:
npm run eslint:fix
lint-js-fix:
pnpm run lint:fix

# Style linting
stylelint:
npm run stylelint
format-check:
pnpm run format

stylelint-fix:
npm run stylelint:fix
format-fix:
pnpm run format:fix

# Prettier
prettier:
npm run prettier

prettier-fix:
npm run prettier:fix
typecheck:
pnpm run typecheck

# PHP CS Fixer
php-cs:
Expand All @@ -92,23 +87,21 @@ build-tarball:
--exclude="docker" \
--exclude="node_modules" \
--exclude="./src" \
--exclude="styles" \
--exclude="./vendor" \
--exclude="biome.json" \
--exclude=".editorconfig" \
--exclude=".eslintrc.js" \
--exclude=".gitignore" \
--exclude=".php_cs.cache" \
--exclude=".php-cs-fixer.dist.php" \
--exclude=".prettierignore" \
--exclude=".prettierrc.json" \
--exclude="babel.config.js" \
--exclude="composer.json" \
--exclude="composer.lock" \
--exclude="docker-compose.yml" \
--exclude="tsconfig.json" \
--exclude="Makefile" \
--exclude="package-lock.json" \
--exclude="package.json" \
--exclude="stylelint.config.js" \
--exclude="webpack.config.js" \
--exclude="pnpm-lock.yaml" \
--exclude="vite.config.mjs" \
--exclude="CHANGELOG.md" \
../$(app_name)/ $(temp_build_directory)/$(app_id)
tar czf $(build_directory)/$(app_name).tar.gz \
Expand All @@ -128,23 +121,21 @@ build-appstore-tarball:
--exclude="docker" \
--exclude="node_modules" \
--exclude="./src" \
--exclude="styles" \
--exclude="./vendor" \
--exclude="biome.json" \
--exclude=".editorconfig" \
--exclude=".eslintrc.js" \
--exclude=".gitignore" \
--exclude=".php_cs.cache" \
--exclude=".php-cs-fixer.dist.php" \
--exclude=".prettierignore" \
--exclude=".prettierrc.json" \
--exclude="babel.config.js" \
--exclude="composer.json" \
--exclude="composer.lock" \
--exclude="docker-compose.yml" \
--exclude="tsconfig.json" \
--exclude="Makefile" \
--exclude="package-lock.json" \
--exclude="package.json" \
--exclude="stylelint.config.js" \
--exclude="webpack.config.js" \
--exclude="pnpm-lock.yaml" \
--exclude="vite.config.mjs" \
--exclude="CHANGELOG.md" \
../$(app_id)/ $(temp_build_directory)/$(app_id)
@if [ -f $(cert_directory)/$(app_id).key ]; then \
Expand Down
3 changes: 0 additions & 3 deletions babel.config.js

This file was deleted.

53 changes: 53 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"$schema": "https://biomejs.dev/schemas/2.4.7/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"files": {
"ignoreUnknown": true
},
"formatter": {
"enabled": true,
"indentStyle": "tab",
"indentWidth": 4,
"lineWidth": 80
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"complexity": {
"noBannedTypes": "off",
"noImportantStyles": "off"
},
"correctness": {
"noUnusedFunctionParameters": "off"
},
"suspicious": {
"noExplicitAny": "off"
}
}
},
"javascript": {
"formatter": {
"quoteStyle": "double",
"semicolons": "always"
}
},
"json": {
"formatter": {
"indentStyle": "tab",
"indentWidth": 4
}
},
"assist": {
"enabled": true,
"actions": {
"source": {
"organizeImports": "on"
}
}
}
}
Loading
Loading