weblate icon indicating copy to clipboard operation
weblate copied to clipboard

Improve biome checker configuration

Open meel-hd opened this issue 1 year ago • 2 comments

Describe the issue

The pre-commit command shows linting issues in files that are not modified by the current commit or branch.

The weird part is it raises this issues only when there is an issue with the files you actually modified. If the issues raised by the changes you made are fixed the pre-commit doesn't show the issues with the other files you didn't modify.

I already tried

  • [X] I've read and searched the documentation.
  • [X] I've searched for similar filed issues in this repository.

Steps to reproduce the behavior

  1. Introduce a dummy and unused variable (to raise an issue within the file you modified).
  2. Stage the changes git add .
  3. Run pre-commit run -all (this will say there is an issue with an unused var we introduced and step 1, plus a ton of other issues in other files'
  4. Remove the unused variable we introduced in step 1 and git add .;
  5. Then re run the pre-commit command. (now that the issue we introduced is fixed the command no longer shows the other issues in the other files'

Expected behavior

  • Show only the issues with the files that are actually modified.
  • The other issues should be fixed separately to avoid this behavior

Screenshots

I introduced the variable in another file. But it says there is issues with zen.js which I didn't modify. image

Exception traceback

No response

How do you run Weblate?

Other

Weblate versions

No response

Weblate deploy checks

No response

Additional context

No response

meel-hd avatar Sep 13 '24 10:09 meel-hd

I think it shows warnings, but only it fails on error. That's why you see more issues than changed. Probably biome should be configured better (either to not report warnings or to fail on them and fix underlying issues). https://biomejs.dev/guides/configure-biome/ has the documentation.

nijel avatar Sep 16 '24 14:09 nijel

This issue has been automatically marked as stale because there wasn’t any recent activity.

It will be closed soon if no further action occurs.

Thank you for your contributions!

github-actions[bot] avatar Oct 01 '24 02:10 github-actions[bot]

Thank you for your report; the issue you have reported has just been fixed.

  • In case you see a problem with the fix, please comment on this issue.
  • In case you see a similar problem, please open a separate issue.
  • If you are happy with the outcome, don’t hesitate to support Weblate by making a donation.

github-actions[bot] avatar Nov 02 '24 11:11 github-actions[bot]

Thank you for your report; the issue you have reported has just been fixed.

  • In case you see a problem with the fix, please comment on this issue.
  • In case you see a similar problem, please open a separate issue.
  • If you are happy with the outcome, don’t hesitate to support Weblate by making a donation.

github-actions[bot] avatar Nov 02 '24 11:11 github-actions[bot]