diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 9f2ccc0..7ca75e1 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -11,7 +11,7 @@ on: - main permissions: - contents: write + contents: read jobs: quality: @@ -24,22 +24,28 @@ jobs: with: php-version: '8.4' + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: '22' + cache: 'npm' + - name: Install Dependencies run: | composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist - npm install + npm ci - - name: Run Pint - run: vendor/bin/pint + # The steps below report instead of rewriting the checkout. The writing + # variants (pint / prettier --write / eslint --fix) always exit 0, so the + # job passed no matter what they found. + - name: Check PHP Code Style + run: vendor/bin/pint --test - - name: Format Frontend - run: npm run format + - name: Check Frontend Formatting + run: npm run format:check - name: Lint Frontend - run: npm run lint + run: npm run lint:check - # - name: Commit Changes - # uses: stefanzweifel/git-auto-commit-action@v5 - # with: - # commit_message: fix code style - # commit_options: '--no-verify' + - name: Type Check Frontend + run: npm run type-check diff --git a/app/Services/EmbedProcessorService.php b/app/Services/EmbedProcessorService.php index 650bb65..9bd9f4b 100644 --- a/app/Services/EmbedProcessorService.php +++ b/app/Services/EmbedProcessorService.php @@ -2,8 +2,8 @@ namespace App\Services; -use Illuminate\Support\Facades\Http; use Illuminate\Support\Facades\Cache; +use Illuminate\Support\Facades\Http; use Illuminate\Support\Facades\Log; class EmbedProcessorService @@ -40,14 +40,14 @@ private static function processTwitterEmbeds(string $content): string $embedHtml = self::getTwitterOEmbed($url); if ($embedHtml) { - return '
'; + return ''; } // Fallback: create a basic embed structure that Twitter widget.js can enhance - return '