Skip to content

Instantly share code, notes, and snippets.

@pablocattaneo
Created May 21, 2025 19:48
Show Gist options
  • Save pablocattaneo/636f21a07eaa6e69cb654de3920266e5 to your computer and use it in GitHub Desktop.
Save pablocattaneo/636f21a07eaa6e69cb654de3920266e5 to your computer and use it in GitHub Desktop.
If you're using **[Trunk](https://trunk.io)** (a dev tool that includes linting, formatting, etc.), and it detects auto-fixable lint issues, you can run the auto-fix with:
```bash
trunk check --fix
```
### Explanation:
* `trunk check`: runs the Trunk pipeline (linters, formatters, etc.)
* `--fix`: automatically applies any fixes that the linters support (like ESLint or Prettier).
---
If you only want to fix issues for a specific linter (e.g., ESLint), you can run:
```bash
trunk check --fix --filter=eslint
```
Let me know if you're using it in a CI/CD context or need help setting up rules.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment