Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save pablocattaneo/043e036b6d340bacf404ff42d3f4a960 to your computer and use it in GitHub Desktop.
Save pablocattaneo/043e036b6d340bacf404ff42d3f4a960 to your computer and use it in GitHub Desktop.
Yes, it's possible to run `trunk check --fix` on a **specific file**.
Here’s how you can do it:
```bash
trunk check --fix path/to/your/file.ext
```
### Example
```bash
trunk check --fix src/components/Button.tsx
```
This will run all the enabled linters/formatters that apply to that file and fix any issues if possible.
### Notes
* `trunk` automatically determines which tools to run based on the file type and configuration.
* You can also pass multiple files if needed.
Let me know if you'd like to run only a specific tool (like `eslint` or `prettier`) on that file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment