Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stylelint issue parsing output #780

Open
clementAC opened this issue Mar 18, 2024 · 2 comments
Open

Stylelint issue parsing output #780

clementAC opened this issue Mar 18, 2024 · 2 comments
Labels

Comments

@clementAC
Copy link

clementAC commented Mar 18, 2024

Hi,

Using stylelint in the action with the last version of stylelint lead to error in parsing the command output. What seems strange it's when runing localy the output looks like the same =/.

Here is the error:
Error parsing stylelint JSON output: Unexpected end of JSON input. Output: ""

@hf-kklein
Copy link

had the same problem. My workaround was to just use another action
It's a bad workaround, I know.

name: Linter and Formatting

on:
  push:
    branches:
      - main
  pull_request: {}

jobs:
  run-linters:
    name: Run Prettier and Autofix on CSS files
    runs-on: ubuntu-latest
    steps:
      - name: Check out Git repository
        uses: actions/checkout@v4

      - name: Set up Node.js
        uses: actions/setup-node@v4
        with:
          node-version: 16

      - name: Install Node.js dependencies
        run: |
          npm install prettier
          npm install stylelint
          npm install stylelint-config-standard
      - name: Run Prettier on CSS files
        uses: wearerequired/lint-action@v2
        with:
          github_token: "${{ secrets.github_token }}"
          eslint: false
          prettier: true
          auto_fix: true
          prettier_args: --ignore-path .prettierignore

      - name: Run stylelint with reviewdog
        uses: reviewdog/action-stylelint@v1.22.1
        with:
          reporter: github-pr-review
          stylelint_input: "**/*.css"

Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants